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.
Client application must have 'app.conversation.notificationmgr.interaction.manage' scope assigned.
SendMessage
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 | string Language of message content. Supporte languages for IVR https://devcentral.egain.com/kb/devcentral/content/EASY-8851/Supported-Language-for-Voice-Names |
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 |
Accepted
Some message accepted , some rejected
Bad Request
Unauthorized
Internal server error
{- "channel": "email",
- "messageId": "ad3e8271-2bd5-4489-b23b-c70a43058813",
- "email": {
- "from": "from@egain.com",
- "recipient": [
- "address1@egain.com",
- "address2@egain.com",
- "adress3@egain.com"
], - "subject": "Test email",
- "content": {
- "text": "This is a test of email from ${company}"
}
}, - "messageParam": [
- {
- "attribute": "company",
- "value": "eGain"
}
]
}
{- "accepted": {
- "message": [
- {
- "id": "2a8975dd-ff28-4b97-941c-d12963219ae8",
- "recipient": "messaginghub2@gmail.com"
}, - {
- "id": "4a8975dd-ff28-4b97-941c-d12963219ae8",
- "recipient": "messaginghub4@gmail.com"
}
]
}
}