Send Emails
Send custom outbound emails programmatically via the CiiRUS-API.
Overview
The Send Emails endpoint allows partners to programmatically send fully customized outbound emails through the CiiRUS-API. This endpoint is intended for scenarios where a partner can deliver transactional or informational messages—such as confirmations, instructions, notifications, or follow-up communications on behalf of the supplier—that are not managed or templated by the supplier from within CiiRUS.
This endpoint is write-only and does not expose any functionality to retrieve, manage, or list email templates or previously sent emails. CiiRUS acts strictly as the delivery mechanism, while the partner remains responsible for defining and triggering outbound email workflows.
Key characteristics of this endpoint include:
- Emails are fully controlled by the partner system, including subject, body content, sender name, and recipient email address.
- No CiiRUS-managed email templates are used or referenced.
- Email delivery is handled through CiiRUS's integrated transactional email service.
- The partner remains responsible for:
- Content accuracy and formatting
- Correct recipient targeting
- Compliance with applicable email regulations and policies (for example, opt-in requirements and unsubscribe handling)
This endpoint is best suited for event-driven email workflows originating in partner systems, where outbound communication must be triggered programmatically and tracked in a reliable, auditable way.
Related Supplier Configuration (Optional Context)
Outbound email delivery through this endpoint is influenced by supplier-level email configuration within the CiiRUS system. Before emails can be successfully sent, suppliers must configure and verify their outbound email settings, including authorized sender addresses and domain authentication.
- Outbound email configuration and verification
Endpoints Available
| Method | Endpoint | Description |
|---|---|---|
| PUT | v2024.07.31/emails | Send one or more outbound emails with fully custom content, recipients, and sender identity. Each request represents an email send operation initiated by the partner. |
Body Parameters
| Parameter | Required / Optional | Description | Data Type |
|---|---|---|---|
"email_content" | Required | The primary email body content to be sent. This value represents the canonical message body and is always required, even when "email_html_content" is supplied. It is used for logging, auditing, and as a fallback if HTML rendering is not supported by the recipient’s email client. | string |
"email_html_content" | Optional | An HTML-formatted version of the email body. When provided, this version may be rendered by the recipient's email client in place of "email_content". Partners are responsible for supplying valid, email-safe HTML and ensuring graceful degradation for clients that do not support HTML rendering. | string |
"email_subject" | Required | The subject line of the email as displayed in the recipient’s inbox. This should clearly and accurately describe the purpose of the message, as it is often the primary factor influencing open rates. | string |
"to_email_address" | Required | The primary recipient email address. This field should be used when sending an email to a single recipient. | string |
"to_email_addresses" | Optional | A list of additional recipient email addresses. When provided, the same email content and subject will be sent to each address in this array. Partners should not assume delivery order or grouping semantics across recipients. | array |
"from_email_address" | Required | The email body content as submitted in the request. This value is returned for transparency and debugging purposes, allowing partners to verify the exact content recorded for the send. | string |
"from_name" | Required | The human-readable sender name that is displayed alongside the sender's email address in the recipient's inbox. This value helps recipients quickly identify the source of the message. | string |
Emails send through this endpoint are delivered using the supplier's configured outbound email settings. The
"from_email_address"must be a verified sender email associated with the supplier, or the email may fail to send.
Response Definition
| Response Item | Description | Data Type |
|---|---|---|
"user_id" | The unique identifier of the authenticated CiiRUS user account associated with the API credentials used to submit the email request. This value is primarily used for internal auditing and traceability. | int |
"date_added" | The timestamp indicating when the email request was received and recorded by the CiiRUS system. This reflects when the request entered the outbound email processing pipeline. | date-time |
"date_sent" | The timestamp indicating when the email was successfully handed off to the transactional email delivery provider for sending. This should be treated as the authoritative “sent” time. | date-time |
"mandrill_message_id" | The unique message identifier returned by the underlying transactional email service. This ID can be used for delivery tracking, troubleshooting send issues, or correlating logs with provider-level events. | string |
"email_content" | The email body content as submitted in the request. This value is returned for transparency and debugging purposes, allowing partners to verify the exact content recorded for the send. | string |
"email_subject" | The subject line used for this email message send, as submitted in the request. | string |
"to_email_address" | The primary recipient email address to whom the email was sent. | string |
"from_email_address" | The sender's email address, typically representing the partner or system initiating the email. | string |
"from_name" | The name associated with the sender, providing a recognizable identity for the sender of the email. | string |
Sample Request
curl --request PUT \
--url https://api.ciiruspartners.com/v2024.07.31/emails \
--header 'Authorization: Basic {APIUsername:APIPassword}' \
--data '
[
{
"email_content": "This is some test email content, to provide context for an example request.",
"email_subject": "Test Email Subject",
"to_email_address": "[email protected]",
"from_email_address": "[email protected]",
"from_name": "Test User"
}
]
'Sample Response
[
{
"user_id": 42330,
"date_added": "2023-11-02T19:21:00.5046025Z",
"date_sent": "2023-11-02T19:21:00.5047274Z",
"mandrill_message_id": "e29cd98656cf4e5da69627b66a3a93e3",
"email_content": "This is some test email content, to provide contect for an example request.",
"email_subject": "Test Email Subject",
"to_email_address": "[email protected]",
"from_email_address": "[email protected]",
"from_name": "Test User"
}
]Updated 12 days ago
