Rotate the monitor webhook signing secret
POST /v1/monitors/{id}/webhook-secret/rotate
Generates a new signing secret and returns it in this response. Store it securely. A retry with the original Idempotency-Key recovers the same secret for up to 24 hours while it remains the current secret or the valid previous secret. An expired or displaced secret returns 409 idempotency_result_expired without rotating again. Reads do not expose the secret. Zero-downtime overlap: the previous secret remains valid until previous_secret_expires_at (24 hours); during the window every delivery carries an additional X-Arcmira-Signature-Previous header computed with the old secret over the same {timestamp}.{payload} string, so you can verify with either secret while you roll. After the window the old secret is dropped and the extra header disappears. Rotating again during the window replaces the previous secret and resets the window. Requires a configured webhook (webhook_url set); otherwise 409 with code webhook_not_configured. Auto-disable interplay: rotation resets webhook_failures but never re-enables a webhook that was auto-disabled after repeated failures; to resume delivery, also PATCH the monitor with notify_webhook: true. Requires the monitors:write scope.
Parameters
| Name | Location | Description |
|---|
| id (required) | path | Monitor id. |
| Idempotency-Key | header | One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation. |
Responses
200 Success
{
"description": "Success",
"headers": {
"X-Request-Id": {
"$ref": "#/components/headers/X-Request-Id"
},
"X-Arcmira-Version": {
"$ref": "#/components/headers/X-Arcmira-Version"
},
"RateLimit-Limit": {
"$ref": "#/components/headers/RateLimit-Limit"
},
"RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimit-Remaining"
},
"RateLimit-Reset": {
"$ref": "#/components/headers/RateLimit-Reset"
},
"Idempotency-Replayed": {
"$ref": "#/components/headers/Idempotency-Replayed"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebhookSecretRotateResponse"
}
}
}
}
400 InvalidRequest
{
"$ref": "#/components/responses/InvalidRequest"
}
401 AuthenticationError
{
"$ref": "#/components/responses/AuthenticationError"
}
403 PermissionError
{
"$ref": "#/components/responses/PermissionError"
}
404 NotFound
{
"$ref": "#/components/responses/NotFound"
}
409 Conflict. idempotency_conflict means the Idempotency-Key was finalized with a different request intent. The route also answers 409 for a duplicate or a failed precondition, named in its description.
{
"description": "Conflict. idempotency_conflict means the Idempotency-Key was finalized with a different request intent. The route also answers 409 for a duplicate or a failed precondition, named in its description.",
"headers": {
"X-Request-Id": {
"$ref": "#/components/headers/X-Request-Id"
},
"X-Arcmira-Version": {
"$ref": "#/components/headers/X-Arcmira-Version"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
429 RateLimited
{
"$ref": "#/components/responses/RateLimited"
}
500 ServerError
{
"$ref": "#/components/responses/ServerError"
}
Operation definition
{
"tags": [
"Monitors"
],
"operationId": "rotate_monitor_webhook_secret",
"summary": "Rotate the monitor webhook signing secret",
"description": "Generates a new signing secret and returns it in this response. Store it securely. A retry with the original Idempotency-Key recovers the same secret for up to 24 hours while it remains the current secret or the valid previous secret. An expired or displaced secret returns 409 idempotency_result_expired without rotating again. Reads do not expose the secret. Zero-downtime overlap: the previous secret remains valid until previous_secret_expires_at (24 hours); during the window every delivery carries an additional X-Arcmira-Signature-Previous header computed with the old secret over the same {timestamp}.{payload} string, so you can verify with either secret while you roll. After the window the old secret is dropped and the extra header disappears. Rotating again during the window replaces the previous secret and resets the window. Requires a configured webhook (webhook_url set); otherwise 409 with code webhook_not_configured. Auto-disable interplay: rotation resets webhook_failures but never re-enables a webhook that was auto-disabled after repeated failures; to resume delivery, also PATCH the monitor with notify_webhook: true. Requires the monitors:write scope.",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"schema": {
"type": "string",
"description": "Monitor id."
},
"required": true,
"description": "Monitor id.",
"name": "id",
"in": "path"
},
{
"schema": {
"type": "string"
},
"required": false,
"name": "Idempotency-Key",
"in": "header",
"example": "8b2f6c3e-4d1a-4e7b-9c05-2f6a1b7d3e90",
"description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation."
}
],
"responses": {
"200": {
"description": "Success",
"headers": {
"X-Request-Id": {
"$ref": "#/components/headers/X-Request-Id"
},
"X-Arcmira-Version": {
"$ref": "#/components/headers/X-Arcmira-Version"
},
"RateLimit-Limit": {
"$ref": "#/components/headers/RateLimit-Limit"
},
"RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimit-Remaining"
},
"RateLimit-Reset": {
"$ref": "#/components/headers/RateLimit-Reset"
},
"Idempotency-Replayed": {
"$ref": "#/components/headers/Idempotency-Replayed"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebhookSecretRotateResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/InvalidRequest"
},
"401": {
"$ref": "#/components/responses/AuthenticationError"
},
"403": {
"$ref": "#/components/responses/PermissionError"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"409": {
"description": "Conflict. idempotency_conflict means the Idempotency-Key was finalized with a different request intent. The route also answers 409 for a duplicate or a failed precondition, named in its description.",
"headers": {
"X-Request-Id": {
"$ref": "#/components/headers/X-Request-Id"
},
"X-Arcmira-Version": {
"$ref": "#/components/headers/X-Arcmira-Version"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
}