Give a webhook endpoint a new signing secret, returned once
const url = 'https://api.crossmart.io/api/v1/workspaces/example/webhook-endpoints/example/rotate-secret';const options = {method: 'POST', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.crossmart.io/api/v1/workspaces/example/webhook-endpoints/example/rotate-secret \ --header 'x-api-key: <x-api-key>'For 24 hours deliveries are signed with both the new and the old secret (two v1 signatures), so the receiver can switch without dropping events.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”object
object
False when turned off by someone or after repeated failures
MANUAL: turned off by someone. FAILING: turned off by Crossmart.
Failed attempts since the last delivery that went through
The latest delivery attempt, whatever event it carried; null before the first
object
SUCCEEDED: the endpoint answered 2xx. FAILED: anything else, or no answer.
Null when no response came: a timeout or a connection error
Why the attempt failed; null on success
Until then deliveries are also signed with the secret the last rotation replaced
The signing secret. Shown once; store it now.
Example
{ "endpoint": { "url": "https://example.com/crossmart/webhooks", "description": "Order notifications to n8n", "eventTypes": [ "order.created" ], "disabledReason": "MANUAL", "lastDelivery": { "outcome": "SUCCEEDED", "responseStatus": 200, "error": "The endpoint answered with HTTP 503" } }, "secret": "whsec_3q2-7wEXAMPLEsecretVALUE0123456789abcdef"}The server has no CREDENTIALS_MASTER_KEY to encrypt secrets with