Send Message

Overview

This API can be used to send email/sms/push/ivr types of messages. This API accepts payload, does basic validation and processes messages asynchronously. For 'email/sms/ivr' channels 'from' addresses must be whitelisted before using this API. Please contact eGain Support for whitelisting.

Scope

Client application must have 'app.conversation.notificationmgr.interaction.manage' scope assigned.

SecurityoAuthClient
Request
Request Body schema: application/json

SendMessage

One of:
channel
required
string [ 1 .. 255 ] characters

Name of channel on which message needs to be sent

messageId
string [ 1 .. 255 ] characters

Unique id of message from client.

template
string [ 1 .. 255 ] characters

Internally saved content template that can be used in the outbound message in lieu of the content provided in the payload body or other content field. eGain KB article id, could optionally be used if available. Notify connect to eGain KB to fetch template and use it as content.

language
type
string [ 1 .. 255 ] characters

Type of the message

category
string [ 1 .. 255 ] characters

The category of the message

origin
string [ 1 .. 255 ] characters

The origin of the message

originId
string [ 1 .. 255 ] characters

An id eGain's customer can use to identify the message to its origin entity

Array of objects (MessageParam) [ 1 .. 25 ] items

Array of parameters which can be used as macro values in content.

expirationDate
string <date-time>

If message delivery keeps failing due to some temporary error, then message is marked expired after this time and never retried again.

sendAt
string <date-time>

A scheduled date/time to submit the message in the future. Date can't be more than 7 days in future.

simulated
boolean

A flag that allows the processing all the way through the Notify platform except that it does not send it out.

required
object
Responses
202

Accepted

207

Some message accepted , some rejected

400

Bad Request

401

Unauthorized

500

Internal server error

post/messages
Request samples
application/json
{
  • "channel": "email",
  • "messageId": "ad3e8271-2bd5-4489-b23b-c70a43058813",
  • "email": {
    },
  • "messageParam": [
    ]
}
Response samples
application/json
{
  • "accepted": {
    }
}