Send a message
/v1/mailboxes/{mailbox_id}/sendIdempotency-Key is required and must contain 8–128 characters. Repeating the same key and body returns the same operation; a different body returns 409. HTTP 202 means queued. Check the operation status to determine the outcome.
Authentication and access · Errors and retries
Request
curl -X POST 'https://adapt-mail.com/v1/mailboxes/<mailbox_id>/send' \ -H 'Authorization: Bearer <access_token>' \ -H 'Idempotency-Key: message-20261019-0001' \ -H 'Content-Type: application/json' \Parameters
mailbox_idpathNecessarilyintegerX-Customer-IDheader- Option 1
stringOption 2null Idempotency-KeyheaderNecessarilystringminLength: 8maxLength: 128
Request body · application/json
object
toNecessarilyarrayAddresses of the main recipients.
minItems: 1maxItems: 50Array elementsstringccarrayCopy recipient addresses that are visible to other participants.
maxItems: 50Array elementsstringbccarrayBcc recipient addresses.
maxItems: 50Array elementsstringsubjectstringSubject of the message.
Default:
""maxLength: 998textstringThe text of the message without formatting.
Default:
""maxLength: 200000htmlHTML-formatted version of the message.
Option 1stringmaxLength: 300000Option 2nullfile_idsarrayID previously downloaded files in this mailbox. Get them when downloading or from the list of files.
maxItems: 20Array elementsstring · uuidforward_messageThe original email whose attachments need to be forwarded.
Option 1objectfolderNecessarilystringFolder name from the folder list, for example INBOX.
minLength: 1maxLength: 255uidvalidityNecessarilyintegerThe value is uidvalidity from the response API for this folder.
exclusiveMinimum: 0uidNecessarilyintegerexclusiveMinimum: 0
Unknown fields are not accepted.
Option 2nullreply_to_message_idThe message_id value of the email you are replying to.
Option 1stringmaxLength: 998Option 2nullreferencesThe value references of the original message to save the reply chain.
Option 1stringmaxLength: 4000Option 2nullsend_atDelayed dispatch time with time zone, for example 2026-11-01T12:00:00Z. Without a value, dispatch begins as the queue is processed.
Option 1string · date-timeOption 2null
Unknown fields are not accepted.
Responses
202 Successful response
application/json
object
idstring · uuidOperation ID for checking the status and canceling a pending submission.
kindstringmailbox_id- Option 1
integerOption 2null statusstringValid values:
"queued""running""succeeded""failed""uncertain""cancelled"run_atstringDate and time in UTC. If there is no offset, the value also represents UTC.
created_atstringDate and time in UTC. If there is no offset, the value also represents UTC.
completed_at- Option 1
stringDate and time in UTC. If there is no offset, the value also represents UTC.
Option 2null errorThe reason for the error if the operation did not complete successfully.
Option 1stringOption 2nullresultThe result of the operation. For sending, contains information about accepted and rejected recipients.
Option 1objectOption 2null
400 Invalid header or identifier
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray elementsobject
401 Login required
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray elementsobject
403 No access
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray elementsobject
404 Resource not found
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray elementsobject
409 State conflict
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray elementsobject
413 Size limit exceeded
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray elementsobject
422 Validation error
application/json
object
detailarrayArray elementsobjectlocNecessarilyarrayArray elementsOption 1stringOption 2integermsgNecessarilystringtypeNecessarilystring
503 Temporarily unavailable
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray elementsobject
Successful send result
Fields in the operation’s result after execution. These are not returned when the message is first queued.
object
message_idstringsmtp_acceptedbooleansent_savedbooleanaccepted_recipientsarrayArray elementsstringrejected_recipientsarrayArray elementsobjectemailstringcodeinteger