Send email
AuthorizationBearer <Relevate API key>Relevate API key scoped to the operation's product and environment.
Idempotency-Key?|1 to 200 characters. The same key with the same body returns the first answer instead of sending again; with a different body it's a 409. Without one, every request is a new email.
application/json- body
One email. Send it again with the same Idempotency-Key header and you
get the first answer back instead of a second email.
attachments?array<>Up to 10 files, 10 MB in total. Executable file types are refused.
bcc?null||array<string>cc?null||array<string>from?|"Ada <ada@yourdomain.com>" or "ada@yourdomain.com": an address on
one of your verified domains. Required, unless the template has a sender.
headers?Your own X- headers, like {"X-Entity-Ref": "order-1234"}. A
sign-in code can also go in OTP-Token, so mail apps can fill it in:
{"OTP-Token": "\"123456\"; origin=\"https://example.com\""}, on a
service email to one recipient.
html?|The HTML body.
message_class?|service (the default) or marketing. Taken from the template when
one is used.
purpose_id?|What the email is for, like password_reset. api when left out, or
template:<alias> for a template.
reference?|Your own reference, up to 200 characters; a filter in /emails/query.
reply_to?null||array<string>scheduled_at?|Deliver at this time instead of now, up to 30 days ahead. Change it
with PATCH /emails/{email_id}; cancel with DELETE.
date-timesubject?|Required without a template; leave it out when sending one.
tags?array<>Up to 20 labels for your own bookkeeping, like
{"name": "category", "value": "password_reset"}. Returned on the
email and in every webhook about it, and a filter in /emails/query.
template?null|text?|The plain-text body. Made from html when left out.
to*|array<string>One address or up to 50, all named in the To header of the one email.
Marketing email takes exactly one; use /email/emails/batch for many people.
topic_id?|A marketing email's topic. Whoever it goes to must be on the topic: subscribed, or not opted out of a topic that includes everyone.
The email was accepted for durable processing.
application/json- response
accepted_at*stringdate-timeapi_version*stringid*stringThe email's ID.
reason_code*stringrecipients*array<>replayed?boolean|nullscheduled_at?|When delivery starts, for a scheduled send.
date-timestate*stringtags*array<>thread_id?string|nulltopic_id?string|nullcurl -X POST 'https://api.relevate.app/email/emails' \
-H 'Content-Type: application/json' \
-d '{
"to": "string"
}'{ "accepted_at": "2019-08-24T14:15:22Z", "api_version": "string", "id": "string", "reason_code": "string", "recipients": [ { "address": "string", "copy": "string", "eligible_for_processing": true, "provider": "string", "provider_message_id": "string", "reason_code": "string", "recipient_send_id": "string", "state": "string" } ], "replayed": true, "scheduled_at": "2019-08-24T14:15:22Z", "state": "string", "tags": [ { "name": "string", "value": "string" } ], "thread_id": "string", "topic_id": "string"}