# Registering Webhooks

Receive Web Hook notifications, register your webhook endpoint. Please provide a publicly accessible HTTPS URL to your webhook endpoint.

### <mark style="color:green;">`POST`</mark> `/webhooks/receipt`

Used to register for [Delivery Receipt](/archived-docs/registering-webhooks/delivery-receipt-notification.md) notifications.

{% tabs %}
{% tab title="Curl" %}

```hsts
curl -X POST \
"https://api.mobivatebulksms.com/webhooks/receipt" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [API Key]' \
-d '{ "url": "https://your.domain.com/endpoint" }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer [API Key]',
}

json_data = {
    'url': 'https://your.domain.com/endpoint',
}

response = requests.post('https://api.mobivatebulksms.com/webhooks/receipt', headers=headers, json=json_data)

# Note: json_data will not be serialized by requests
# exactly as it was in the original request.
#data = '{ "url": "https://your.domain.com/endpoint" }'
#response = requests.post('https://api.mobivatebulksms.com/webhooks/receipt', headers=headers, data=data)
```

{% endtab %}
{% endtabs %}

### Incoming Messages

### <mark style="color:green;">`POST`</mark> `/webhooks/incoming`

Use to register for [Incoming Message](/archived-docs/registering-webhooks/incoming-message-notification.md) notifications.

{% tabs %}
{% tab title="Curl" %}

```hsts
/curl -X POST \
"https://api.mobivatebulksms.com/webhooks/incoming" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [API Key]' \
-d '{ "url": "https://your.domain.com/endpoint" }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer [API Key]',
}

json_data = {
    'url': 'https://your.domain.com/endpoint',
}

response = requests.post('https://api.mobivatebulksms.com/webhooks/incoming', headers=headers, json=json_data)

# Note: json_data will not be serialized by requests
# exactly as it was in the original request.
#data = '{ "url": "https://your.domain.com/endpoint" }'
#response = requests.post('https://api.mobivatebulksms.com/webhooks/incoming', headers=headers, data=data)
```

{% endtab %}
{% endtabs %}

### Short URL Clicks

### <mark style="color:green;">`POST`</mark> `/webhooks/click`

Use to register for [Short URL Click](/archived-docs/registering-webhooks/short-url-click-notification.md) notifications.

{% tabs %}
{% tab title="Curl" %}

```hsts
curl -X POST \
"https://api.mobivatebulksms.com/webhooks/click" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [API Key]' \
-d '{ "url": "https://your.domain.com/endpoint" }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer [API Key]',
}

json_data = {
    'url': 'https://your.domain.com/endpoint',
}

response = requests.post('https://api.mobivatebulksms.com/webhooks/click', headers=headers, json=json_data)

# Note: json_data will not be serialized by requests
# exactly as it was in the original request.
#data = '{ "url": "https://your.domain.com/endpoint" }'
#response = requests.post('https://api.mobivatebulksms.com/webhooks/click', headers=headers, data=data)
```

{% endtab %}
{% endtabs %}

**Headers**

| Header        | Value             |
| ------------- | ----------------- |
| Content-Type  | application/json  |
| Authorization | Bearer \[API Key] |

**Body**

<table><thead><tr><th>Name</th><th width="131">Type</th><th width="111">Required?</th><th>Description</th></tr></thead><tbody><tr><td>url</td><td>string</td><td>Yes</td><td>URL to receive Delivery Receipt notifications.</td></tr></tbody></table>

**Response**

We use conventional HTTP response codes to indicate the success or failure of an API request. In general:

**2xx** indicate success\
**4xx** indicate an error that failed given the information provided (e.g., a required parameter was omitted)\
**5xx** errors indicate an error with ours servers (these are rare).

{% tabs %}
{% tab title="200" %}

```json
{
   "message":"Webhook updated successfully"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
   "code":401,
   "message":"Unauthorized"
}
```

{% endtab %}
{% endtabs %}

To see a full list of our **Response codes**, please [click here](/overview/introduction/understanding-response-codes.md).


---

# 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://wiki.mobivatebulksms.com/archived-docs/registering-webhooks.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.
