Skip to content

POST /v3/callbacks/endpoints/{id}/rotate-secret

Rotate the endpoint's signing secret. A new signing secret for the endpoint, answered once with the endpoint. The previous secret still signs beside it for expire_previous_in_s seconds (default 86400; 0: not at all). The body is optional. 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

NameInTypeRequiredDefaultDescription
idpathstringyesThe endpoint's id (cbe_ and 24 hex digits).

Request body

A CallbackRotateSecret object, as JSON.

FieldTypeRequiredDescription
expire_previous_in_sintegernoHow long the previous secret still signs beside the new one; 0: not at all.

Responses

StatusBodyDescription
200CallbackEndpointCreated (application/json)OK
400Problem (application/problem+json)Invalid or unknown parameter, or a body that is not one JSON document (code invalid_body).
401Problem (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).
403Problem (application/problem+json)The credential's scope does not cover this route (code forbidden), or the organization's plan has no callbacks (code plan_required).
404Problem (application/problem+json)Not found.
415Problem (application/problem+json)The body is not sent as Content-Type: application/json (code unsupported_media_type).
503Problem (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).
defaultProblem (application/problem+json)Any other error (405, 500, 504).

Response body

A 200 carries a CallbackEndpointCreated object.

FieldTypeRequiredDescription
activebooleanyes
created_atdate-time (RFC 3339, UTC)yes
descriptionstring | nullyes
event_typesarray of stringyes
healthobjectyes
health.consecutive_failuresintegerno
health.disabled_atdate-time (RFC 3339, UTC) | nullno
health.disabled_reasonstring | nullno
health.failing_sincedate-time (RFC 3339, UTC) | nullno
health.last_success_atdate-time (RFC 3339, UTC) | nullno
health.statestringyesOne of: unverified, active, failing, disabled.
health.verified_atdate-time (RFC 3339, UTC) | nullno
idstringyescbe_ and 24 hex digits.
last_24hobjectyesDeliveries of the last 24 hours by state.
last_24h.deliveredintegerno
last_24h.droppedintegerno
last_24h.failedintegerno
last_24h.heldintegerno
updated_atdate-time (RFC 3339, UTC)yes
urlstringyesAs stored: https, the host in lower case, no :443, / for an empty path.
secretstringyeswhsec_ and the standard base64 (with padding) of 32 random bytes: the Standard Webhooks signing secret. Shown only in this answer.

Example request

Shell
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/rotate-secret'

More in Webhooks (API: callbacks)

Previous: POST /v3/callbacks/endpoints/{id}/replay · Next: POST /v3/callbacks/endpoints/{id}/test

Markdown version: /docs/reference/post-callbacks-endpoints-id-rotate-secret.md