Skip to content
New to this? Read the Send Email guide.

Send an email

POST
/v2/email
curl --request POST \
--url https://api.connect.ms/v2/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "sender": "hello@example.com", "recipient": "hello@example.com", "subject": "example", "content": { "html": "example", "text": "example" }, "template": { "name": "example", "data": { "additionalProperty": "example" } }, "format": "html", "kind": "transactional", "clientReference": "example", "clientTag": "example", "scheduledAt": "2026-04-15T12:00:00Z", "trackOpens": true, "bypassSuppressions": true, "attachments": [ { "filename": "example", "contentType": "example", "content": "example" } ] }'

Sends one email now or at scheduledAt, with the body given directly or rendered from a stored template. The response is the email with its current status; later changes are reported by email.* events and webhooks.

Connect-Version
string

The API version to use, for example 2026-10-01. Defaults to the version set on your API key.

Idempotency-Key
string

A unique value of up to 255 characters, so a retried request is not acted on twice. Required for keys in Strict API Mode.

An email to send. Provide exactly one of content and template.name.

Media typeapplication/json

An email to send. Provide exactly one of content and template.name.

object
sender
required

The address to send from, up to 256 characters. Its domain must be one of your verified sending domains, or it is the shared test sender address, which only reaches your verified test recipients.

string format: email
0 <= 256 characters /^[^@]+@[^@]+$/
recipient
required

The address to send to, up to 256 characters.

string format: email
0 <= 256 characters /^[^@]+@[^@]+$/
subject
required

The subject line, up to 256 characters.

string
0 <= 256 characters
content
One of:

The body to send. Cannot be combined with template.name.

object
html

The HTML body, or MJML when format is mjml. Liquid merge fields are rendered with template.data.

string
nullable
text

A plain-text alternative. Liquid merge fields are rendered with template.data.

string
nullable
template
One of:

A stored template to render, or merge data for rendering the content fields.

object
name

The name of a stored email template to render. Cannot be combined with content.

string
nullable 0 <= 64 characters
data
One of:

A JSON object.

object
key
additional properties
format
One of:

The format of the html body: html, or mjml (compiled to HTML, with your includes, before sending).

string
Allowed values: html mjml
kind
One of:

The kind of email: transactional (service messages, the default), marketing (promotional, subject to marketing opt-outs) or authentication (one-time codes).

string
Allowed values: transactional marketing authentication
clientReference

Your own reference for this email, up to 64 characters, returned on the email and its events.

string
nullable 0 <= 64 characters
clientTag

A grouping tag for usage reporting, up to 64 characters. Stored in lower case with anything other than letters and digits replaced by hyphens.

string
nullable 0 <= 64 characters
scheduledAt

When (UTC, ISO 8601) to send the email: more than 5 minutes and less than 3 months ahead. If not specified, the email is sent as soon as sending limits allow; not available with the shared test sender.

string format: date-time
nullable
trackOpens

Track when the email is opened. Defaults to false.

boolean
nullable
bypassSuppressions

Send even if the recipient is on the suppression list. Defaults to false; a connected app cannot set it to true.

boolean
nullable
attachments

Files to attach. Up to 30000000 bytes in total once decoded.

Array<object>

A file to attach.

object
filename
required

The file name shown to the recipient, up to 255 characters.

string
contentType
required

The MIME type of the file, e.g. application/pdf, up to 255 characters. The type sent to the recipient is worked out from the file name.

string
content
required

The file contents, base64 encoded.

string

The email was accepted; the body shows its current status. The Location header holds its URL.

Media typeapplication/json

An email. The same shape is returned by every email endpoint and carried by email.* events.

object
id
required

The unique id of the email.

string
kind
required
One of:

The kind of email: transactional (service messages, the default), marketing (promotional, subject to marketing opt-outs) or authentication (one-time codes).

string
Allowed values: transactional marketing authentication
sender
required

The address the email was sent from.

string
recipient

The address the email was sent to. Null when the caller may not see recipients.

string
nullable
subject

The subject line. Null when the caller may not see content.

string
nullable
content
One of:

What is kept of the body after sending.

object
html

The HTML body. Not kept after sending, so always null.

string
nullable
text

A plain-text excerpt of the body, up to 2000 characters, taken from the text body or extracted from the HTML.

string
nullable
status
required
One of:

The email status: queued (accepted or scheduled, not yet handed over for delivery), sent (handed over, awaiting the outcome), delivered (accepted by the recipient’s mail server), failed (see reason) or cancelled.

string
Allowed values: queued sent delivered failed cancelled
reason
One of:

Why an email failed or did not reach the inbox.

object
category
required
One of:

Why an email failed or did not reach the inbox: hard_bounce (the address does not exist or refuses mail), soft_bounce (a temporary problem at the recipient’s server; the email may still arrive), complaint (the recipient reported it as spam), suppressed (the address is on the suppression list), rejected (refused before sending) or failed (any other failure).

string
Allowed values: hard_bounce soft_bounce complaint suppressed rejected failed
code
required

The specific error code in snake_case, e.g. hard_bounce or spam_complaint.

string
description

Details of the problem, such as what the recipient’s mail server said, or null when nothing useful was recorded.

string
nullable
retryable
required

True when sending the email again later may succeed.

boolean
clientReference

Your own reference for this email, as supplied when it was sent.

string
nullable
clientTag

The grouping tag for usage reporting, as stored when the email was sent (lower case, letters, digits and hyphens).

string
nullable
openCount
required

How many times the email’s tracking image has been loaded. Stays 0 unless trackOpens was set.

integer format: int32
createdAt
required

When (UTC) the email was created.

string format: date-time
scheduledAt

When (UTC) the email was asked to send, or null when no send time was given. Sending limits can delay an email beyond this time.

string format: date-time
nullable
sentAt

When (UTC) the email was handed over for delivery, or null if not yet recorded. Can still be null in the send response moments after handover.

string format: date-time
nullable
deliveredAt

When (UTC) the recipient’s mail server accepted the email, or null if not delivered.

string format: date-time
nullable
openedAt

When (UTC) the email was first opened, or null if never.

string format: date-time
nullable
updatedAt
required

When (UTC) the email last changed.

string format: date-time

Example

{
"kind": "transactional",
"status": "queued",
"reason": {
"category": "hard_bounce"
}
}

The request is not valid. The detail field says why, and errors lists any problems by field name.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

The API key or bearer token is missing or not valid, or the request signature could not be verified.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

The caller is not allowed to do this, or sending is blocked for the workspace (sending_blocked).

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

A request with this Idempotency-Key is still being processed. Retry after the Retry-After header.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

This Idempotency-Key was already used for a different request. Use a new key.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

This API key requires an Idempotency-Key header on every POST and PATCH.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

A rate limit was reached. Retry after the Retry-After header when one is given.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

The email could not be queued right now. Retry after the Retry-After header.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}