Rotate a subscription's secret
/webhooks/{id}/rotate-secretReplaces the secret at once: the next request is signed with the new one and the old one stops working. Switch your signature check to the new secret right away.
Path parameters
idinteger requiredThe subscription id.
Responses
- 200 OK The new secret. WebhookSecret
Show fields
secretstring requiredSigns every request to this subscription (
X-Lynked-Signature). Store it like a password.
- 401 Unauthorized The API key is missing, invalid or revoked. Error
Show fields
messagestring requiredWhat went wrong, in English. The text may change; use
error_codein your code.error_codestringStable machine-readable code of the problem, for example
api_key_invalid. Present on every error that has a specific cause; see Errors for the list.error_uidstring requiredIdentifier of this error in Lynked's logs. Quote it when you contact Lynked support.
- 403 Forbidden The Public API is disabled for this business. Error
Show fields
messagestring requiredWhat went wrong, in English. The text may change; use
error_codein your code.error_codestringStable machine-readable code of the problem, for example
api_key_invalid. Present on every error that has a specific cause; see Errors for the list.error_uidstring requiredIdentifier of this error in Lynked's logs. Quote it when you contact Lynked support.
- 404 Not Found The resource does not exist or does not belong to this business. Error
Show fields
messagestring requiredWhat went wrong, in English. The text may change; use
error_codein your code.error_codestringStable machine-readable code of the problem, for example
api_key_invalid. Present on every error that has a specific cause; see Errors for the list.error_uidstring requiredIdentifier of this error in Lynked's logs. Quote it when you contact Lynked support.
- 422 Unprocessable Entity The request is invalid; `errors` lists the problems per field. ValidationError
Show fields
messagestring requiredAll problems in one line.
errorsobject requiredRequest field path → its problems.
error_uidstring requiredIdentifier of this error in Lynked's logs. Quote it when you contact Lynked support.
- 429 Too Many Requests More than 120 requests per minute for this business. Error
Headers: Retry-After
Show fields
messagestring requiredWhat went wrong, in English. The text may change; use
error_codein your code.error_codestringStable machine-readable code of the problem, for example
api_key_invalid. Present on every error that has a specific cause; see Errors for the list.error_uidstring requiredIdentifier of this error in Lynked's logs. Quote it when you contact Lynked support.
- 500 Internal Server Error Something failed on Lynked's side. Retry later; if it persists, contact Lynked support with the `error_uid`. Error
Show fields
messagestring requiredWhat went wrong, in English. The text may change; use
error_codein your code.error_codestringStable machine-readable code of the problem, for example
api_key_invalid. Present on every error that has a specific cause; see Errors for the list.error_uidstring requiredIdentifier of this error in Lynked's logs. Quote it when you contact Lynked support.
curl -X POST 'https://api.lynked.ie/api/public/v1/webhooks/{id}/rotate-secret' \
-H 'Authorization: Bearer lk_live_...'
{
"secret": "whsec_3k9QpX2vT7bYwL5mR8nZ1cH4jF6dG0sA9uE2iO7qW3x"
}