# Add a webhook endpoint; the signing secret is returned once

`POST /cms/webhooks` · Rivier · content

Add a webhook endpoint; the signing secret is returned once.

- Scope: content:admin
- Graphql: Mutation.contentWebhookCreate
- Sdk: content.webhook.create
- Cli: content webhook create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "format": "uri"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 20
    }
  },
  "required": [
    "url"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/cms/webhooks' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://example.com"
}'
```
