curl --request POST \
--url https://api.inkrelay.app/v1/webhooks/{id}/rotate-secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"overlapSeconds": 86400
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({overlapSeconds: 86400})
};
fetch('https://api.inkrelay.app/v1/webhooks/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.inkrelay.app/v1/webhooks/{id}/rotate-secret"
payload = { "overlapSeconds": 86400 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"disabledReason": "<string>",
"enabled": true,
"events": [
"printjob.done"
],
"failingSince": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "live",
"previousSecretExpiresAt": "2023-11-07T05:31:56Z",
"url": "https://example.com/inkrelay/webhooks",
"secret": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD"
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a",
"upgrade_url": "https://app.inkrelay.app/billing?upgrade=1"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a",
"upgrade_url": "https://app.inkrelay.app/billing?upgrade=1"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a",
"upgrade_url": "https://app.inkrelay.app/billing?upgrade=1"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a",
"upgrade_url": "https://app.inkrelay.app/billing?upgrade=1"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a",
"upgrade_url": "https://app.inkrelay.app/billing?upgrade=1"
}
}Rotate a webhook signing secret
Replaces the signing secret and returns the new one; store it now, it is never shown again. Until previousSecretExpiresAt every delivery carries two signatures, one per secret, so receivers can switch without dropping deliveries. A rotation during an overlap replaces the older secret.
curl --request POST \
--url https://api.inkrelay.app/v1/webhooks/{id}/rotate-secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"overlapSeconds": 86400
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({overlapSeconds: 86400})
};
fetch('https://api.inkrelay.app/v1/webhooks/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.inkrelay.app/v1/webhooks/{id}/rotate-secret"
payload = { "overlapSeconds": 86400 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"disabledReason": "<string>",
"enabled": true,
"events": [
"printjob.done"
],
"failingSince": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "live",
"previousSecretExpiresAt": "2023-11-07T05:31:56Z",
"url": "https://example.com/inkrelay/webhooks",
"secret": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD"
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a",
"upgrade_url": "https://app.inkrelay.app/billing?upgrade=1"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a",
"upgrade_url": "https://app.inkrelay.app/billing?upgrade=1"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a",
"upgrade_url": "https://app.inkrelay.app/billing?upgrade=1"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a",
"upgrade_url": "https://app.inkrelay.app/billing?upgrade=1"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a",
"upgrade_url": "https://app.inkrelay.app/billing?upgrade=1"
}
}Authorizations
Send Authorization: Bearer <API key>. Use an ir_test_ key in the playground; it only reaches virtual test printers.
Path Parameters
Body
Rotation options
How long deliveries stay signed with the old secret too (0 to 604800 seconds, default 1 day). 0 drops it at once.
0 <= x <= 60480086400
Response
The endpoint with its new secret
Why the endpoint is disabled: by a user, or automatically after 5 days of failures
printjob.queued, printjob.sent, printjob.received, printjob.printing, printjob.done, printjob.error, printjob.cancelled, printjob.expired, computer.online, computer.offline, printer.added, printer.removed, printer.online, printer.offline, printer.updated Start of the current run of failed deliveries; null while healthy
live, test Until this time deliveries are also signed with the secret replaced by the last rotation; null when there is none
"https://example.com/inkrelay/webhooks"
Signing secret, returned only by this response. Store it now.
"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD"
Was this page helpful?