Skip to content

Get the job-webhook secret

GET /v1/webhooks/job-secret

The secret that signs deliveries to jobs’ own `webhook` URLs.

One secret for the organization, live and test jobs alike, made the first time it’s asked for, so only a live key can read it. The dashboard’s Webhooks page shows and rotates it too; after a rotation, previous_secret_expires_at says until when the old one also signs.

API key with the webhooks scope.

Request

Terminal window
curl "https://api.formatjet.com/v1/webhooks/job-secret" \
-H "Authorization: Bearer $FORMATJET_API_KEY"

Responses

200 OK

The secret

FieldTypeDescription
secretstringKeep it with your other secrets
previous_secret_expires_atstring | null
Example
{
"secret": "whsec_8nD2qL5vX1rT7yK3wB9cF4gH6jM0pS2z",
"previous_secret_expires_at": null
}

Errors

Problem documents (application/problem+json); see Errors.

StatusCodeWhen
401unauthorizedNo API key, or one that’s unknown or revoked.
403forbiddenThe key lacks the webhooks scope, is a test key, or webhooks aren’t set up here yet.
429rate_limitedMore requests than the plan allows in 10 seconds: wait Retry-After seconds.