SDP Email SDP EmailDocs

Send Email

Send a single email using the Resend-compatible endpoint.

POST /emails

The sending domain must already have outbound sending active in SDP Email.

Building with Laravel? Follow the Laravel quickstart to use this endpoint through Laravel Mail.

Example

curl -X POST "https://email.sdp-platform.com/emails" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Acme <[email protected]>",
    "to": ["[email protected]"],
    "subject": "Hello world",
    "html": "<p>It works from SDP Email.</p>"
  }'

Response

{
  "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}

Body Parameters

Parameter Type Required Description
from string Yes Sender address. The domain must belong to the API key's company.
to string or string[] Yes Recipient address or addresses.
subject string No Email subject.
html string Required without text HTML body.
text string Required without html Plain text body. If omitted, text is derived from html.
cc string or string[] No Carbon copy recipients.
bcc string or string[] No Blind carbon copy recipients.
reply_to string or string[] No Reply-To recipients.
headers object No Custom headers. Reserved message headers are ignored.
attachments array No Base64-encoded attachments.

Attachments

Attachments use base64 content:

{
  "attachments": [
    {
      "filename": "invoice.pdf",
      "content": "JVBERi0xLjQK...",
      "content_type": "application/pdf"
    }
  ]
}

filename and content are required for each attachment.

Replying in a Thread

Use the headers field to add an email to an existing conversation.

Send In-Reply-To with the ID of the message you are answering, and References with the IDs of the earlier messages in the conversation, oldest first, separated by spaces:

{
  "subject": "Re: Order 1042",
  "headers": {
    "In-Reply-To": "<[email protected]>",
    "References": "<[email protected]> <[email protected]>"
  }
}
  • To reply to an email you received, use its Message-ID.
  • To follow up on an email you sent through the API, add your sending domain to the returned id: <[email protected]>. Wait until the first email has been sent.
  • Keep the subject the same, usually with a Re: prefix. Some mail apps start a new conversation when it changes.
  • Replies to an address without a mailbox, such as noreply@, can go to a mailbox through reply_to. When a customer replies, your original email appears in that mailbox's conversation and its Sent folder.
  • Send from the same address as the earlier messages. Conversations are kept per mailbox.

A header without a readable message ID is rejected with a 422 response.

Reserved Headers

The API ignores custom values for headers that are derived from the request or generated by SDP Email:

from, to, cc, bcc, subject, message-id, reply-to,
content-type, mime-version, content-transfer-encoding