The Lynked Public API is in development. Endpoints will appear here as they go live.

Rotate a subscription's secret

POST
/webhooks/{id}/rotate-secret

Replaces 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

  • id integer required

    The subscription id.

Responses

  • 200 OK The new secret. WebhookSecret
    Show fields
    • secret string required

      Signs 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
    • message string required

      What went wrong, in English. The text may change; use error_code in your code.

    • error_code string

      Stable 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_uid string required

      Identifier 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
    • message string required

      What went wrong, in English. The text may change; use error_code in your code.

    • error_code string

      Stable 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_uid string required

      Identifier 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
    • message string required

      What went wrong, in English. The text may change; use error_code in your code.

    • error_code string

      Stable 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_uid string required

      Identifier 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
    • message string required

      All problems in one line.

    • errors object required

      Request field path → its problems.

    • error_uid string required

      Identifier 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
    • message string required

      What went wrong, in English. The text may change; use error_code in your code.

    • error_code string

      Stable 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_uid string required

      Identifier 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
    • message string required

      What went wrong, in English. The text may change; use error_code in your code.

    • error_code string

      Stable 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_uid string required

      Identifier of this error in Lynked's logs. Quote it when you contact Lynked support.

Request
curl -X POST 'https://api.lynked.ie/api/public/v1/webhooks/{id}/rotate-secret' \
  -H 'Authorization: Bearer lk_live_...'
Response 200 OK
{
  "secret": "whsec_3k9QpX2vT7bYwL5mR8nZ1cH4jF6dG0sA9uE2iO7qW3x"
}