POST Send an email to a single recipient
POST /messaging/email/v1
Operation ID: sendEmail. Tags: Messaging - Email.
Renders and sends an email to a single recipient using the specified send definition.
Parameters
sendDefinitionId(query, string, required) The unique ID of the send definition.
Pattern: ^[a-zA-Z0-9]+.Example
0XBWs000000ugHVOAY
Request body (required)
Media type: application/json. Schema: object.
individualId(string, required) The unique recipient identifier in Data 360, in the formIndividual__dlm/{id}.
Example:Individual__dlm/user-001.attributes(object, required) The personalization data for the message. Keyed by the Apex class name defined in the CMS content. The key must match the class name exactly.Additional properties:
object.The field-value pairs passed to the content template, as defined by the Apex class.
Example
{ "WelcomeEmailInput": { "firstName": "John", "lastName": "Doe", "company": "Northern Trail Outfitters" } }subject(string) Overrides the subject that the content template renders for this recipient.body(string) Overrides the HTML body that the content template renders for this recipient.text(string) Overrides the plain-text body that the content template renders for this recipient.
Example
{
"individualId": "Individual__dlm/user-001",
"attributes": {
"WelcomeEmailInput": {
"firstName": "John",
"lastName": "Doe",
"company": "Northern Trail Outfitters"
}
}
}
Responses
- 200
Email sent successfully
Media type:
application/json. Schema:object.requestId(string) The unique identifier of this send request.properties(object)deliveryId(string) The delivery tracking identifier for this message.
Example
{ "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "properties": { "deliveryId": "del_abc123xyz" } } - 400
Bad Request - A required field is missing or the request body is invalid.
Media type:
application/json. Schema:Error. - 401
Unauthorized - The authentication token is expired or invalid.
Media type:
application/json. Schema:Error. - 403
Forbidden - The feature isn’t enabled for the tenant, or the token scope isn’t sufficient to perform the action.
Media type:
application/json. Schema:Error. - 404
Not Found - The send definition specified in the request wasn’t found.
Media type:
application/json. Schema:Error. - 429
Too Many Requests - The request was rate limited. Implement an exponential backoff strategy before retrying the request.
Media type:
application/json. Schema:Error.