---
title: "Rotate the signing secret"
method: POST
path: "/v1/webhook-endpoints/{id}/rotate-secret/"
tags: ["Webhook endpoints"]
---

# Rotate the signing secret

`POST /v1/webhook-endpoints/{id}/rotate-secret/`

## Request

- Base URL: `https://api.pdfbetter.com`
- URL: `https://api.pdfbetter.com/v1/webhook-endpoints/{id}/rotate-secret/`
- Auth: HTTP bearer

Returns a new secret, effective immediately — deploy it to your receiver right away. The old secret stops verifying.

## Path parameters

- `id` string, required

## Response `200`

Rotate the signing secret

- WebhookEndpoint
  - `object` 'webhook_endpoint', required
  - `id` string, required
  - `url` string, required
  - `description` string, nullable, required
  - `events` union[], required
    - union
      - 'signature_request.sent' | 'signature_request.viewed' | 'signature_request.signed' | 'signature_request.declined' | 'signature_request.completed' | 'signature_request.canceled' | 'signature_request.expired' | 'form.response_created' | 'document.exported' | 'bulk_job.completed' | 'workflow.run.awaiting_approval' | 'workflow.run.succeeded' | 'workflow.run.failed' | 'workflow.run.export_ready' | 'workflow.run.webhook'
      - '*'
  - `status` 'enabled' | 'disabled', required
  - `disabledReason` string, nullable, required
  - `failingSince` string, nullable, required: ISO 8601 timestamp (UTC)
  - `createdAt` string, required: ISO 8601 timestamp (UTC)
  - `updatedAt` string, required: ISO 8601 timestamp (UTC)
  - `secret` string: Signing secret — returned only when the endpoint is created or its secret rotated

## Other responses

- `400`: Invalid request (see `error.details.issues`)
- `401`: Missing or invalid API key
- `402`: Your plan doesn't include this (API access needs Business) or a monthly allowance is used up
- `403`: The API key lacks the required scope
- `404`: Not found (or not yours)
- `409`: Conflict with the current state
- `422`: Validation failed
- `429`: Rate limited — see RateLimit-* and Retry-After

---

[API](https://skmtc.dev/pdfbetter/apis/pdfbetter-api.md) · [All operations](https://skmtc.dev/pdfbetter/apis/pdfbetter-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pdfbetter/apis/pdfbetter-api/revisions/6960b18754a8?raw)
