Notifications
Want are Notifications and how to use them
What are Notifications?
Notifications are immediate, one-way messages sent to users for timely information or updates.
Want to send Notifications?
This endpoint allows you to send notifications.
Send Message
API call to Send a Notification
+27618982358Password Reset
POST /v1.1/org/{orgId}/notification HTTP/1.1
Host: www.channel360.co.za
Content-Type: application/json
Accept: */*
Content-Length: 168
{
"destination": "+27618982358",
"message": {
"type": "template",
"template": {
"name": "none_button_test",
"language": {
"policy": "deterministic",
"code": "en_US"
},
"components": []
}
}
}Password Reset
{
"notification": {
"_id": "143d860c5f45c9674687"
}
}Send Notifications with an Image
API call to Send a Notification with an Image
+27618982358Password Reset
POST /v1.1/org/orgId/notification HTTP/1.1
Host: www.channel360.co.za
Content-Type: application/json
Accept: */*
Content-Length: 347
{
"destination": "+27618982358",
"message": {
"type": "template",
"template": {
"name": "notificatio_with_an_image",
"language": {
"policy": "deterministic",
"code": "en_US"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://media.newyorker.com/photos/59095bb86552fa0be682d9d0/master/w_2560%2Cc_limit/Monkey-Selfie.jpg"
}
}
]
}
]
}
}
}Password Reset
{
"notification": {
"_id": "35d67t89c5f4779b6468"
}
}Send Notifications with Video
API call to Send a Notification with a Video and Tags
+27618982358Password Reset
POST /v1.1/org/:orgId/notification HTTP/1.1
Host: www.channel360.co.za
Content-Type: application/json
Accept: */*
Content-Length: 403
{
"destination": "+27618982358",
"message": {
"type": "template",
"template": {
"name": "nontification_with_video_and_tag",
"language": {
"policy": "deterministic",
"code": "en_US"
},
"components": [
{
"type": "header",
"parameters": [
{
"video": {
"link": "https://channel360-template-tags.s3.af-south-1.amazonaws.com/2024-02-15T13%3A47%3A46.871Z-Zendesk%2BOverview%2BDemo.mp4"
}
}
]
},
{
"type": "body",
"parameters": [
{
"text": "Sid"
}
]
}
]
}
}
}Password Reset
{
"notification": {
"_id": "35d8640c5f45c9b6468733"
}
}{
"destination":"{{mobileNumber}}",
"message":{
"type":"template",
"template":{
"name":"demowithpicture",
"language":{
"policy":"deterministic",
"code":"en"
},
"components":[
{
"type":"header",
"parameters":[
{
"type":"image",
"image":{
"link":"https://media.newyorker.com/photos/59095bb86552fa0be682d9d0/master/w_2560%2Cc_limit/Monkey-Selfie.jpg"
}
}
]
}
]
}
}
}{
"destination":"{{mobileNumber}}",
"message":{
"type":"template",
"template":{
"name":"demowithtext",
"language":{
"policy":"deterministic",
"code":"en"
},
"components":[
{
"type":"body",
"parameters":[
{
"type":"text",
"text":"John"
},
{
"type":"text",
"text":"21 Castle Street"
}
]
}
]
}
}
}Authentication Templates
For authentication message templates, the components array contains dynamic placeholders that must be populated with a unique {{AUTH_CODE}} at runtime. These placeholders ensure secure and personalised message delivery.
The {{AUTH_CODE}} should be inserted into the
parameterssection dynamically before sending.The same {{AUTH_CODE}} should be used across all relevant components (e.g., body text and buttons).
{
"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}}"
}
]
}
]
}
}
}
Override API
This feature is not fully supported and comes with risk, use your own discretion.
Message overrides (also referred to as passthrough) are a way to access newer META features that are not yet fully supported by C360.
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:
{
"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" }
]
}
]
}
}
}
}
}
Endpoint Details
HTTP Method: POST
Endpoint URL:
https://www.channel360.co.za/v1.1/org/639700347749ed00181de224/notification
Endpoint Description
The provided endpoint is used to send a WhatsApp notification to a single recipient with the specified destination phone number and message content. This can be useful for sending individual notifications or updates via WhatsApp.
Request Parameters
Headers
Content-Type: Required. Set toapplication/jsonto indicate that the request body is in JSON format.Authorization: Required. This header contains a bearer token for authentication. Replace'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'with your actual authentication token.
Request Body
The request body should be a JSON object containing the following properties:
destination: Required. The phone number of the recipient in international format (e.g.,+27656225667).message: Required. An object representing the WhatsApp message to be sent. It contains the following properties:type: Required. Set to"template"to indicate that you are sending a template message.template: Required. An object defining the template message with the following properties:name: Required. The name of the template.language: Required. An object specifying the language for the template with the following properties:policy: Required. Set to"deterministic"to define the language policy.code: Required. The language code (e.g.,"en_US").
components: An array of message components. You can define message components within this array.
Response
The response from this endpoint will contain information about the status of the WhatsApp notification sent. You can access the response data in the .then block of your Axios request as shown in your code:
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});// Some code
Rate Limit
Channel360 is subject to rate limiting to maintain system stability and prevent abuse, spam, denial-of-service attacks, and related concerns. The rate limit for Channel360 is set at 10 messages per second. If this limit is exceeded, Channel360 will respond with a 429 Too Many Requests HTTP status code. Our aim is to establish rate limits that are sufficiently high to accommodate normal usage patterns while minimizing the likelihood of encountering limits. However, occasional spikes in usage may occur, making it unavoidable to encounter a rate limit.
To ensure uninterrupted service and prevent production outages, we recommend implementing 429 retry logic using exponential backoff and jitter when making API calls to Channel360. This approach involves progressively increasing the waiting time between retries, incorporating randomness to avoid synchronization issues. By following this retry strategy, you can handle rate limit responses effectively and maintain a smooth integration with Channel360.
Last updated
Was this helpful?