Omnichannel API

All endpoints require HTTP basic authorization header with Messente API username and password.

You can find the API username and password under your Account API Settings.

Sends an Omnimessage

POST https://api.messente.com/v1/omnimessage

Request Body

Body is required. Omnimessage to be sent
Property Type Info
torequired string

Phone number in e.164 format

messagesrequired array

An array of messages

Viber message content

Property Type Info
sender string

Phone number or alphanumeric sender name

validity integer

After how many minutes this channel is considered as failed and the next channel is attempted

Example: 360
text string

Plaintext content for Viber

image_url string

URL for the embedded image

Valid combinations:

1) image_url,

2) text, image_url, button_url, button_text

button_url string

URL of the button, must be specified along with ''text'', ''button_text'' and ''image_url'' (optional)

button_text string

Must be specified along with ''text'', ''button_url'', ''button_text'', ''image_url'' (optional)

channelrequired string

The channel used to deliver the message

Possible values:
  • viber
Default: viber

SMS message content

Property Type Info
textrequired string

Text content of the SMS

Example: Hello world!
sender string

Phone number or alphanumeric sender name

validity integer

After how many minutes this channel is considered as failed and the next channel is attempted

Example: 360
autoconvert string

Defines how non-GSM characters will be treated:

  • "on" Use replacement settings from the account's API Auto Replace settings page (default)
  • "full" All non GSM 03.38 characters will be replaced with suitable alternatives
  • "off" Message content is not modified in any way
Possible values:
  • full
  • on
  • off
udh string

hex-encoded string containing SMS UDH

channelrequired string

The channel used to deliver the message

Possible values:
  • sms
Default: sms

WhatsApp message content. Only one of "text", "image", "document" or "audio" can be provided

Property Type Info
sender string

Phone number or alphanumeric sender name

validity integer

After how many minutes this channel is considered as failed and the next channel is attempted

Example: 360
text object

A text

Property Type Info
preview_url boolean

Whether to display link preview if the message contains a hyperlink

Default: true
bodyrequired string

Plaintext content for WhatsApp, can contain URLs, emojis and formatting

image object

An image

Property Type Info
caption string

Description for the image

contentrequired string

Base64-encoded image

document object

A document

Property Type Info
caption string

Description for the document

contentrequired string

Base64-encoded image

audio object

A sound

Property Type Info
contentrequired string

Base64-encoded audio

channelrequired string

The channel used to deliver the message

Possible values:
  • whatsapp
Default: whatsapp
dlr_url string

URL where the delivery report will be sent

Format: url
text_store string

Whether to store message content as is (plaintext), as a hashed value (sha256) or not at all (nostore)

Possible values:
  • nostore
  • plaintext
  • sha256
time_to_send string

Optional parameter for sending messages at some specific time in the future. Time must be specified in the ISO-8601 format. If no timezone is specified, then the timezone is assumed to be UTC

Examples:

  • Time specified with timezone: 2018-06-22T09:05:07+00:00 Time specified in UTC: 2018-06-22T09:05:07Z
  • Time specified without timezone: 2018-06-22T09:05 (equivalent to 2018-06-22T09:05+00:00)
Format: date-time

Successful Response

HTTP 201 - Omnimessage success response
Property Type Info
messagesrequired array

List of messages that compose the omnimessage

A message part of an omnimessage

Property Type Info
message_idrequired string

Unique identifier for the message

Format: UUID
channelrequired string

Defines the delivery channel

Possible values:
  • sms
  • viber
  • whatsapp
senderrequired string

Sender that was used for the message

torequired string

Phone number in e.164 format

omnimessage_idrequired string

Unique identifier for the omnimessage

Format: UUID

Error Responses

HTTP 400 - Invalid input
Property Type Info
errorsrequired array

An array of errors

A container for Omnichannel API error

Property Type Info
titlerequired string

Textual value which corresponds to an error code

Possible values:
  • Not found
  • Forbidden
  • Unauthorized
  • Invalid data
  • Internal Server Error
  • Missing data
  • Method not allowed
detailrequired string

