# Rotate the secret ad-hoc `webhook_url` deliveries are signed with; shown once

POST /v1/org/webhook-secret/rotate: Rotate the secret ad-hoc `webhook_url` deliveries are signed with; shown once

```http
POST /v1/org/webhook-secret/rotate
```

|  |  |
|---|---|
| Operation id | `rotateOrgWebhookSecret` |
| Key scope | `admin`: admin keys only |
| Section | [Organisation](https://docs.kaab.ist/reference/api#organisation) |

## Request body

object

## Example request

```bash
curl -X POST "https://api.kaab.ist/v1/org/webhook-secret/rotate" \
  -H "Authorization: Bearer $KAAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Responses

### 200

Signing secret

| Field | Type | Required | Description |
|---|---|---|---|
| `object` | `"webhook_signing_secret"` | yes |  |
| `secret` | string | yes |  |
| `previous_secret_expires_at` | string or null (date-time) | yes |  |
| `created_at` | string (date-time) | yes |  |

## Errors

Every error answers with the [error envelope](https://docs.kaab.ist/reference/api/schemas/error-response); its `code` is one of the [error codes](https://docs.kaab.ist/reference/codes#errors).

| Status | When |
|---|---|
| 400 | `request_invalid`: request validation failed |
| 401 | Missing or invalid API key |
| 402 | `insufficient_credits`: top up to continue |
| 403 | The key's scope does not cover this operation |
| 409 | Conflicting state (see `error.code`) |
| 422 | Semantically invalid request (see `error.code`) |
| 429 | Rate limited; see `Retry-After` |
| 500 | `internal`: unexpected server error |
