Webhook endpoints

Rotate a webhook endpoint secret

Rotate the signing secret for a webhook endpoint.

POST/v1/webhook-endpoints/{id}/rotate-secret
0credits
x-api-keystringheader

API key (`sfk_...`)

Parameters
1
idstringrequiredpath

Webhook endpoint id.

min 1 chars

Response fields
8

Endpoint-specific response payload.

datasecret
string

New signing secret for this webhook endpoint. Shown here exactly once — store it now.

min 1 chars

datapreviousSecretExpiresAt
string

ISO-8601 timestamp until which the previous signing secret remains valid for verification, allowing zero-downtime rotation.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

metacached
booleanoptional

True when served from shared response cache. Credits still apply (full endpoint price); Age header may be present.

Code example

curl "https://api.socialfetch.dev/v1/webhook-endpoints/abc123/rotate-secret" \
  -H "x-api-key: YOUR_API_KEY" \
  -X POST

Responses

New signing secret. The previous secret remains valid until it expires.