# Register an https endpoint. The signing secret is returned once

`POST /webhooks/endpoints` · Rivier · keys

Register an https endpoint. The signing secret is returned once.

- Scope: keys:admin
- Sdk: keys.webhook.create
- Cli: keys webhook create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "test": {
      "type": "boolean"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "maxLength": 500
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 80
      },
      "maxItems": 100
    },
    "description": {
      "type": "string",
      "maxLength": 200
    }
  },
  "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/webhooks/endpoints' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://example.com"
}'
```
