Rotate the signing secret
curl --request POST \
--url https://www.qwairy.co/api/v1/webhooks/{webhookId}/rotate-secret \
--header 'Authorization: <authorization>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://www.qwairy.co/api/v1/webhooks/{webhookId}/rotate-secret"
headers = {
"Authorization": "<authorization>",
"Idempotency-Key": "<idempotency-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Idempotency-Key': '<idempotency-key>'}
};
fetch('https://www.qwairy.co/api/v1/webhooks/{webhookId}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Webhook endpoints
Rotate the signing secret
Generate a new signing secret for an integration webhook endpoint. For 24 hours deliveries carry two signatures so you can switch without losing events.
POST
https://www.qwairy.co
/
api
/
v1
/
webhooks
/
{webhookId}
/
rotate-secret
Rotate the signing secret
curl --request POST \
--url https://www.qwairy.co/api/v1/webhooks/{webhookId}/rotate-secret \
--header 'Authorization: <authorization>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://www.qwairy.co/api/v1/webhooks/{webhookId}/rotate-secret"
headers = {
"Authorization": "<authorization>",
"Idempotency-Key": "<idempotency-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Idempotency-Key': '<idempotency-key>'}
};
fetch('https://www.qwairy.co/api/v1/webhooks/{webhookId}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Returns a new signing secret, once. For 24 hours after the rotation, each
delivery carries two comma-separated signatures in
See Error codes for authentication, plan, idempotency and server errors. A token without write access returns
X-Qwairy-Signature: the new
one first, then the previous one. Receivers can deploy the new secret without
losing events. See Verify signatures.
Integration webhooks require an active Business, Agency Business or Enterprise plan. Changing an endpoint also requires an API token with write access enabled by an Owner or Manager. See Integration webhooks and Writing data.
Unique key for this operation, at most 255 characters. Completed responses replay for 24 hours.
Response
Returns200, the new ETag and the endpoint with its new secret.
previousSecretExpiresAt gives the time when the previous secret stops being
used. The other fields are described in
List webhook endpoints.
Synthetic request and response
curl -X POST "https://www.qwairy.co/api/v1/webhooks/$WEBHOOK_ID/rotate-secret" \
-H "Authorization: Bearer $QWAIRY_API_TOKEN" \
-H "Idempotency-Key: webhook-rotate-001"
{
"id": "eeeeeeee-0000-4000-8000-000000000000",
"url": "https://hooks.example.com/qwairy",
"description": "Production receiver",
"events": ["run.completed", "run.failed"],
"brandIds": [],
"enabled": true,
"disabledReason": null,
"failingSince": null,
"previousSecretExpiresAt": "2026-10-13T10:00:00.000Z",
"version": 2,
"createdAt": "2026-10-12T09:00:00.000Z",
"updatedAt": "2026-10-12T10:00:00.000Z",
"secret": "synthetic-new-signing-secret"
}
Errors
| Status | Code | Cause |
|---|---|---|
404 | RESOURCE_NOT_FOUND | The endpoint is missing or belongs to another team |
409 | IDEMPOTENCY_CONFLICT | The key was reused with a different request |
403 API_KEY_READ_ONLY. On 429, honor Retry-After. If the write limiter is unavailable or writes are suspended, the request returns 503 SERVICE_UNAVAILABLE and nothing changes.
