Skip to Content
SendlySendly
API ReferenceCompatibility

Send an email (Postmark dialect)

POST
/api/compat/postmark/email

Drop-in for Postmark's POST /email. Authenticate as Postmark does, with X-Postmark-Server-Token: <sendly key>. A pk_ send-only key is accepted. The key must hold emails:send.

Success is 200 with Postmark's { To, SubmittedAt, MessageID, ErrorCode: 0, Message: "OK" }. Failures are { ErrorCode, Message } with the HTTP status carried separately. There is no Idempotency-Key support on this route.

PostmarkServerToken
headerX-Postmark-Server-Token<token>

Postmark-style authentication for the /api/compat/postmark/* operations only: a Sendly API key (sk_*, or a pk_* send-only key) sent in the X-Postmark-Server-Token header, exactly where the postmark SDK puts its server token.

application/json
  1. body

A Postmark /email body. From and To are required, and so is one of HtmlBody or TextBody (else 422).

From*string

A bare address or "Display Name <address@domain>".

To*string

One or more recipients, COMMA-SEPARATED in a single string (Postmark's own convention).

Cc?string

Comma-separated.

Bcc?string

Comma-separated.

Subject*string

Required in practice: Sendly has no template mapping here, so a message without a subject is refused with 422.

HtmlBody?string

Preferred over TextBody when both are sent.

TextBody?string
ReplyTo?string

Only the address is used.

Headers?array<>
Attachments?array<>
Tag?string

Becomes a single tag, stripped to [a-zA-Z0-9_-] and cut to 64 characters.

MessageStream?string

Accepted and ignored.

TrackOpens?boolean

Accepted and ignored.

TrackLinks?string

Accepted and ignored.

Response Body

Email queued

application/json
  1. response

Postmark's send success body.

To*string

The request's To string echoed back, or "" if it was not a string.

SubmittedAt*string
Formatdate-time
MessageID*string

The id of the queued email for the first recipient.

Formatuuid
ErrorCode*0
Value in0
Message*"OK"
Value in"OK"
Example Request
curl -X POST 'https://api.sendly.now/api/compat/postmark/email' \  -H 'Content-Type: application/json' \  -d '{  "From": "string",  "To": "string",  "Subject": "string"}'
Example Response
{  "To": "string",  "SubmittedAt": "2019-08-24T14:15:22Z",  "MessageID": "b00f6a43-1bdc-4bbc-ad5d-b5c0d7272191",  "ErrorCode": 0,  "Message": "OK"}