# Rotate the signing secret (old one keeps verifying for 24h)

Source: https://docs.usetone.ai/reference/integrations/rollSecret

> 🔴 During the overlap `x-tone-signature` carries SEVERAL space-delimited signatures, and a verifier that treats the header as one string starts rejecting everything.

`POST /v1/integrations/webhooks/{id}/roll-secret`
🔴 During the overlap `x-tone-signature` carries SEVERAL space-delimited signatures, and a verifier that treats the header as one string starts rejecting everything. Accept the delivery if ANY of them matches. Deploy the new secret within the 24 hours.

Requires the `admin` scope.

## Parameters

| Name | In | | Meaning |
|---|---|---|---|
| `id` | path | required | The webhook endpoint's id. |

## Response

| Field | Type | | Meaning |
|---|---|---|---|
| `previousValidUntil` | string | required | When the old secret stops being sent alongside it — 24 hours out. RFC 3339, UTC. |
| `secret` | string | required | The new secret. Start accepting it now. |

### Example response

```json
{
  "data": {
    "previousValidUntil": "2026-08-25T09:14:22Z",
    "secret": "whsec_8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f"
  }
}
```
