POST /v3/search/subscriptions/{id}/test
Preview a search subscription: the payloads the subscription would have produced for filings accepted in the last 7 days (at most 5, newest first), as webhook envelopes with test: true; nothing is delivered or recorded. 503 callbacks_unavailable while this server has no callback key file or its database lacks the callback tables. 503 search_unavailable without full-text search.
API key: required. See Authentication.
Group: Webhooks (API: callbacks)
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
id | path | string | yes | The subscription's id (sub_ and 24 hex digits). |
Request body
A SearchSubscriptionTestRequest object, as JSON.
Responses
| Status | Body | Description |
|---|---|---|
200 | SearchSubscriptionTest (application/json) | OK |
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). |
404 | Problem (application/problem+json) | Not found. |
415 | Problem (application/problem+json) | The body is not sent as Content-Type: application/json (code unsupported_media_type). |
503 | Problem (application/problem+json) | Full-text search cannot answer now: search_unavailable (sb_search unreachable or not configured), search_busy (its queue is full), search_timeout (the query hit its time budget), ticker_resolution_unavailable; or the database is unavailable. Retry after the Retry-After delay when one is given. |
default | Problem (application/problem+json) | Any other error (405, 500, 504). |
Response body
A 200 carries a SearchSubscriptionTest object.
| Field | Type | Required | Description |
|---|---|---|---|
data | array of object | yes | The payloads the subscription would have produced for filings accepted in the last 7 days, newest first, each the webhook envelope with test: true: filing.new (filing, firehose; id new:<subscription>:<accession>) or search.match (search; id match:<subscription>:<accession>). Nothing is delivered. |
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/search/subscriptions/sub_0123456789abcdef01234567/test'More in Webhooks (API: callbacks)
Previous: DELETE /v3/search/subscriptions/{id}
Markdown version: /docs/reference/post-search-subscriptions-id-test.md