# Create a webhook registration by event topic

## Register your endpoint to receive Connectly webhook events

{% openapi src="/files/LdqvmsnffW8xCzUNRie9" path="/v1/businesses/{businessId}/create/webhooks" method="post" %}
[service.swagger.json](https://1088238995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTPnSja6RkBiRLGAbuXVJ%2Fuploads%2FGkhAuF7tSYsiugcJYFSd%2Fservice.swagger.json?alt=media\&token=9ac13a48-9a6b-4aa0-88fa-413ca4286d49)
{% endopenapi %}

{% openapi src="/files/LdqvmsnffW8xCzUNRie9" path="" method="post" %}
[service.swagger.json](https://1088238995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTPnSja6RkBiRLGAbuXVJ%2Fuploads%2FGkhAuF7tSYsiugcJYFSd%2Fservice.swagger.json?alt=media\&token=9ac13a48-9a6b-4aa0-88fa-413ca4286d49)
{% endopenapi %}

You can provide your endpoint to receive Connectly webhook events.\
When creating an endpoint you need to provide the following:

1. your endpoint address
2. webhook topic you are interested to receive events from

You can only register one endpoint address per each webhook topic.

## Examples

To register your endpoint to receive client messages, you can send a post request to the above URL with:

```
{
    "topic":"messages",
    "address":"<YOUR_ENDPOINT>"
}

```

Later when clients message back, you will receive a payload similar to the following:

```
{u'sender': {u'channelType': u'whatsapp', u'id': u'+12223334444', u'name': u'Tom'}, u'timestamp': u'1661301940', u'buttonResponse': {u'text': u'Yes I'm interested', u'id': u'01GB6MZR50BY04MDAQH6TVYN40', u'payload': u'1'}, u'topic': u'messages', u'recipient': {u'channelType': u'whatsapp', u'id': u'+15556667777', u'name': u'Business'}, u'metadata': None}
```

## Available topics

| Topic            | Description                                                                                                                                                                                                                                               |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| messages         | <p>Subscribes you to receive WhatsApp messages from your clients<br><br>{"timestamp":"1640203838", "sender":{"id":"+16044441111", "channelType":"whatsapp"}, "recipient":{"id":"+16041112222", "channelType":"whatsapp"}, "message":{"text":"hello"}}</p> |
| delivery\_status | <p>Subscribes you to receive WhatsApp delivery status updates. These events tell you the transmission status of your message:<br><br>- delivered<br>- read<br>- delivery\_failed</p>                                                                      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.connectly.ai/message-api/webhook-api/webhookservice/create-a-webhook-registration-by-event-topic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
