transactionalEmails

Send a transactional email

Send a transactional email to one or more recipients, either using inline HTML content or a pre-built template via templateId. You can schedule emails for future delivery using scheduledAt (UTC, up to 5-minute delay), send multiple personalized versions with messageVersions (max 2000 total recipients, 99 per version), and attach files via URL or base64-encoded content. A sender and subject are required when no templateId is provided; when a templateId is used, the template''s sender and subject are applied unless overridden.

post/smtp/email

Request

  • Base URL: https://api.brevo.com/v3
  • URL: https://api.brevo.com/v3/smtp/email
  • Auth: API key in header api-key

Request body

batchIdstring

UUIDv4 identifier for the scheduled batch of transactional emails. If omitted, a valid UUIDv4 batch identifier is automatically generated.

headersobject

Custom email headers (non-standard headers) to include in the email. The sender.ip header can be set to specify the IP address used for sending transactional emails (dedicated IP users only). Header names must use Title-Case-Format (words separated by hyphens with the first letter of each word capitalized). Headers not in this format are automatically converted. Standard email headers are not supported. Example: {"sender.ip":"1.2.3.4", "X-Mailin-custom":"some_custom_value", "IdempotencyKey":"abc-123"}

htmlContentstring

HTML body content of the email. Required when templateId is not provided. Ignored when templateId is provided.

paramsobject

Key-value pairs for template variable substitution. Only applicable when the template uses the New Template Language format.

scheduledAtstring date-time

UTC date-time when the email should be sent (format: YYYY-MM-DDTHH:mm:ss.SSSZ). Include timezone information in the date-time value. Scheduled emails may be delayed by up to 5 minutes.

subjectstring

Email subject line. Required when templateId is not provided.

tagsstring[]

Array of tags for categorizing and filtering emails

templateIdinteger

Template identifier

textContentstring

Plain text body content of the email. Ignored when templateId is provided.

Response

Transactional email sent successfully

messageIdstring

Message ID of the transactional email sent

messageIdsstring[]

Changes

No recorded changes to this operation across all 1 revision of this API.