Skip to content
Docs
Async jobs

Rotate the callback secret

Replace the account callback secret. The previous value keeps signing for 24 hours. A registered enabled HTTPS webhook keeps its own secret, and rotating that endpoint takes effect immediately. The new account secret is returned and remains readable. Free.

POST/v1/async/callback-secret/rotate
FreeAsync jobs, destinations, schedules and the callback secret are not changed from the docs; call this with your own key.

Request

POSThttps://api.scrapercompany.com/v1/async/callback-secret/rotate

Authenticate with your API key in the x-api-key header (see Authentication).

Example request

curl -X POST "https://api.scrapercompany.com/v1/async/callback-secret/rotate" \
  -H "x-api-key: $SCRAPERCOMPANY_API_KEY"

Response

200 — New account callback signing secret. Fields: secret, created_at, rotated_at, warning. The previous value keeps signing for 24 hours..

200 response
{
  "secret": "whsec_REPLACE_WITH_THE_VALUE_THIS_ENDPOINT_RETURNS",
  "created_at": "2026-10-03T09:12:44Z",
  "rotated_at": "2026-10-03T11:30:00Z",
  "warning": "The previous secret keeps signing for 24 hours. During that window x-scrapercompany-signature lists the current HMAC and the previous one, comma-separated, current first. A callback URL that matches an enabled HTTPS webhook still uses that endpoint's secret."
}

Errors

Errors return a JSON body with a detail field. Failed requests are not charged. See Errors for the full list and retry advice.

StatusMeaningRetry?
401Unauthorized

Missing or invalid API key.

{"detail":"missing or invalid API key"}
No, fix the request
429Too Many Requests

Too many requests: the key's requests-per-minute limit was exceeded, or (in enforce credits mode) the plan's concurrent-request limit. No rate-limit or Retry-After headers are sent; back off and retry.

{"detail":"rate limit 60/min exceeded"}
Yes, with backoff
503Service Unavailable

Temporarily unavailable: a dependency of this endpoint is down, or the upstream source changed its contract. Retry later.

{"detail":"database unavailable: OperationalError"}
Yes, with backoff

Try it

Async jobs, destinations, schedules and the callback secret are not changed from the docs; call this with your own key.

  1. Export your key: export SCRAPERCOMPANY_API_KEY=sk_... (no key yet? start a free trial).
  2. Copy the cURL example above and run it in a terminal.

Questions about this page?

Send the page link and your question, and the team will answer.

Email support