Send Notification on XCALLY Motion (version 2.5.0 - 2.5.
1819)
You can send a notification to an agent or a group of agents authenticated on the web interface by using the following API endpoint:
Code Block | ||||
---|---|---|---|---|
| ||||
POST /api/notifications |
PARAMETERS
text | The content of the notification |
TemplateId | Id of the template used as the notification's content |
view | View object used to render the selected template |
senderName | The name of the sender (optional). Default: the name of the user sending the notification. |
recipients | Array of recipients as string (see details) |
recipientsDescription | Description of recipients that will be displayed in the notification title (optional) |
beep | Enable/Disable audio notification. Default: false |
Info | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
The following models are supported:
|
EXAMPLES
Sending a simple text notification
Code Block | ||||
---|---|---|---|---|
| ||||
POST https://{host}/api/notifications { "text": "Hello!", "recipients": "[{\"model\": \"user\", \"ids\": [1]}]", "beep": false } |
Code Block | ||||
---|---|---|---|---|
| ||||
curl http://{host}/api/notifications -d '{"text": "Hello!", "recipients": "[{\"model\": \"user\", \"ids\": [1]}]", "beep": "false"}' -v -u {name}:{password} -H "Content-Type: application/json" |
Using a template
Code Block | ||||
---|---|---|---|---|
| ||||
POST https://{host}/api/notifications { "TemplateId": 1, "view": {"content": "Hello!"}, "recipients": "[{\"model\": \"team\", \"ids\": [1]}, {\"model\": \"voiceQueue\", \"ids\": [2,3]}]", "recipientsDescription": "Group of agents", "beep": true } |
Code Block | ||||
---|---|---|---|---|
| ||||
curl https://{host}/api/notifications -d '{"TemplateId": "1", "view": {"content": "Hello!"}, "recipients": "[{\"model\": \"team\", \"ids\": [1]}, {\"model\": \"voiceQueue\", \"ids\": [2,3]}]", "recipientsDescription": "Group of agents", "beep": "true"}' -v -u {name}:{password} -H "Content-Type: application/json" |
Send Notification on XCALLY Motion (version 2.5.20 onwards)
You can send a notification to an agent or a group of agents authenticated on the web interface by using the following API endpoint:
Code Block | ||||
---|---|---|---|---|
| ||||
POST /api/userNotifications |
PARAMETERS
text | The content of the notification |
TemplateId | Id of the template used as the notification's content |
view | View object used to render the selected template |
senderName | The name of the sender (optional). Default: the name of the user sending the notification. |
recipients | Array of recipients as string (see details) |
recipientsDescription | Description of recipients that will be displayed in the notification title (optional) |
beep | Enable/Disable audio notification. Default: false |
Info | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
The following models are supported:
|
EXAMPLES
Sending a simple text notification
Code Block | ||||
---|---|---|---|---|
| ||||
POST https://{host}/api/userNotifications { "text": "Hello!", "recipients": "[{\"model\": \"user\", \"ids\": [1]}]", "beep": false } |
Code Block | ||||
---|---|---|---|---|
| ||||
curl http://{host}/api/userNotifications -d '{"text": "Hello!", "recipients": "[{\"model\": \"user\", \"ids\": [1]}]", "beep": "false"}' -v -u {name}:{password} -H "Content-Type: application/json" |
Using a template
Code Block | ||||
---|---|---|---|---|
| ||||
POST https://{host}/api/userNotifications { "TemplateId": 1, "view": {"content": "Hello!"}, "recipients": "[{\"model\": \"team\", \"ids\": [1]}, {\"model\": \"voiceQueue\", \"ids\": [2,3]}]", "recipientsDescription": "Group of agents", "beep": true } |
Code Block | ||||
---|---|---|---|---|
| ||||
curl https://{host}/api/userNotifications -d '{"TemplateId": "1", "view": {"content": "Hello!"}, "recipients": "[{\"model\": \"team\", \"ids\": [1]}, {\"model\": \"voiceQueue\", \"ids\": [2,3]}]", "recipientsDescription": "Group of agents", "beep": "true"}' -v -u {name}:{password} -H "Content-Type: application/json" |