Dokumentation
ReferenceHTTP APIWebhooksRotate webhook signing secret

Rotate webhook signing secret

POST
/v1/account/webhooks/secret/rotate

Authorization

bearerAuth
AuthorizationBearer <token>

Authenticate using an API Key:

Authorization: Bearer rk_live_your-api-key

In: header

Request Body

application/json

transition_hours?integer

Transition period in hours (old key remains valid)

Default24
Range1 <= value <= 168

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.routeany.com/v1/account/webhooks/secret/rotate" \  -H "Content-Type: application/json" \  -d '{    "transition_hours": 24  }'
{
  "key": "whsec_abc123...",
  "masked": "whsec_abc1**********",
  "created_at": "2019-08-24T14:15:22Z",
  "previous_key_expires_at": "2019-08-24T14:15:22Z"
}
{
  "type": "https://api.routeany.com/errors/validation-error",
  "title": "Validation Error",
  "status": 400,
  "detail": "The 'prompt' field is required",
  "code": "VALIDATION_INVALID_ARGUMENT",
  "errors": [
    {
      "field": "input.prompt",
      "code": "VALIDATION_MISSING_FIELD",
      "message": "prompt is required"
    }
  ]
}
{
  "type": "https://api.routeany.com/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Invalid or missing API key",
  "code": "AUTH_INVALID_TOKEN"
}
{
  "type": "https://api.routeany.com/errors/validation-error",
  "title": "Validation Error",
  "status": 400,
  "detail": "The 'prompt' field is required",
  "code": "VALIDATION_INVALID_ARGUMENT",
  "trace_id": "string",
  "request_id": "string",
  "errors": [
    {
      "field": "input.prompt",
      "code": "VALIDATION_INVALID_ARGUMENT",
      "message": "prompt is required"
    }
  ]
}