Rotate Secret
POST /v1/webhooks/endpoints/{endpoint_id}/rotate-secret
Generate a new signing secret for the endpoint and return it once. The old secret stops being used immediately, so give the new secret to your receiver right away.
Authentication
Requires authentication via: OAuth2PasswordBearer.
Parameters
| Name | In | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
endpoint_id | path | string | Yes | ||
X-API-Key | header | string | null | No | nullable |
Responses
200
Successful Response
application/json
Resolved schema:
{
"properties": {
"endpoint_id": {
"type": "string",
"title": "Endpoint Id"
},
"secret": {
"type": "string",
"title": "Secret"
}
},
"type": "object",
"required": [
"endpoint_id",
"secret"
],
"title": "WebhookSecretRotateResponse"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
endpoint_id | string | Yes | ||
secret | string | Yes |
400
The server cannot encrypt the new signing secret.
No response body.
401
No credentials, or the Bearer token / X-API-Key is invalid.
No response body.
403
The account is disabled, or a guest token was used; or the endpoint belongs to another account.
No response body.
404
Webhook endpoint not found.
No response body.
422
Validation Error
application/json
Resolved schema:
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
detail | array<object> | No | ||
detail[] | object | No | ||
detail[].loc | array<string | integer> | No | ||
detail[].loc[] | string | integer | No | ||
detail[].msg | string | No | ||
detail[].type | string | No |