Rotate webhook secret
curl --request POST \
--url https://api.insightchain.ai/v1/webhooks/{id}/rotate_secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"overlap_seconds": 3600
}
'import requests
url = "https://api.insightchain.ai/v1/webhooks/{id}/rotate_secret"
payload = { "overlap_seconds": 3600 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({overlap_seconds: 3600})
};
fetch('https://api.insightchain.ai/v1/webhooks/{id}/rotate_secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "1edb8d98-ebf5-4a96-a656-527295500433",
"webhook": {
"id": "9a561de2-c35a-46ed-896b-ec30572b8b83",
"url": "https://example.com/insightchain-webhook",
"events": [
"recommendation"
],
"active": false,
"last_delivery_at": null,
"last_delivery_status": null,
"created_by": "352c0d6b-a387-436c-9dcb-6ae0fe61237c",
"created_at": "2026-11-21T16:04:19.590469+00:00",
"updated_at": "2026-11-21T16:04:19.623646+00:00",
"secret_rotated_at": "2026-11-21T16:04:19.623+00:00",
"previous_secret_expires_at": null
},
"secret": "shown-once-example-value",
"previous_secret_expires_at": null
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}Webhooks
Rotate webhook secret
A new signing secret, in this response only. With overlap_seconds the old secret keeps signing beside the new one until the window ends. 30 endpoint changes an hour per organization (429 above).
Key scope: approve. Module: alerts. The key’s creator must be an organization admin now.
POST
/
v1
/
webhooks
/
{id}
/
rotate_secret
Rotate webhook secret
curl --request POST \
--url https://api.insightchain.ai/v1/webhooks/{id}/rotate_secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"overlap_seconds": 3600
}
'import requests
url = "https://api.insightchain.ai/v1/webhooks/{id}/rotate_secret"
payload = { "overlap_seconds": 3600 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({overlap_seconds: 3600})
};
fetch('https://api.insightchain.ai/v1/webhooks/{id}/rotate_secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "1edb8d98-ebf5-4a96-a656-527295500433",
"webhook": {
"id": "9a561de2-c35a-46ed-896b-ec30572b8b83",
"url": "https://example.com/insightchain-webhook",
"events": [
"recommendation"
],
"active": false,
"last_delivery_at": null,
"last_delivery_status": null,
"created_by": "352c0d6b-a387-436c-9dcb-6ae0fe61237c",
"created_at": "2026-11-21T16:04:19.590469+00:00",
"updated_at": "2026-11-21T16:04:19.623646+00:00",
"secret_rotated_at": "2026-11-21T16:04:19.623+00:00",
"previous_secret_expires_at": null
},
"secret": "shown-once-example-value",
"previous_secret_expires_at": null
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}Authorizations
Body
application/json
Response
OK