Everything you need to integrate Stressthem into your security testing workflow: authentication, target verification, the REST API, SDKs, webhooks and CI/CD patterns. All examples are runnable as-is once you replace the placeholder API key with your own.
This guide walks you through launching your first stress test in under five minutes. You will need a registered account, a valid API key, and a target that you own or have explicit written authorization to test. The fastest path is to use the hosted dashboard for one-off tests and switch to the API or CLI for repeatable, automated workloads.
/register.php and verify your email.verified (usually instant).Here is the minimum viable API call to launch a 30-second UDP flood:
The response is JSON and contains a job ID you can poll for status, or you can subscribe
to a webhook to receive a callback when the job completes. The request_id
is optional but recommended — it makes the launch idempotent, so a retried CI run
will not double-launch.
All API requests are authenticated with a Bearer token in the Authorization
header. Tokens are account-scoped and inherit the rate limits and method allowlist of
the plan that issued them. Tokens can be scoped further at creation time to restrict
which methods they can launch, which targets they can target, and which IP ranges they
can be called from.
Treat API keys like passwords. Never embed them in client-side JavaScript, mobile apps or other code that can be reverse-engineered. For server-to-server integrations, store the key in a secrets manager (AWS Secrets Manager, HashiCorp Vault, Doppler) and inject it as an environment variable at runtime. Rotate keys at least every 90 days and immediately if you suspect a leak.
Before any traffic can be sent to a target, the target must be verified as owned by the account that wants to test it. Stressthem supports three verification methods: a DNS TXT record, an HTTP challenge file, or a signed cloud-provider ownership token. Targets must be re-verified every 30 days; the dashboard will show a yellow warning when re-verification is due within 7 days.
Verification is enforced at the API gateway, not at the launch endpoint. This means an unverified target will be rejected at the API call itself, before any traffic is queued. The verification status is exposed in the API so you can programmatically detect targets that need re-verification and trigger a re-check before they expire.
Add a TXT record to the target domain's DNS zone containing your per-account token. The token is unique per account and never changes; you can find it in the dashboard under Settings → Verification.
Serve a plain-text file at a well-known URL containing your account token. The file must return HTTP 200 with a body that exactly matches the token, with no trailing whitespace or HTML wrapping.
The REST API is organized around predictable resource-oriented URLs, standard HTTP
verbs, JSON-encoded request and response bodies, and standard HTTP response codes.
The base URL is https://api.stressthem.example/v1. All endpoints require
authentication unless marked otherwise.
Queues a new stress job. Returns the job object with initial status queued.
Once the job is allocated to amplification nodes and the first packet is sent, the
status flips to running. On completion the status becomes completed
(target stayed responsive), target_down (target stopped responding during
the test) or error (infrastructure-side issue).
Returns the current status of a job plus live telemetry: instantaneous throughput in Gbps, packet rate in pps, target RTT in milliseconds, and a rolling error-ratio. For completed jobs, also includes summary statistics and links to downloadable PCAP and HAR captures (plan-dependent).
Subscribe to job lifecycle events by registering a webhook URL. Stressthem will POST
a signed JSON payload to your URL on each event. The signature is HMAC-SHA256 of the
raw body using your webhook secret, sent in the X-Stressthem-Signature
header. Always verify the signature before acting on the payload.
Event types: job.queued, job.running, job.completed, job.target_down, job.error.
Official SDKs are available for Python, Go, Node.js and shell. They handle
authentication, retries with exponential backoff, idempotency and pagination
automatically. The shell SDK is a single-file script with no dependencies beyond
curl and jq, suitable for CI/CD pipelines.
Stressthem uses conventional HTTP response codes: 2xx for success, 4xx for client
errors (bad request, unauthorized, target not verified, plan limit reached), 5xx for
server errors. Errors return a JSON body with error.code and
error.message fields. The most common error codes are listed below.
401 unauthorized — Missing or invalid API key.403 target_not_verified — Target has not completed verification.403 method_not_allowed — Method not in plan allowlist.409 duplicate_request — A job with this request_id already exists.422 invalid_parameter — Port out of range, duration too long, etc.429 rate_limited — Too many launches per minute; back off and retry.503 capacity_exceeded — All amplification nodes busy; retry shortly.