Send
This operation is part of the Email API section of the Web Services API.
Overview
Sends an outbound email.
The agent can perform this operation after creating a new outbound reply email.
Request URL | /api/v2/me/emails/{id} |
---|---|
HTTP Method | POST |
Required Features | api-multimedia |
Parameters
Parameter | Value |
---|---|
operationName | Send |
queueName | The job queue for handling the send operation. (required) |
Specified data with email parameters. (required) | |
saveLAR | Possible values are true or false. If true, information about the agent performing the operation is set in the Contact Profile so that it can be used for last agent routing. (optional) |
Email Parameters
Parameter | Value |
---|---|
subject | A summary of the text. |
bodyAsPlainText | The actual message to send. Plain text body |
body | The actual message to send. Html body |
mime | Multipurpose internet mail extensions. (optional) |
to | One or more target email addressses. (requered) |
from | The email’s displayed address or origin. (requered) |
cc | The address you would like “copied” to the email. When there are multiple addresses, they must be comma delimited. (optional) |
bcc | The address you would like “blind copied” to the email. When there are multiple addresses, they must be comma delimited. (optional) |
Sample
Request
POST api/v2/me/emails/0071023821aec011 { "operationName": "Send", "queueName": "Forwarde-mails", "email": { "body": "Feelslikegood.", "to": [ "qwerty@gplus-w2k3-gf80", "bruce.one@witcher.xyz" ], "from": "htcc@gplus-w2k3-gf80", "subject": "HelloEmail" } }
or
POST api/v2/me/emails/0071023821aec011 { "operationName": "Send", "queueName": "Forwarde-mails", "email": { "body": "Feelslikegood.", "to": [ "qwerty@gplus-w2k3-gf80", "bruce.one@witcher.xyz" ], "cc": [ "alan.key@bestbuy.com" ], "bcc": [ "brad.johnson@bestbuy.com" ], "from": "htcc@gplus-w2k3-gf80", "subject": "HelloEmail" } }
Response
{ "statusCode": 0 }
Notification
Here are the list of notifications received after send new message
Notification with new message
{ "referenceId": 26, "notificationType": "StatusChange", "messageType": "EmailStateChangeMessage", "email": { "body": "Feelslikegood.", "userData": { "DISP_KEY": "resolved", "UserData2": 123456789, "UserData1": "DATA1" }, "from": "htcc@gplus-w2k3-gf80", "uri": "http: //localhost: 8080/api/v2/email/01QG9WAK37H38024", "capabilities": [ ], "to": [ "qwerty@gplus-w2k3-gf80", "bruce.one@witcher.xyz" ], "state": "Sent", "mime": "text/html", "id": "01QG9WAK37H38024", "subject": "HelloEmail" } }
This page was last edited on January 22, 2016, at 19:56.
Comments or questions about this documentation? Contact us for support!