> ## Documentation Index
> Fetch the complete documentation index at: https://docs.telepatia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Rotate a webhook signing secret

> Copy into Cursor/Claude/Copilot to scaffold a POST /v1/webhooks/{webhook_id}/rotate-secret integration.

Drop this prompt into your AI coding assistant. It already includes the contract, auth, and error envelope so the generated code matches the production API.

<CodeGroup>
  ```text Prompt theme={null}
  You are integrating Telepatia Synapse Public API.

  Endpoint: POST /v1/webhooks/{webhook_id}/rotate-secret
  Base URL: https://scribe-api.telepatia.ai
  Auth: Authorization: Bearer ${SYNAPSE_API_KEY}

  Request:
  - webhook_id [path]: string (required)

  Success 200:
  - id: string
  - url: string
  - name?: string
  - events: array<WebhookEventName>
  - event?: string
  - isActive: boolean
  - signingSecretPrefix?: string
  - signingSecretVersion?: integer
  - createdAt?: string
  - updatedAt?: string
  - deletedAt?: string
  - signingSecret: string

  Errors (envelope: { error: { type, code, message, param? } }):
  - 401: authentication_required
  - 403: permission_denied
  - 404: resource_not_found
  - 503: service_unavailable

  Generate code in the language of the current file that:
  1. Reads SYNAPSE_API_KEY from env (do not hardcode it).
  2. Calls the endpoint with typed request and response.
  3. Maps the error envelope to typed exceptions per status code.
  4. Adds one happy-path test using the Bearer token.
  ```

  ```bash curl theme={null}
  curl -X POST https://scribe-api.telepatia.ai/v1/webhooks/{webhook_id}/rotate-secret \
    -H "Authorization: Bearer $SYNAPSE_API_KEY"
  ```
</CodeGroup>
