POST /v3/callbacks/endpoints/{id}/test
Sends the endpoint one sample event of a type it takes, signed like any event, with test: true in its envelope and sample data (accession 0000000000-26-000001), and answers with the attempt's outcome: 200 {id, state, delivered, http_status, error_class, duration_ms} once the one attempt is made (a test send is not retried and not billed), or 202 {id, state} when no attempt was made within 12 seconds (it is still sent; see the delivery log). 409 endpoint_unverified or endpoint_disabled while the endpoint cannot be sent to, test_running while another test of the organization runs; 403 plan_required for a plan without deliveries. /verify and /test share a limit of 6 a minute per organization (burst 3): beyond it 429 rate_limited (reason verify_test, Retry-After). 429 rate_limited (reason test_capacity) while the server runs its most test sends at once. 503 callbacks_unavailable while this server has no callback key file or its database lacks the callback tables.
API key: required. See Authentication.
Group: Webhooks (API: callbacks)
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
id | path | string | yes | The endpoint's id (cbe_ and 24 hex digits). |
Request body
A CallbackEndpointTestRequest object, as JSON.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | One of the endpoint's event_types. The sample event has this type and test: true in its envelope; there is no separate test type. One of: filing.new, filing.updated, filing.corrected, filing.deleted, search.match, search.digest, filing.digest, search.export.completed. |
Responses
| Status | Body | Description |
|---|---|---|
200 | CallbackEndpointTestResult (application/json) | OK |
202 | CallbackEndpointTestResult (application/json) | No attempt was made within 12 seconds: {id, state} (pending, delivering or held). The delivery is still made. |
400 | Problem (application/problem+json) | Invalid or unknown parameter, or a body that is not one JSON document (code invalid_body). |
401 | Problem (application/problem+json) | Missing, invalid or inactive API key (code unauthorized), or a refused access token (code invalid_token: malformed, unknown key, bad signature, expired, wrong issuer or audience, revoked grant). WWW-Authenticate names the protected-resource metadata (RFC 9728). |
403 | Problem (application/problem+json) | The credential's scope does not cover this route (code forbidden), or the organization's plan has no webhook deliveries (code plan_required). |
404 | Problem (application/problem+json) | Not found. |
409 | Problem (application/problem+json) | endpoint_unverified: the endpoint is not verified yet; endpoint_disabled: it is inactive or disabled; test_running: another test send of the organization has not answered yet. |
415 | Problem (application/problem+json) | The body is not sent as Content-Type: application/json (code unsupported_media_type). |
429 | Problem (application/problem+json) | rate_limited, reason verify_test: the organization's limit of verifications and test sends (the configured rate and burst) is used up, retry after Retry-After; reason test_capacity (/test only): the server runs its most test sends at once, retry after Retry-After. |
503 | Problem (application/problem+json) | Callbacks are not available: this server has no callback key file or its database lacks the callback tables (code callbacks_unavailable); too many callback URLs are being checked at once (code db_unavailable, reason resolver_busy, Retry-After 1); or the database is unavailable (code db_unavailable). |
default | Problem (application/problem+json) | Any other error (405, 500, 504). |
Response body
A 200 carries a CallbackEndpointTestResult object.
| Field | Type | Required | Description |
|---|---|---|---|
delivered | boolean | no | 200 only: the endpoint answered 2xx. |
duration_ms | integer | null | no | 200 only: the attempt's duration. |
error_class | string | null | no | 200 only. One of: timeout, connect, tls, dns, blocked_address, redirect, http, too_large, null. |
http_status | integer | null | no | 200 only: the endpoint's status; null when no HTTP answer came. |
id | string | yes | The test delivery's id (dlv_ and 24 hex digits), in the delivery log. |
state | string | yes | 200: delivered, failed or dropped (the attempt's outcome is final: a test send is attempted once). 202: still pending, delivering or held when the 12 seconds ran out; the delivery is still made, and its outcome is in the delivery log. One of: pending, delivering, held, delivered, failed, dropped. |
Example request
curl -sS -X POST -H "Authorization: Bearer $SECBLAST_API_KEY" \
-H "Content-Type: application/json" -d @body.json \
'https://api.secblast.com/v3/callbacks/endpoints/cbe_0123456789abcdef01234567/test'More in Webhooks (API: callbacks)
Previous: POST /v3/callbacks/endpoints/{id}/rotate-secret · Next: POST /v3/callbacks/endpoints/{id}/verify
Markdown version: /docs/reference/post-callbacks-endpoints-id-test.md