Send Broadcast Message

Broadcast template messages to your contacts

The Send Broadcast Message method is used if you wish to send the same message to a group of your contacts. You must ask your admin to generate a session key for the specific channel in order to send the message.

post
Header parameters
X-USER-TOKENstringRequired

The secret key provided by iSlash for accessing the iSlash API platform

Body
sessionstringRequired

The session key generated by your admin for controlling which channel is allowed to send message across API

namestringRequired

The name of this broadcast, e.g. Marketing for Winter Sale

template_namestringRequired

The template message name in system Please find it in the iSlash platform

scheduled_atanyRequired

At what time will this message be sent in the format of YYYY-MM-DD HH:MM:SS. (e.g. 2022-01-01 15:00:00)

variable_1anyOptional

[Optional] depend on the template

$name: customer name in system

Or free text

**Make sure it contains no newlines, tabs, or more than 4 consecutive spaces

variable_2anyOptional

[Optional] depend on the template

$name: customer name in system

Or free text

**Make sure it contains no newlines, tabs, or more than 4 consecutive spaces

variable_3anyOptional

[Optional] depend on the template

$name: customer name in system

Or free text

**Make sure it contains no newlines, tabs, or more than 4 consecutive spaces

button_url_variable_1stringOptional

[Optional] Depends on the template, either set in here or in each contact.

Free text **Make sure it contains no newlines, tabs, or more than 4 consecutive spaces

mediafileOptional

[Optional] Depends on the template, image/video/document

attach_label_idstringOptional

[Optional] The label ids that will be attached after the broadest message being sent. To attach multiple labels, use “,” to separate. E.g. 1,2,3

See the list of available labels from the Labels API

assign_tostringOptional

[Optional] The email address of the iSlash user that will be assigned to after the broadcast is sent

contacts[i][first_name]stringOptional

First name of the contact

**i is the array index number, starting from 0

contacts[i][last_name]stringOptional

Last name of the contact

**i is the array index number, starting from 0

contacts[i][identity]stringOptional

The target contact number (i.e.: 85256872847)

**i is the array index number, starting from 0

contacts[i][variable_1]stringOptional

[Optional] Depends on the template, either set in here or in each contact.

**i is the array index number, starting from 0

contacts[i][button_url_variable _1]stringOptional

[Optional] Depends on the template, either set in here or in each contact.

**i is the array index number, starting from 0

Responses
200
Success
application/json
post
POST /api/public/broadcast HTTP/1.1
Host: {islash_api_endpoint}
X-USER-TOKEN: text
Content-Type: application/json
Accept: */*
Content-Length: 391

{
  "session": "text",
  "name": "text",
  "template_name": "text",
  "scheduled_at": null,
  "variable_1": null,
  "variable_2": null,
  "variable_3": null,
  "button_url_variable_1": "text",
  "media": null,
  "attach_label_id": "text",
  "assign_to": "text",
  "contacts[i][first_name]": "text",
  "contacts[i][last_name]": "text",
  "contacts[i][identity]": "text",
  "contacts[i][variable_1]": "text",
  "contacts[i][button_url_variable _1]": "text"
}
200

Success

{
  "meta": {
    "code": "text",
    "message": "text"
  },
  "data": {}
}
Sample Response
{
    "meta": {
        "code": "RESP_OKAY",
        "message": "Success",
        "trace_id": "040a6b96021b02e3"
    },
    "data": []
}

Last updated