Run tests via webhook
Webhooks let external systems start Qodex runs. Use them from CI pipelines, deploy scripts, release tools, or any service that can make an HTTP request. There are two webhook styles: a flexible project trigger authenticated with an API key, and a preconfigured schedule URL with a baked-in secret.Project trigger
Use the project trigger when the caller needs to choose the environment, tags, or callback URL at request time.qk_, are scoped to one project, and are stored only as hashes. The plaintext key is shown once when created.
Request body
| Field | Default | Meaning |
|---|---|---|
environment | staging | Named Qodex environment to run against. |
tags | empty | Tags to run. Empty means the full active suite. |
mode | brief | Reporting mode echoed in the response. |
callback_url | none | Optional URL Qodex calls when the run finishes. |
Response
The trigger returns202 Accepted with a test run id.
Poll or callback
Most CI systems should poll the run status and fail the job if Qodex reports failure.callback_url, Qodex sends a completion payload with pass and fail counts plus the run URL.
Per-schedule webhook
Use a schedule webhook when one external trigger should always run one preconfigured policy.Safety notes
- Store
qk_keys in your CI secret store. - Revoke old keys when rotating credentials.
- Calls with no runnable scenarios return an error instead of creating an empty run.
- Duplicate webhook calls create duplicate runs, so handle retry idempotency in the caller if needed.
Related
Run tests in CI
Use webhooks as required checks in pipelines.
Run tests on a schedule
Create the policies used by schedule webhooks.