Rotate a webhook subscription's signing secret
POST
/api/v1/vendor/webhooks/{id}/rotate-secret
const url = 'https://api-omni.linra.net/api/v1/vendor/webhooks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rotate-secret';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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-omni.linra.net/api/v1/vendor/webhooks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rotate-secret \ --header 'Authorization: Bearer <token>'Generates a new server-side signing secret and returns it in THIS response ONLY — the previous secret stops verifying signatures immediately. Requires the Orders capability.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Responses
Section titled “Responses”The new secret (shown once).
Media typeapplication/json
object
state
required
string
payload
required
details
object
payload
required
object
subscriptionId
string format: uuid
secret
Shown EXACTLY ONCE.
string
Example
{ "state": "SUCCESS"}Your token doesn’t carry the capability this endpoint requires.
Media typeapplication/json
object
state
required
string
payload
details
object
Examples
ExamplemissingCapability
{ "state": "FORBIDDEN_CAPABILITY_NOT_GRANTED", "payload": null, "details": { "requiredCapability": "Orders" }}Unknown subscription id.
Media typeapplication/json
object
state
required
string
payload
details
object
Examples
ExamplenotFound
{ "state": "NOT_FOUND_VENDOR_WEBHOOK_SUBSCRIPTION", "payload": null, "details": {}}Too many requests. Retry after the Retry-After header (seconds).
Media typeapplication/json
object
state
required
string
payload
details
object
Example
{ "state": "NOT_FOUND_VENDOR_OFFER"}Headers
Section titled “Headers”Retry-After
integer
Seconds to wait before retrying.