Compatibility

Send an email, SendGrid-shaped

POST/v3/mail/sendrequires email:send

The same send as POST /v1/emails, at the path and in the body shape a SendGrid client already uses. Each personalization becomes one message, so a payload addressed to three queues three. categories become tags, send_at becomes scheduled_for, and dynamic_template_data becomes variables; a SendGrid dynamic template id (d-…) names a template that lives in SendGrid, so it is refused. Answers 202 with an empty body and the id in X-Message-Id, as SendGrid does.

Requestcurl -X POST https://api.transmit.dev/v3/mail/send \
  -H "Authorization: Bearer tr_v2_…" \
  -H "Content-Type: application/json" \
  -d '{
       "personalizations": [
         {
           "to": [
             {
               "email": "you@example.com"
             }
           ]
         }
       ],
       "from": {
         "email": "hello@yourdomain.com"
       },
       "subject": "It arrived.",
       "content": [
         {
           "type": "text/plain",
           "value": "Nobody noticed."
         }
       ]
     }'

Body

FieldTypeNotes
personalizations requiredobject[]at most 50
from requiredobject
reply_toobject
subjectstring
contentobject[]
attachmentsobject[]
template_idstring
headersobject
categoriesstring[]
send_atinteger-9007199254740991–9007199254740991

Responses

StatusMeaning
202Queued. X-Message-Id carries the first id, X-Message-Ids all of them.
401The API key is missing, malformed, expired or revoked
403The API key lacks the email:send scope
422The request failed validation, or names something we will not silently ignore

Every response body is described in the OpenAPI spec, which this page is generated from.