Sending Email
This page covers conversational email — one-to-one messages inside a conversation. For bulk newsletters, see Email Campaigns.
There are a few supported ways to send conversational email through the API, and choosing the right one matters — especially when you need attachments.
Required scopes
| Scope | Purpose |
|---|---|
messages:create | Send email messages |
channels:read | Look up channel and sender options |
Option 1 — Send a message (recommended)
POST /api/v1/messages is the unified send endpoint used by every channel. For email, it sends into the conversation and reuses the conversation's subject.
curl -X POST "https://api.sendseven.com/api/v1/messages" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{
"conversation_id": "conv_email_99",
"text": "Thanks for reaching out — we have received your inquiry and will respond within 24 hours.",
"message_type": "text"
}'
An outbound email needs a subject. Provide one with a subject field, or send into a conversation that already has a subject — SendSeven reuses it (prefixed with Re: for replies). Without either, the send is rejected with EMAIL_SUBJECT_REQUIRED.
# First message on a new email conversation — include the subject
curl -X POST "https://api.sendseven.com/api/v1/messages" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{
"conversation_id": "conv_email_99",
"subject": "Your inquiry",
"text": "Hello! Here is the information you asked for.",
"message_type": "text"
}'
This is the path that supports attachments.
Option 2 — Reply to an inbound email
When a customer has emailed you and you want to reply within that thread (preserving In-Reply-To / References headers, CC list, and quoted history), reply to the specific inbound email message:
curl -X POST "https://api.sendseven.com/api/v1/email-integrations/email-messages/em_12345/reply" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{
"text_body": "Happy to help — here are the next steps.",
"html_body": "<p>Happy to help — here are the next steps.</p>",
"reply_all": false,
"preserve_cc": true
}'
| Field | Type | Description |
|---|---|---|
text_body / html_body | string | Reply body (plain and/or HTML) |
cc_emails / bcc_emails | array | Additional recipients |
preserve_cc | bool | Auto-include the original CC recipients (default true) |
reply_all | bool | Reply to all original recipients |
to_emails | array | Explicit recipient override |
subject_override | string | Override the reply subject (default Re: <original>) |
include_thread_history | bool | Append quoted prior thread beneath the reply |
attachment_ids | array | Attachments to include — see Attachments |
sender_id | string | Sender override from sender-options |
This path also supports attachments.
Option 3 — Compose a new email in a conversation
To start a brand-new outbound email (rather than reply to an inbound message) while controlling the subject, CC/BCC and sender explicitly, use the compose endpoint:
curl -X POST "https://api.sendseven.com/api/v1/email-integrations/conversations/conv_email_99/compose-email" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{
"subject": "Your invoice",
"text_body": "Please find your invoice attached.",
"attachment_ids": ["9b3f1a8e-7c2d-4e5b-9f01-12a3b4c5d6e7"]
}'
| Field | Type | Description |
|---|---|---|
subject | string | Required subject line |
text_body / html_body | string | Body (plain and/or HTML) |
to_email | string | Explicit recipient; defaults to the contact's primary email |
cc_emails / bcc_emails | array | Additional recipients |
attachment_ids | array | Attachments to include — see Attachments |
sender_id | string | Sender override from sender-options |
This path supports attachments: attachment_ids takes the same generic attachment IDs the other paths accept, and an ID that does not resolve is rejected with 404 rather than sending the email without the file.
Overriding the sender
Both options accept a sender override. Fetch the available senders for the conversation from GET /api/v1/conversations/{id}/sender-options and pass the id as sender_id. See Mailboxes.
Email events
Outbound and inbound email produce dedicated webhook events (email.sent, email.delivered, email.bounced, email.opened, email.complained, email.received). See Webhook Events.
Next steps
- Attachments — send email with files
- Mailboxes — choose the sender identity