Send an email (Postmark dialect)
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.
PostmarkServerTokenX-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- body
A Postmark /email body. From and To are required, and so is one of HtmlBody or TextBody (else 422).
From*stringA bare address or "Display Name <address@domain>".
To*stringOne or more recipients, COMMA-SEPARATED in a single string (Postmark's own convention).
Cc?stringComma-separated.
Bcc?stringComma-separated.
Subject*stringRequired in practice: Sendly has no template mapping here, so a message without a subject is refused with 422.
HtmlBody?stringPreferred over TextBody when both are sent.
TextBody?stringReplyTo?stringOnly the address is used.
Headers?array<>Attachments?array<>Tag?stringBecomes a single tag, stripped to [a-zA-Z0-9_-] and cut to 64 characters.
MessageStream?stringAccepted and ignored.
TrackOpens?booleanAccepted and ignored.
TrackLinks?stringAccepted and ignored.
Email queued
application/json- response
Postmark's send success body.
To*stringThe request's To string echoed back, or "" if it was not a string.
SubmittedAt*stringdate-timeMessageID*stringThe id of the queued email for the first recipient.
uuidErrorCode*00Message*"OK""OK"curl -X POST 'https://api.sendly.now/api/compat/postmark/email' \ -H 'Content-Type: application/json' \ -d '{ "From": "string", "To": "string", "Subject": "string"}'{ "To": "string", "SubmittedAt": "2019-08-24T14:15:22Z", "MessageID": "b00f6a43-1bdc-4bbc-ad5d-b5c0d7272191", "ErrorCode": 0, "Message": "OK"}