Send a transactional mailing to a contact
post
/services/rest/connect/v1.4/contacts/{id}/sendMailing
Request
Path Parameters
-
id: integer
The unique identifier of the contact.
Root Schema : schema
Type:
Show Source
object
-
chat(optional):
object chat
The chat used to trigger the transactional mailing.
-
incident(optional):
object incident
The incident used to trigger the transactional mailing.
-
mailing:
object mailing
The mailing to be sent.
-
opportunity(optional):
object opportunity
The opportunity used to trigger the transactional mailing.
-
scheduledTime(optional):
string(date-time)
The date and time when the mailing should be sent. If the scheduled time is not specified, the mailing is sent immediately.
Nested Schema : chat
Type:
object
The chat used to trigger the transactional mailing.
Nested Schema : incident
Type:
object
The incident used to trigger the transactional mailing.
Nested Schema : opportunity
Type:
object
The opportunity used to trigger the transactional mailing.
Response
Default Response
Examples
You can send transactional mailing to a contact at a scheduled time using the REST API. Use POST with the following syntax to send a mailing:
https://your_site_interface/services/rest/connect/version/contacts/contact_id/sendMailing
The request has the parameters shown in the following table.
Parameter | Description |
---|---|
mailing |
Required. ID of the mailing. |
incident or opportunity |
Incident or opportunity ID. You cannot use both. |
scheduledTime |
Time when the mailing will be sent, in ISO-8601 format. If scheduledTime is not specified, the mailing will be sent immediately. |
Request URI example
https://mysite.example.com/services/rest/connect/v1.4/contacts/1/sendMailing
Request body example
{
"mailing": {id": 123},
"incident": {"id": 12},
"scheduledTime": "2016-02-28T04:00:00Z"
}
Response example
The status 200 OK
is returned, indicating that the mailing has been scheduled.