> ## Documentation Index
> Fetch the complete documentation index at: https://docs.osis.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a webhook

> POST /api/v1/comms/webhooks — register an HTTPS endpoint for events.

Register a public HTTPS endpoint to receive Comms events.

**Scope:** `comms_webhooks`

## Request

```bash theme={null}
curl -X POST "https://osis.co/api/v1/comms/webhooks" \
  -H "Authorization: Bearer $COMMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://hooks.yourapp.com/comms",
    "events": ["message.received", "message.sent"]
  }'
```

### Body parameters

<ParamField body="url" type="string" required>
  HTTPS URL that accepts POST requests.
</ParamField>

<ParamField body="events" type="string[]" required>
  Event names to subscribe to (for example `message.received`, `message.sent`).
</ParamField>

## Response

**201 Created**

```json theme={null}
{
  "webhook": {
    "id": "wh_…",
    "url": "https://hooks.yourapp.com/comms",
    "events": ["message.received", "message.sent"]
  }
}
```

## See also

* [Webhooks guide](/guides/webhooks)
* [List webhooks](/messages-api/list-webhooks)
