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
curl "https://api.formatjet.com/v1/webhooks/job-secret" \ -H "Authorization: Bearer $FORMATJET_API_KEY"Responses
200 OK
The secret
| Field | Type | Description |
|---|---|---|
secret | string | Keep it with your other secrets |
previous_secret_expires_at | string | null |
{ "secret": "whsec_8nD2qL5vX1rT7yK3wB9cF4gH6jM0pS2z", "previous_secret_expires_at": null}Errors
Problem documents (application/problem+json); see Errors.
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No API key, or one that’s unknown or revoked. |
| 403 | forbidden | The key lacks the webhooks scope, is a test key, or webhooks aren’t set up here yet. |
| 429 | rate_limited | More requests than the plan allows in 10 seconds: wait Retry-After seconds. |