Free form more detailed description of the error

coderequired string

Matches the following error title. This field is a constant

  • 101 - Not found
  • 102 - Forbidden
  • 103 - Unauthorized
  • 104 - Invalid data
  • 105 - Internal Server Error
  • 106 - Missing data
  • 107 - Method not allowed
sourcerequired string

Describes which field is causing the issue in the payload, null for non 400 status code responses

Retrieves the delivery report for the Omnimessage

GET https://api.messente.com/v1/omnimessage/{omnimessageId}/status

Request Parameters

Name Location Info
omnimessageIdrequired The parameter is part of the URL path
UUID of the omnimessage to for which the delivery report is to be retrieved
Type: string
Format: UUID

Successful Response

HTTP 200 - Delivery report success
Property Type Info
statusesrequired array

Contains the delivery reports for each channel, ordered by send order

A delivery report

Property Type Info
status string

The human-readable equivalent for this field is contained in "error". This value is null if the message is still being processed

Possible values:
  • ACK
  • DELIVRD
  • UNDELIV
  • FAILED
  • UNKNOWN
  • ACCEPTD
  • REJECTD
  • DELETED
  • EXPIRED
  • NACK
  • SEEN
channel string

Defines the delivery channel

Possible values:
  • sms
  • viber
  • whatsapp
message_id string

Unique identifier for the message

Format: UUID
error string

Human-readable description of what went wrong, null in case of success or if the message has not been processed yet

err integer

Machine-readable error code, 'null' when the message has not been processed yet

Matches the following meanings

  • 0 - No error
  • 1 - Delivery failure
  • 2 - Sending message expired
  • 3 - Invalid number
  • 4 - Error crediting account
  • 5 - Invalid number format
  • 6 - Too many identical messages
  • 7 - Sender name not allowed
  • 8 - Operator blacklisted
  • 9 - Unroutable
  • 10 - Seen
  • 999 - General temporary error
timestamp string

When this status was received by Omnichannel API

Format: date-time
torequired string

Phone number in e.164 format

omnimessage_idrequired string

Unique identifier for the omnimessage

Format: UUID

Error Responses

HTTP 404 - If no such message exists or you do not have access to the particular message
Property Type Info
errorsrequired array

An array of errors

A container for Omnichannel API error

Property Type Info
titlerequired string

Textual value which corresponds to an error code

Possible values:
  • Not found
  • Forbidden
  • Unauthorized
  • Invalid data
  • Internal Server Error
  • Missing data
  • Method not allowed
detailrequired string

Free form more detailed description of the error

coderequired string

Matches the following error title. This field is a constant

  • 101 - Not found
  • 102 - Forbidden
  • 103 - Unauthorized
  • 104 - Invalid data
  • 105 - Internal Server Error
  • 106 - Missing data
  • 107 - Method not allowed
sourcerequired string

Describes which field is causing the issue in the payload, null for non 400 status code responses

Cancels a scheduled Omnimessage

DELETE https://api.messente.com/v1/omnimessage/{omnimessageId}

Request Parameters

Name Location Info
omnimessageIdrequired The parameter is part of the URL path
UUID of the scheduled omnimessage to be cancelled
Type: string
Format: UUID

Successful Response

HTTP 202 - Scheduled omnimessage successfully cancelled
No response body

Error Responses

HTTP 404 - If the omnimessage has already been sent or no such message exists
Property Type Info
errorsrequired array

An array of errors

A container for Omnichannel API error

Property Type Info
titlerequired string

Textual value which corresponds to an error code

Possible values:
  • Not found
  • Forbidden
  • Unauthorized
  • Invalid data
  • Internal Server Error
  • Missing data
  • Method not allowed
detailrequired string

Free form more detailed description of the error

coderequired string

Matches the following error title. This field is a constant

  • 101 - Not found
  • 102 - Forbidden
  • 103 - Unauthorized
  • 104 - Invalid data
  • 105 - Internal Server Error
  • 106 - Missing data
  • 107 - Method not allowed
sourcerequired string

Describes which field is causing the issue in the payload, null for non 400 status code responses