# Notifications

***

{% hint style="warning" %}
**Before sending a notification, make sure that:**

* Webhooks are configured to receive delivery events.
* The template you are using has been approved.
* You have a valid **orgId** and **API token**.

If webhooks are not configured, delivery results and user events will not be captured.
{% endhint %}

## Send Notification

Use this endpoint to send a WhatsApp template message to a single recipient.

<mark style="color:orange;">POST</mark>  `https://www.channel360.co.za/v1.1/org/{{orgId}}/notification`

### Headers

| Name          | Value             |
| ------------- | ----------------- |
| Content-type  | applications/json |
| Authorization | Bearer \<token>   |

#### Body

|                                  |                                                                                        |                                                                                      |
| -------------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| orgId                            | string<sup>r</sup><sup><mark style="color:red;">equired<mark style="color:red;"></sup> | Organization ID (path parameter)                                                     |
| destination                      | string<sup><mark style="color:red;">required<mark style="color:red;"></sup>            | Recipient phone number                                                               |
| message                          | object<sup><mark style="color:red;">required<mark style="color:red;"></sup>            | Message payload (template-based)                                                     |
| message.type                     | string<sup><mark style="color:red;">required<mark style="color:red;"></sup>            | Must be set to `template`                                                            |
| message.template                 | object<sup><mark style="color:red;">required<mark style="color:red;"></sup>            | Template message definition                                                          |
| message.template.name            | string<sup><mark style="color:red;">required<mark style="color:red;"></sup>            | The name of the template.                                                            |
| message.template.language        | object<sup><mark style="color:red;">required<mark style="color:red;"></sup>            | An object specifying the language for the template with the following properties:    |
| message.template.language.policy | string<sup><mark style="color:red;">required<mark style="color:red;"></sup>            | Set to `"deterministic"` to define the language policy.                              |
| message.template.language.code   | string<sup><mark style="color:red;">required<mark style="color:red;"></sup>            | Language code (e.g. `en_US`)                                                         |
| message.template.components      | array                                                                                  | An array of message components. You can define message components within this array. |

### Examples of templates and notifications  <a href="#endpoint-details" id="endpoint-details"></a>

**Example 1:** Notification sent using a basic text template.

{% tabs %}
{% tab title="Notification sent" %}

```json
{
    "destination": "{{mobileNumber}}",
    "message": {
        "type": "template",
        "template": {
            "name": "summer_sale_announcement",
            "language": {
                "policy": "deterministic",
                "code": "en_US"
            },
            "components": []
        }
    }
}
```

{% endtab %}

{% tab title="Template used" %}

```json

{
    "tags": {
        "head": [],
        "body": [],
        "buttons": []
    },
    "organization": "{{yourOrgId}}",
    "description": "Marketing template used to promote seasonal specials",
    "namespace": "",
    "status": "APPROVED",
    "enabled": true,
    "category": "MARKETING",
    "name": "summer_sale_announcement",
    "language": "en_US",
    "components": [
        {
            "type": "HEADER",
            "format": "TEXT",
            "text": "Summer Sale!",
            "buttons": []
        },
        {
            "type": "BODY",
            "text": "Enjoy our biggest discounts of the season! Shop your favourite items and save up to 40%. Hurry—limited time only.",
            "buttons": []
        },
        {
            "type": "FOOTER",
            "text": "Shop now",
            "buttons": []
        }
    ],
    "messageTemplateId": "841648925121429",
    "createdAt": "2025-12-11T11:31:29.913Z",
    "updatedAt": "2026-01-20T09:21:26.749Z",
    "version": 0,
    "id": "693aab91b0bdf3137d2e2896"
}
```

{% endtab %}
{% endtabs %}

**Example 2:** Notification sent using a template with header tag, body tag, footer text, and button tag.

{% tabs %}
{% tab title="Notification sent " %}

```json
{
    "destination": "{{mobileNumber}}",
    "message": {
        "type": "template",
        "template": {
            "name": "contact_confirmation",
            "language": {
                "policy": "deterministic",
                "code": "en_US"
            },
            "components": [
                {
                    "type": "header",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "Pete"
                        }
                    ]
                },
                {
                    "type": "body",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "0852345678"
                        }
                    ]
                },
                {
                    "type": "button",
                    "sub_type": "url",
                    "index": "0",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "639700347749ed00181de224"
                        }
                    ]
                }
            ]
        }
    }
}
```

{% endtab %}

{% tab title="Template used" %}

