Hoppa till innehållet

Create a signing secret

POST/v1/webhooks/{id}/secrets

TypeScript sendora.webhooks.createSecret(webhookId)

Python sendora.webhooks.create_secret(webhook_id)

PHP $sendora->webhooks->createSecret($webhookId)

Java sendora.webhooks().createSecret(webhookId)

Key sk_… a server key

Adds a second live secret to the webhook and answers its value once; it is never shown again. From then on every delivery carries one signature per live secret, the newest first, so the receiver can switch to the new secret and the old one can be deleted. A webhook holds at most two live secrets.

Parameters

  • idin pathstring (uuid)required

    The webhook id.

Responses

Every field of a response is always present. A field that can be null says so in its type.

201The new secret, its value shown this once.

Example

{
  "secretId": "5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e",
  "createdAt": "2026-09-20T12:00:00.000Z",
  "secret": "whsec_0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d"
}
  • secretIdstring (uuid)
  • createdAtstring (date-time)
  • secretstring

    The secret itself, shown this once.

Errors

Every error answers error, the code, and message, a sentence for a person. A code that adds fields is shown in full below the table.

CodeStatusMeaning
unauthorized401The key is missing, malformed or revoked.
wrong_token_kind403The key is of the other kind: a server key (sk_) where an account key (ak_) is needed, or the reverse. The message names the kind the operation takes.
not_for_connections403A connected app called an operation that no tool of the MCP server calls. An API key can.
read_only_connection403A connected app may only read here: the account is read only through a connection, and a live server takes changes only if the person allowed them when connecting.
test_server_only403A connected app may create a secret, or do what cannot be undone, on a test server only.
not_found404No such webhook of this server.
secret_limit409The webhook already holds two live secrets: one in use and one to roll to. Delete one before creating another.
  • WWW-Authenticateheader on 401"Bearer"

    Always Bearer: send the key as Authorization: Bearer <key>.

secret_limit

Example

{
  "error": "secret_limit",
  "message": "The webhook may hold at most 2 live secrets; delete one before creating another.",
  "max": 2
}
  • maxintegerrequired

    Live secrets a webhook may hold at once.