prawnwire Developers

Send an email

Send a message from a verified domain to one or more recipients.

POST/v1/email

Authentication

Use Authorization: Bearer <key> with the email:send scope. X-Postmark-Server-Token and X-Prawnwire-Server-Token are also accepted.

Use a live key to send, or a test key to validate without queueing. The From domain must be verified on your organization and hosted on Prawnwire.

Body parameters

Send one JSON object. The combined UTF-8 bodies and decoded attachments can contain at most 10 MiB (10,485,760 bytes). There can be at most 50 unique recipients.

FieldDescription
FromstringRequiredOne address, optionally with a display name, on a verified domain hosted by Prawnwire for your organization.
TostringRequiredComma-separated addresses. At least one To recipient. At most 50 unique addresses across To, Cc and Bcc; addresses are lowercased and deduplicated in that order.
CcstringOptionalComma-separated carbon-copy recipients, included in the recipient limit.
BccstringOptionalComma-separated blind-copy recipients, included in the recipient limit. Not exposed to other recipients in the message headers.
SubjectstringOptionalUp to 2,000 characters. Defaults to an empty string.
HtmlBodystringOne body requiredHTML body. Provide a nonempty HtmlBody, TextBody, or both. UTF-8 body bytes count toward the message size limit.
TextBodystringOne body requiredPlain-text body. Include it alongside HTML for clients that prefer plain text.
ReplyTostringOptionalA valid address list for replies. Use this field, not a custom Reply-To header.
TagstringOptionalUp to 1,000 characters. Use a stable label to filter activity.
MetadataobjectOptionalUp to 10 fields. Keys are 1 to 20 characters; values are at most 80 characters. Strings are recommended. Numbers and booleans are converted to strings; objects, arrays and null values are refused.
HeadersarrayOptionalObjects with Name and Value strings. Names contain 1 to 100 ASCII letters, digits or hyphens. Values are one line, up to 1,000 characters. Reserved headers are refused.
AttachmentsarrayOptionalObjects with Name, base64 Content, optional ContentType and ContentID. Bodies plus decoded attachments must fit within 10 MiB (10,485,760 bytes).
MessageStreamstringOptionalOnly outbound is supported. Omit it or use "outbound". Another value returns ErrorCode 1235.
TrackOpensbooleanIgnoredAccepted but ignored. Open tracking is not implemented.

See Attachments for content fields and forbidden extensions, and Headers and metadata for reserved headers.

Response

HTTP 200 and ErrorCode: 0 mean accepted. To echoes the supplied To string, SubmittedAt is the submission time in UTC, and MessageID is the UUID to keep for activity lookups.

The server writes the email’s Message-ID as <uuid@from-domain> and writes its Date. The API’s MessageID is the UUID part. These headers cannot be replaced.

Partial suppression

The server queues the non-suppressed recipients and says OK. Not sent to suppressed recipients: ... in Message. To is still the original To field; do not treat it as a list of recipients actually sent to.

If every recipient is suppressed, nothing is queued and ErrorCode 406 is returned. If the remaining recipients do not fit the allowance, the message is refused with 405.

Errors

Invalid fields return ErrorCode 300. A missing verified From domain returns 400; a verified but unhosted domain returns 401. Authentication, scope, rate, allowance, attachment, and stream errors are listed in Errors.

There is no documented idempotency key. If a connection ends after submission, check activity before resending to avoid duplicate mail.

Search documentation

Type to search the documentation.