Deployments.ai Docs
Runtime

Rotate a webhook signing secret

POST /v1/webhooks/{webhookId}/rotate-secret · SDK rotateWebhookSecret · CLI deployments webhook rotate-secret

POST
/v1/webhooks/{webhookId}/rotate-secret

Requires webhooks:write.

Authorization

headerAuthorizationBearer <token>

Opaque bearer credential scoped to one service account and tenant.

Path Parameters

webhookId*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-environment?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-organization?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-project?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Request Body

application/json
  1. body
previousSecretExpiresInSeconds?integer
Range0 <= value <= 604800

Response Body

RotateWebhookSecretResponse

application/json
  1. response
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
version*number|||
environmentId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
organizationId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
projectId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
consecutiveFailures*number|||
disabledAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
disabledReason?string
Value in"consecutive-failures""manual"
eventTypes*array<string>
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
name*string
object*"webhook-endpoint"
Value in"webhook-endpoint"
previousSigningSecretExpiresAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
resourceFilters?
signingSecretRotatedAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
status*string
Value in"active""archived""disabled"
url*string
signingSecret*string
curl -X POST "https://example.com/v1/webhooks/string/rotate-secret" \  -H "Content-Type: application/json" \  -d '{}'
{  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 0,  "environmentId": "string",  "organizationId": "string",  "projectId": "string",  "consecutiveFailures": 0,  "disabledAt": "2019-08-24T14:15:22Z",  "disabledReason": "consecutive-failures",  "eventTypes": [    "string"  ],  "id": "string",  "name": "string",  "object": "webhook-endpoint",  "previousSigningSecretExpiresAt": "2019-08-24T14:15:22Z",  "resourceFilters": {    "aggregateIds": [      "string"    ],    "aggregateTypes": [      "string"    ],    "environmentIds": [      "string"    ],    "projectIds": [      "string"    ]  },  "signingSecretRotatedAt": "2019-08-24T14:15:22Z",  "status": "active",  "url": "string",  "signingSecret": "string"}