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.

Authorization

PostmarkServerToken
X-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.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

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

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/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"
}
{
  "ErrorCode": 0,
  "Message": "string"
}
{
  "ErrorCode": 0,
  "Message": "string"
}
{
  "ErrorCode": 0,
  "Message": "string"
}
{
  "ErrorCode": 0,
  "Message": "string"
}
{
  "ErrorCode": 0,
  "Message": "string"
}
{
  "ErrorCode": 0,
  "Message": "string"
}
{
  "ErrorCode": 0,
  "Message": "string"
}