Transactional

Queues one email. The response is immediate; delivery happens in the background and is reported through GET /transactional/emails/{id} and your webhook.

Idempotency. Send an Idempotency-Key header (1 to 256 characters) to make retries safe. Within 24 hours, the same key with the same body returns the original message (with an idempotent-replayed: true header); the same key with a different body is a 409 invalid_idempotent_request.

Sandbox. Send from onboarding@sendfoxmail.com with no DNS setup. It delivers only to your own account email and to the four test addresses. Test addresses never reach a mailbox and never count toward your limits; each one synthesizes an outcome so you can exercise your integration: delivered@sendfoxmail.com, bounced@sendfoxmail.com, complained@sendfoxmail.com, suppressed@sendfoxmail.com.

Limits. Transactional email has no quota of its own: every address in to, cc and bcc counts as one send against your SendFox plan, the same monthly sends your campaigns use, with no daily cap. When the plan has a cap, every response carries x-sendfox-sends-remaining, the sends left across campaigns and transactional email; a plan without an enforced cap sends no header. Past the cap, sends are refused with 429 monthly_quota_exceeded carrying remaining and requested. Each message holds at most 10 addresses across to, cc and bcc, at most 2 in bcc. Requests are limited to 5 per second and 300 per minute per key.

Custom headers. Pass headers to add list-management and threading headers. For one-click unsubscribe (RFC 8058, which Gmail and Yahoo require of bulk senders) send List-Unsubscribe with an https: URL in angle brackets and List-Unsubscribe-Post set to List-Unsubscribe=One-Click; the URL must accept a POST whose body is List-Unsubscribe=One-Click and unsubscribe the recipient without any further click. See the headers field for what is allowed.

post/transactional/emails

Request

  • Base URL
    https://api.sendfox.com
  • Auth
    OAuth 2
    Authorization codehttps://sendfox.com/oauth/authorize
    Token URLhttps://sendfox.com/oauth/token

Headers

Idempotency-Keystring

Request body

fromstring required

Sender. Either an address or a display name followed by one in angle brackets. The domain must be plain ASCII (for an internationalized domain, use its punycode form, starting xn--) and verified under Account > Domains (a subdomain of a verified domain also works), or be the sandbox sender onboarding@sendfoxmail.com, which needs no DNS but only delivers to your own account email and the test addresses (sandbox mail always shows the SendFox Onboarding display name).

tostring[] required

1 to 10 addresses. to, cc and bcc together may hold at most 10, and every address counts as one email against your plan's sends, so a message to three people uses three.

ccstring[]
bccstring[]

At most 2 addresses; counts toward the 10-address total.

reply_tostring email nullable
subjectstring required
htmlstring

HTML body, at most 500 KB (UTF-8 bytes). Send html, text, or both.

textstring

Plain-text body, at most 100 KB (UTF-8 bytes). Send html, text, or both.

tagstring nullable

A label for grouping in the dashboard, for per-tag open/click tracking switches, and for per-tag alerts. Lowercase letters, digits, dots, dashes and underscores. Messages without a tag are grouped by subject. Tags that look like authentication mail (login_code, password_reset, otp, ...) can never have tracking turned on. An account may hold at most 200 distinct tags, so tag by kind of email (receipt), not per customer or order.

headersobject nullable

Custom headers, at most 20, as {"Name": "value"}. Allowed: List-Unsubscribe, List-Unsubscribe-Post, List-Id, X-Entity-Ref-ID, References, In-Reply-To, and any other X-* header except X-SendFox-* and X-SG-*. Headers SendFox or SendGrid set (From, To, Cc, Bcc, Reply-To, Subject, Content-*, MIME-Version, Date, Message-ID, Return-Path, DKIM-Signature, Received) are refused with a 422. Names may hold letters, digits and dashes; values may hold up to 998 characters and no line breaks. List-Unsubscribe must be one or more mailto: or https: URLs in angle brackets, and List-Unsubscribe-Post must be exactly List-Unsubscribe=One-Click with an https: URL in List-Unsubscribe, as RFC 8058 requires.

Example request

{
  "from": "Acme <hello@mail.acme.com>",
  "to": [
    "jane@example.com"
  ],
  "subject": "Your login code",
  "html": "<p>Your code is <strong>483 920</strong>.</p>",
  "tag": "login_code",
  "headers": {
    "List-Unsubscribe": "<https://acme.com/unsubscribe?u=4f0c>, <mailto:unsub@acme.com>",
    "List-Unsubscribe-Post": "List-Unsubscribe=One-Click"
  },
  "attachments": [
    {
      "filename": "invite.ics",
      "content_type": "text/calendar; method=REQUEST"
    }
  ]
}

Response

Accepted and queued

idstring
statusstring

Example response

{
  "id": "tm_4f0c9b2e7d1a5c3e8b6f2a9d",
  "status": "queued"
}

Changes

    • warning

      the optional response header x-sendfox-daily-quota-remaining removed for the status 202

    • warning

      the optional response header x-sendfox-monthly-quota-remaining removed for the status 202

    • info

      added the new optional request property