POST emails/sendTransactional
Send a transactional email to a limited number of contacts in a single call. Transactional emails contain information that completes a transaction or process the recipient has started with you. This endpoint should never be used to send marketing emails. To include suppressed contacts, be sure to use the ignoreContactSuppression flag. NOTE: This endpoint must be enabled for your account before use. Please contact support for access.
Parameters
Name | Type | Description |
---|---|---|
email * | object |
Email object. See emails/save for object structure.
|
contacts | array |
Array of contact objects. See contacts/save for object structure. Duplicates (either by contactID or email address) will be ignored (first occurrence will be used). Existing contacts will be updated with data provided.
5
|
contactIDs | array[integer] |
Array of contactIDs.
1000
|
transactionalCategory | string | Name of a Transactional Category (i.e. "Order Confirmation" or "Password Reset"). Used for grouping transactional emails for reporting purposes. If the value provided does not match any existing category names, a new category will be created. |
ignoreContactSuppression | boolean |
Allows suppressed contacts to receive the email. Transactional emails are intended to complete a transaction or process the recipient has started.
0
|
Response Data
Name | Type | Description |
---|---|---|
emailID | integer | ID of email record |
contacts | array | Array of objects containing keys for "success" (1 or 0) and "contact". Contact is simply the contact data that was originally passed in with the contactID appended. If success = 0, a reason is provided. e.g. [{"success": 1, "contact": {"contactID": 1772977, "email": "test@emfluence.com"}}, {"success": 0, "reason": "Duplicate", "contact": {"contactID": 1772977, "email": "test@emfluence.com"}} |
Permissions
Method requires the Send Mail permission
Example Calls
Successful send
Custom field on contact is set and variable is used in body of email.
Successful send without a template
When not using a template, set htmlVersionEditable=1 and set htmlVersion to the full HTML document
Duplicate recipients
Call succeeds, even though one of the recipients failed as a duplicate.
Invalid recipient
Call fails because the recipient email is invalid.