```json
{
    "tags": {
        "head": [],
        "body": [],
        "buttons": []
    },
    "organization": "{{yourOrgId}}",
    "description": "Demonstrates header, body, footer, and button tags",
    "namespace": "",
    "status": "APPROVED",
    "enabled": true,
    "category": "MARKETING",
    "name": "contact_confirmation",
    "language": "en_US",
    "components": [
        {
            "type": "HEADER",
            "format": "TEXT",
            "text": "Hello {{1}}",
            "buttons": []
        },
        {
            "type": "BODY",
            "text": "Is this your number {{1}}? We would love to give you a call!",
            "buttons": []
        },
        {
            "type": "FOOTER",
            "text": "Reply STOP to unsubscribe",
            "buttons": []
        },
        {
            "type": "BUTTONS",
            "buttons": [
                {
                    "type": "URL",
                    "url": "https://channel360.co.za/organization/{{1}}",
                    "text": "View Dashboard"
                }
            ]
        }
    ],
    "messageTemplateId": "2652754821759415",
    "createdAt": "2026-01-21T09:09:05.575Z",
    "updatedAt": "2026-01-21T09:09:39.956Z",
    "version": 0,
    "id": "697097b1b0bdf3137d2e4b8d"
}
```

{% endtab %}
{% endtabs %}

**Example 3**: Notification sent using an Afrikaans template.

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

```json
{
    "destination": "{{mobileNumber}}",
    "message": {
        "type": "template",
        "template": {
            "name": "af_kontak_met_etiket",
            "language": {
                "policy": "deterministic",
                "code": "af"
            },
            "components": [
                {
                    "type": "body",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "Pieter"
                        }
                    ]
                }
            ]
        }
    }
}
```

{% endtab %}

{% tab title="Template used" %}

```json
{
    "tags": {
        "head": [],
        "body": [],
        "buttons": []
    },
    "organization": "{{yourOrgId}}",
    "description": "Afrikaanse sjabloon met een veranderlike in die boodskap",
    "namespace": "",
    "status": "APPROVED",
    "enabled": true,
    "category": "MARKETING",
    "name": "af_kontak_met_etiket",
    "language": "af",
    "components": [
        {
            "type": "BODY",
            "text": "Hallo {{1}}, ons sal jou binnekort kontak.",
            "buttons": []
        }
    ],
    "messageTemplateId": "732552166261424",
    "createdAt": "2026-01-21T10:06:03.171Z",
    "updatedAt": "2026-01-22T09:21:27.223Z",
    "version": 0,
    "id": "6970a50bb0bdf3137d2e4bd1"
}
```

{% endtab %}
{% endtabs %}

#### What happens after sending?

When you send a notification, the API responds with a **`notificationId`**.

```json
{
    "notification": {
        "_id": "696f4f59ad414d784b450a3e"
    }
}
```

{% hint style="warning" %}
Receiving a `notificationId` only confirms that the request was sent.\
It does **not** mean the message was delivered to the user.
{% endhint %}

### Authentication Templates <a href="#endpoint-details" id="endpoint-details"></a>

{% tabs %}
{% tab title="Authentication Notification" %}
For authentication message templates, the **`components`** array contains dynamic placeholders that must be populated with a unique **{{**&#x41;UTH\_COD&#x45;**}}** at runtime. These placeholders ensure secure and personalised message delivery.

* The **{{**&#x41;UTH\_COD&#x45;**}}** should be inserted into the **`parameters`** section dynamically before sending.
* The same **{{**&#x41;UTH\_COD&#x45;**}}** should be used across all relevant components (e.g., body text and buttons).

```json
{
    "destination": "{{mobileNumber}}",
    "message": {
        "type": "template",
        "template": {
            "name": "{{templateName}}",
            "language": {
                "policy": "deterministic",
                "code": "{{language}}"
            },
            "components": [
                {
                    "type": "body",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "{{code}}"
                        }
                    ]
                },
                {
                    "type": "button",
                    "sub_type": "url",
                    "index": "0",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "{{code}}"
                        }
                    ]
                }
            ]
        }
    }
}
 
```

{% endtab %}
{% endtabs %}

### Override API <a href="#endpoint-details" id="endpoint-details"></a>

{% hint style="danger" %}
This feature is not fully supported and comes with risk, use your own discretion.
{% endhint %}

Message overrides (also referred to as passthrough) are a way to access newer META features that are not yet fully supported by C360.&#x20;

To use the override feature, you need to include an "override" object that will contain your usual payload fields instead of the message object. Here is an example:

```json
{
  "destination": "2700000000",
  "message": { "type": "text", "text": "." }, //Removed almost all fields
  "override": { // Included them in this object instead
    "whatsapp": {
      "payload": {
        "type": "template",
        "template": {
          "name": "example_template",
          "language": { "policy": "deterministic", "code": "en" },
          "components": [
            {
              "type": "header",
              "parameters": [
                {
                  "type": "image",
                  "image": {
                    "link": "https://image.jpg"
                  }
                }
              ]
            },
            {
              "type": "body",
              "parameters": [
                { "type": "text", "text": "John" },
                { "type": "text", "text": "R 499.00" },
                { "type": "text", "text": "2025-10-01" }
              ]
            }
          ]
        }
      }
    }
  }
}

```
