---
title: "Rotate a webhook secret"
method: POST
path: "/v3/webhooks/rotate-secret/{id}"
tags: ["Webhook Notifications"]
---

# Rotate a webhook secret

`POST /v3/webhooks/rotate-secret/{id}`

Update the webhook secret value for a destination. The previous value will immediately stop being used and the new value will take over.

### Webhook notification header

Every webhook notification Nylas sends includes the `x-nylas-signature` header. Depending on the SDK you're using, you might see `X-Nylas-Signature` instead.

## Path parameters

- `id` string, required

## Response `200`

Webhook Secret Updated

- object
  - `data` object
    - `id` string — A unique identifier for the webhook destination.
    - `description` string — A human-readable description of the webhook destination.
    - `trigger_types` string[] — The event that triggers the notification. See the [notification schemas](/docs/reference/notifications/) for details about each trigger type. See the [Grants](/docs/reference/api/manage-grants/), [Calendar](/docs/reference/api/calendar/), [Events](/docs/reference/api/events/), and [Messages](/docs/reference/api/messages/) references for information on how to trigger each event type.
    - `webhook_url` string — The URL to send webhooks to.
    - `webhook_secret` string — A secret value used to encode the `x-nylas-signature` header on webhook requests.
    - `status` 'active' | 'pause' | 'failing' | 'failed' — The status of the new destination.
    - `notification_email_addresses` string[] — The email addresses that Nylas notifies when a webhook is down for a while. See [Failing and failed webhooks](/docs/v3/notifications/#failing-and-failed-webhooks) for details.
  - `request_id` string — The request ID for each request.

## Other responses

- `400` — Notification channel not deleted

---

[API](https://skmtc.dev/nylas/apis/nylas-api.md) · [All operations](https://skmtc.dev/nylas/apis/nylas-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nylas/nylas-api/revisions/51c2c1b4ecff/schema)
