# Create webhooks id rotate

Mint a fresh signing secret for one subscription and answer it in full — the second and last place a secret leaves this service. The previous secret stopped verifying the moment this returned, so the receiver has to be updated before the next event reaches it. 503 when the service has no field key. Admin only.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/webhooks/{id}/rotate`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {},
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "note": "string",
    "secret": "string",
    "webhook": {
      "authHeaderName": "string",
      "authKind": "string",
      "createdAt": "string",
      "createdBy": 1,
      "description": "string",
      "events": [
        "string"
      ],
      "id": "",
      "name": "string",
      "secretHint": "string",
      "secretRotatedAt": "string",
      "status": "string",
      "updatedAt": "string",
      "url": "string"
    }
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
