Deploy hooks
A deploy hook is a secret URL bound to a test tag. When something calls it, MaxoPerf starts a run of every test in the workspace that carries that tag and passes the deployed URL to the tests. Use it when your deploy tool cannot run the GitHub Action or the CLI.
Create a hook
Section titled “Create a hook”You need the workspace admin role.
-
Tag the tests the hook should run, for example
smoke, with thetagsfield of the test file or in the console. -
Open Workspace → Deploy hooks and select Create hook.
-
Fill in the form:
Field Meaning Name Unique within the workspace, for example Prod smoke.Tag Every non-deleted test in the workspace with this tag runs on a trigger. URL key The config value that receives the deployed URL. Default TARGET_URL.Allowed keys Extra config values a generic call may override (up to 20). Signing secret Optional. A workspace secret used to verify signatures. -
Copy the URL from the confirmation. MaxoPerf shows it once. It looks like
https://app.maxoperf.com/v1/hooks/deploy/mpdh_.... The list afterwards shows only the last four characters.
The URL is the credential. Anyone who has it can start runs of that tag’s tests, but nothing else. Store it in your deploy tool’s secret settings. If it leaks, use Rotate on the hook to get a new URL (shown once), or delete the hook. The old URL stops working immediately.
Runs started by a hook run as the user who created the hook, with that user’s permissions. If that user loses access, triggers fail with HOOK_OWNER_UNAUTHORIZED.
Call it with curl
Section titled “Call it with curl”Any shell, pipeline or script can call the URL. The body is optional JSON:
curl -X POST "$MAXOPERF_DEPLOY_HOOK_URL" \ -H "Content-Type: application/json" \ -d '{ "configOverrides": { "TARGET_URL": "https://pr-482.preview.example.com" }, "ciContext": { "branch": "feature/checkout", "sha": "3f2c1a9d4b7e" } }'configOverrideskeys must be the hook’s URL key or one of its allowed keys. Any other key returns400 HOOK_OVERRIDE_NOT_ALLOWED.ciContextis shown on the started runs as provenance. The source is always Deploy hook.- An empty body is fine. The tests then use their stored config values.
- There is no
Authorizationheader.
The call returns 202:
{ "hookId": "dh-0123456789", "source": "generic", "triggered": [{ "testId": "tst-0123456789", "runId": "run-0123456789", "replayed": false }], "blocked": [ { "testId": "tst-0123456780", "code": "RUN_START_BLOCKED", "reason": "concurrent_runs", "title": "Concurrent run limit reached" } ]}blocked lists tests that could not start (for example the concurrent run limit) and why. A trigger starts at most 20 tests. When nothing starts on purpose, the response has an ignored reason:
ignored | Meaning |
|---|---|
event_not_success | A GitHub, Vercel or Netlify event that is not a successful deploy. |
no_deploy_url | A provider event arrived without a usable http(s) URL. |
no_tests_with_tag | No test in the workspace carries the hook’s tag. |
The call returns immediately. It does not wait for the runs. To wait and gate, use the Action or the CLI.
Vercel
Section titled “Vercel”- In your Vercel project open Settings → Webhooks and create a webhook.
- Choose the
deployment.succeededevent. - Paste the hook URL.
- If you set a signing secret on the hook, use the same value as the Vercel webhook secret.
MaxoPerf reads the deployment URL from the payload and passes it as the hook’s URL key. For the full Vercel flow see Load test a Vercel app.
Netlify
Section titled “Netlify”- In Site configuration → Notifications → Deploy notifications, add an outgoing webhook for Deploy succeeded.
- Paste the hook URL.
- Set the JWS secret token to the hook’s signing secret, if you use one.
The test receives the deploy’s SSL URL.
GitHub webhook
Section titled “GitHub webhook”To trigger from GitHub without a workflow, add a repository webhook (Settings → Webhooks):
- Payload URL: the hook URL.
- Content type:
application/json. - Secret: the hook’s signing secret, if set.
- Events: select Deployment statuses only.
Only deployment_status events with state success start runs. The test receives the deployment’s environment URL, or its target URL when there is none.
Signatures
Section titled “Signatures”Without a signing secret, the URL alone authorizes a call. Add a signing secret for a second factor. MaxoPerf then checks the signature of every call against the exact request body, and rejects a missing or wrong signature with 401 HOOK_SIGNATURE_INVALID.
| Caller | Header | Value |
|---|---|---|
| GitHub | X-Hub-Signature-256 | sha256= and the HMAC-SHA256 of the body, hex |
| Vercel | X-Vercel-Signature | HMAC-SHA1 of the body, hex |
| Netlify | X-Webhook-Signature | A JWS signed with HS256 whose sha256 claim matches the body |
| Generic | X-MaxoPerf-Signature | sha256= and the HMAC-SHA256 of the body, hex |
Sign a generic call like this:
BODY='{"configOverrides":{"TARGET_URL":"https://staging.example.com"}}'SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$HOOK_SIGNING_SECRET" -hex | sed 's/^.* //')curl -X POST "$MAXOPERF_DEPLOY_HOOK_URL" \ -H "Content-Type: application/json" \ -H "X-MaxoPerf-Signature: sha256=$SIG" \ -d "$BODY"The signing secret is a workspace secret. If it is deleted, triggers fail with HOOK_SIGNING_SECRET_UNAVAILABLE.
Redelivery
Section titled “Redelivery”Providers retry deliveries, and you may press Redeliver in GitHub. MaxoPerf recognizes a repeated delivery and returns the runs it already started, with "replayed": true, instead of starting new ones. It identifies a delivery by:
- GitHub: the
X-GitHub-Deliveryheader - Vercel: the event
id - Netlify: the deploy
idwith its state - Generic: the
Idempotency-Keyheader you send. Without it, every call starts new runs.
See what happened
Section titled “See what happened”The hooks list shows the outcome of each hook’s last trigger: time, source, how many runs started or were blocked, and any ignored reason or error code. Started runs carry the CI chip with Deploy hook as the source.
Errors
Section titled “Errors”| Status | Code | Cause |
|---|---|---|
| 400 | HOOK_PAYLOAD_INVALID | The body is not JSON, or ciContext or configOverrides is not an object. |
| 400 | HOOK_OVERRIDE_NOT_ALLOWED | An override key is not allowed for this hook. |
| 401 | HOOK_SIGNATURE_INVALID | Signature missing or wrong. |
| 401 | HOOK_SIGNING_SECRET_UNAVAILABLE | The signing secret is missing or unreadable. |
| 403 | HOOK_OWNER_UNAUTHORIZED | The hook’s creator can no longer start these runs. |
| 404 | Unknown, rotated or deleted URL. |
Webhooks from providers must be sent as application/json. Calls are limited per source IP address.