Rotate an endpoint's signing secret
const { secret, previous_secret_expires_at } = await gp.webhookEndpoints.rotateSecret('whe_…', { previous_secret_ttl_hours: 24,});rotation = gp.webhook_endpoints.rotate_secret("whe_…", previous_secret_ttl_hours=24)secret, err := client.WebhookEndpoints.RotateSecret(ctx, "whe_…", 24)The previous secret stays valid for previous_secret_ttl_hours (0–168, default 24); meanwhile deliveries carry one v1 signature per valid secret.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Active organization for dashboard sessions. Ignored for API keys (the key determines the organization).
Request Body
Section titled “Request Body”object
Responses
Section titled “Responses”New secret (shown once). The previous secret keeps signing in parallel until it expires.
object
Example generated
{ "endpoint_id": "example", "secret": "example", "previous_secret_expires_at": "2026-04-15T12:00:00Z"}Missing or invalid credentials.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Authenticated but not permitted. Any route may also answer request_blocked when abuse protection has blocked the client IP for a while.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Resource not found (or not visible to this tenant).
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Validation failed.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Too many requests. See Retry-After.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}