Transactional Email API

Send transactional and campaign email over HTTP. Use this API to send a single message, a batch, a pre-built template, or one message addressed to many recipients at once — then track what happened to it.

Every send is accepted, not delivered

A successful send returns 202 Accepted and a QueueId. That means we have taken the message, not that it reached the inbox. Delivery outcome comes from Check delivery status — never from the send response.

The 202 says when it goes out

data.SendType is Immediate when the email goes out now. With a ScheduleDateTime it is Scheduled, or Recurring with a Frequency; ScheduledDateTime and UtcOffset then give the time (the first send, if it repeats) and the message spells it out. A scheduled email waits until then, so it will not arrive straight after a test.

The email body must be Base64

EmailBody is Base64-encoded HTML on every endpoint that accepts one. Sending raw HTML is rejected with 422 and the message “Email body should be in base64”.

Download for AI review

Copy or download this guide as Markdown to paste into an AI assistant for help integrating against it.

Environment

You are reading the guide for the host that served this page. The badge in the header and every example below already point at it — there is nothing to substitute by hand, and no other environment's addresses appear on this page.

PropertyValue
Environment
Base URLhttps://email-dev.jirafix.net
All pathsare under /v1/email

Authentication

Every endpoint needs a bearer token, and this host does not issue one. Exchange your credentials at the Authenticate API — on this environment that is https://authenticate-dev.jirafix.net — then send what it returns as Authorization: Bearer <access_token> on each request here.

Keep your credentials on your server

Credentials embedded in a browser page or a mobile app are published credentials — anyone can read them and send mail as you. Request the token from your own backend and never ship it to a client.

POST https://authenticate-dev.jirafix.net/v1/token

Exchanges your credentials for an access token.

Tokens last 3600 seconds by default. Request a new one when it expires — there is no separate refresh call, though the response does include a refresh_token. Full detail is on the Authenticate guide at https://authenticate-dev.jirafix.net/docs.

Parameters

NameTypeRequiredDescription
usernamestringYesThe account's username, usually an email address.
passwordstringYesThe account's password. Server-side only.
privatetokenstringYesYour account's private token, from the portal's configuration section. Note the spelling — one word, all lower case.
validityintegerNoHow long the token should last, in seconds. Defaults to 3600.

Responses

StatusMeaning
200Returns access_token, refresh_token, token_type and expires_in.
400The body was missing or a required field was absent.
401The username, password or private token was not accepted.
# 1. get a token from the Authenticate host
ACCESS_TOKEN=$(curl -s -X POST https://authenticate-dev.jirafix.net/v1/token \
  -H "Content-Type: application/json" \
  -d '{"username":"you@yourcompany.com","password":"'"$OLANZO_PASSWORD"'","privatetoken":"'"$OLANZO_PRIVATE_TOKEN"'","validity":3600}' \
  | jq -r .access_token)

# 2. spend it here
curl -X GET "https://email-dev.jirafix.net/v1/email/lists" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
using var auth = new HttpClient { BaseAddress = new Uri("https://authenticate-dev.jirafix.net") };

var tokenResponse = await auth.PostAsJsonAsync("/v1/token", new
{
    username = "you@yourcompany.com",
    password = Environment.GetEnvironmentVariable("OLANZO_PASSWORD"),
    privatetoken = Environment.GetEnvironmentVariable("OLANZO_PRIVATE_TOKEN"),
    validity = 3600,
});

// the property is access_token, not accessToken
var payload = await tokenResponse.Content.ReadFromJsonAsync<JsonElement>();
var token = payload.GetProperty("access_token").GetString();

using var api = new HttpClient { BaseAddress = new Uri("https://email-dev.jirafix.net") };
api.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", token);

var response = await api.SendAsync(
    new HttpRequestMessage(HttpMethod.Get, "/v1/email/lists"));
// 1. get a token from the Authenticate host
const tokenResponse = await fetch("https://authenticate-dev.jirafix.net/v1/token", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    username: "you@yourcompany.com",
    password: process.env.OLANZO_PASSWORD,
    privatetoken: process.env.OLANZO_PRIVATE_TOKEN,
    validity: 3600,
  }),
});

// note the underscore — accessToken is undefined
const { access_token } = await tokenResponse.json();

// 2. spend it here
const response = await fetch("https://email-dev.jirafix.net/v1/email/lists", {
  method: "GET",
  headers: { Authorization: `Bearer ${access_token}` },
});
import os, requests

# 1. get a token from the Authenticate host
token_response = requests.post(
    "https://authenticate-dev.jirafix.net/v1/token",
    json={
        "username": "you@yourcompany.com",
        "password": os.environ["OLANZO_PASSWORD"],
        "privatetoken": os.environ["OLANZO_PRIVATE_TOKEN"],
        "validity": 3600,
    },
)

# note the underscore — "accessToken" raises KeyError
access_token = token_response.json()["access_token"]

# 2. spend it here
response = requests.get(
    "https://email-dev.jirafix.net/v1/email/lists",
    headers={"Authorization": f"Bearer {access_token}"},
)
200 OK

{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 3600
}
The response is snake_case

The fields are access_token, refresh_token, token_type and expires_in — not accessToken or expiresIn. Reading the camelCase spelling gives you nothing, with no error to explain it.

Use the Authenticate host for this same environment

A token carries the API domains it is allowed to reach. One issued by a different environment's Authenticate host is rejected here with a 401 that reads like bad credentials, so check the pair before you check your password: this page is https://email-dev.jirafix.net and its Authenticate host is https://authenticate-dev.jirafix.net.

Send your first email

Base64-encode your HTML body, then post it. The response gives you a QueueId to track the send.

curl -X POST https://email-dev.jirafix.net/v1/email/send \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "SenderFrom": { "Email": "no-reply@yourcompany.com", "DisplayName": "Your Company" },
        "ReplyTo":    { "Email": "support@yourcompany.com" },
        "Subject": "Your order is confirmed",
        "EmailBody": "PHA+VGhhbmsgeW91IGZvciB5b3VyIG9yZGVyLjwvcD4=",
        "Recipient": { "To": "customer@example.com" }
      }'
202 Accepted

{
  "status": "Success",
  "message": "Successfully accepted.",
  "data": {
    "QueueId": "9f1c7d2e-4b3a-4c1d-9e8f-2a7b6c5d4e3f",
    "QueuedTimestamp": 1755590400000,
    "SendType": "Immediate",
    "ScheduledDateTime": null,
    "UtcOffset": null
  }
}
202 Accepted

{
  "status": "Success",
  "message": "Scheduled. This email will be sent on 2026-09-10 at 14:30 (UTC-06:00).",
  "data": {
    "QueueId": "9f1c7d2e-4b3a-4c1d-9e8f-2a7b6c5d4e3f",
    "QueuedTimestamp": 1755590400000,
    "SendType": "Scheduled",
    "ScheduledDateTime": "2026-09-10 14:30",
    "UtcOffset": "-06:00"
  }
}

Sending email

Five ways to send. They differ in who receives the message and where the content comes from — pick by the row that matches your case.

Use thisWhenRecipients
/sendOne person, your own HTMLOne
/singleOne person, a saved campaign or attachmentsOne
/single/tomultiplerecipientsThe same message to several addresses in one callMany, one message
/batchA list or segment, or up to 1,000 individually personalised recipientsUp to 1,000
/predefinedemailA template already built in the portalOne or many

Send to one recipient

POST /v1/email/send

Sends one message to one recipient, using HTML you supply.

The simplest send, and the right default for order confirmations, password resets and one-off alerts.

Parameters

NameTypeRequiredDescription
SenderFromobjectYesWho the mail is from: { "Email": "...", "DisplayName": "..." }. Missing, empty or whitespace-only Email is rejected with 400.
ReplyToobjectYesWhere replies go. Use ReplyToList instead for several addresses.
SubjectstringYesSubject line.
PreHeaderTextstringNoPreview line shown after the subject in most mail apps.
EmailBodystringYesBase64-encoded HTML. Raw HTML is rejected with 422.
ScheduleDateTimedate-timeNoSend later instead of now. Format yyyy-MM-dd HH:mm in your account's time zone — seconds are dropped. The 202 then says Scheduled and repeats the time with its UtcOffset.
FrequencystringNoRepeat a scheduled send. Defaults to None. A repeating email's ScheduleDateTime is read as UTC. It needs one, at least 10 minutes away, and any RecurrenceEndDate must not be before that first send; otherwise the request is refused with 422. Pair with RecurrenceEndDate to stop it.
WebHookUrlstringNoWe post delivery reports here as they happen, so you do not have to poll.
Recipient.TostringYesThe recipient's address.
Recipient.CcEmailsarrayNoCopied addresses. Note the name — it is CcEmails, not Ccs.
Recipient.BCcEmailsarrayNoBlind-copied addresses.
Recipient.PersonalizationSubstitutionTagsarrayNoValues substituted into the body, for greeting someone by name. Omit if you do not personalise.

Responses

StatusMeaning
202Accepted and queued. Returns QueueId, QueuedTimestamp and SendType: Immediate, or Scheduled / Recurring with ScheduledDateTime and UtcOffset.
400The request failed field validation before it was processed — a required field missing, a required text field empty or only whitespace, or a value of the wrong type. The body names the offending fields. Rules applied after the request binds come back as 422 instead. A missing or blank EmailBody is not a 400: the API checks it itself and answers 422.
401Missing, expired or invalid bearer token.
422A rule rejected the request, or the message could not be queued — see Errors. The body carries "status": "Failed", a message naming the problem, and data with any offending ids. A rejected request sends nothing, and sent again with nothing changed it fails the same way, so fix what the message names first, in the request or in the account's setup in the portal. Retry only when the message starts Message queue failed or asks you to try again in a few minutes.
curl -X POST https://email-dev.jirafix.net/v1/email/send \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "SenderFrom": { "Email": "no-reply@yourcompany.com", "DisplayName": "Your Company" },
        "ReplyTo":    { "Email": "support@yourcompany.com" },
        "Subject": "Your order is confirmed",
        "PreHeaderText": "Your order is on its way",
        "EmailBody": "PHA+VGhhbmsgeW91IGZvciB5b3VyIG9yZGVyLjwvcD4=",
        "ScheduleDateTime": "2026-09-10 14:30",
        "Frequency": "None",
        "WebHookUrl": "https://yourcompany.com/webhooks/email",
        "Recipient": {
          "To": "customer@example.com",
          "CcEmails": ["records@yourcompany.com"],
          "BCcEmails": ["audit@yourcompany.com"],
          "PersonalizationSubstitutionTags": [
            { "TagName": "firstname", "TagValue": "María" }
          ]
        }
      }'

Send a campaign or add attachments

POST /v1/email/single

Sends one message to one recipient, from a saved campaign or with attachments.

Everything /send accepts, plus EmailCampaignId and Attachments. Supply either an EmailBody or an EmailCampaignId — with neither, the request is rejected.

Parameters

NameTypeRequiredDescription
SenderFromobjectYesWho the mail is from: { "Email": "...", "DisplayName": "..." }. Missing, empty or whitespace-only Email is rejected with 400.
ReplyToobjectYesWhere replies go. Use ReplyToList instead for several addresses.
SubjectstringYesSubject line.
PreHeaderTextstringNoPreview line shown after the subject in most mail apps.
EmailBodystringYesBase64-encoded HTML. Raw HTML is rejected with 422.
ScheduleDateTimedate-timeNoSend later instead of now. Format yyyy-MM-dd HH:mm in your account's time zone — seconds are dropped. The 202 then says Scheduled and repeats the time with its UtcOffset.
FrequencystringNoRepeat a scheduled send. Defaults to None. A repeating email's ScheduleDateTime is read as UTC. It needs one, at least 10 minutes away, and any RecurrenceEndDate must not be before that first send; otherwise the request is refused with 422. Pair with RecurrenceEndDate to stop it.
WebHookUrlstringNoWe post delivery reports here as they happen, so you do not have to poll.
EmailCampaignIdguidNoA campaign built in the portal, used instead of EmailBody.
AttachmentsarrayNoEach needs Content (Base64), Filename, Type (the MIME type, e.g. application/pdf) and Disposition, which must be exactly attachment or inline. The whole request, attachments included, must stay under 39 MB.
Recipient.TostringYesThe recipient's address.

Responses

StatusMeaning
202Accepted and queued. Returns QueueId, QueuedTimestamp and SendType: Immediate, or Scheduled / Recurring with ScheduledDateTime and UtcOffset.
400The request failed field validation before it was processed — a required field missing, a required text field empty or only whitespace, or a value of the wrong type. The body names the offending fields. Rules applied after the request binds come back as 422 instead. A missing or blank EmailBody is not a 400: the API checks it itself and answers 422, unless an EmailCampaignId stands in for it.
401Missing, expired or invalid bearer token.
422A rule rejected the request, or the message could not be queued — see Errors. The body carries "status": "Failed", a message naming the problem, and data with any offending ids. A rejected request sends nothing, and sent again with nothing changed it fails the same way, so fix what the message names first, in the request or in the account's setup in the portal. Retry only when the message starts Message queue failed or asks you to try again in a few minutes.
curl -X POST https://email-dev.jirafix.net/v1/email/single \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "SenderFrom": { "Email": "no-reply@yourcompany.com" },
        "ReplyTo":    { "Email": "support@yourcompany.com" },
        "Subject": "Your invoice",
        "PreHeaderText": "Invoice 1042 attached",
        "EmailBody": "PHA+SW52b2ljZSBhdHRhY2hlZC48L3A+",
        "ScheduleDateTime": "2026-09-10 09:00",
        "Frequency": "None",
        "WebHookUrl": "https://yourcompany.com/webhooks/email",
        "Recipient": { "To": "customer@example.com" },
        "Attachments": [{
          "Content": "<base64-of-the-file>",
          "Filename": "invoice-1042.pdf",
          "Type": "application/pdf",
          "Disposition": "attachment"
        }]
      }'
# Same endpoint, using a campaign built in the portal instead of your own HTML.
# Supply EmailCampaignId *or* EmailBody, never both, never neither.
curl -X POST https://email-dev.jirafix.net/v1/email/single \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "SenderFrom": { "Email": "no-reply@yourcompany.com" },
        "ReplyTo":    { "Email": "support@yourcompany.com" },
        "Subject": "Your invoice",
        "EmailCampaignId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "Recipient": { "To": "customer@example.com" }
      }'

Send one message to several addresses

POST /v1/email/single/tomultiplerecipients

Sends the same message to a list of addresses in one call.

Use this when the content is identical for everyone. If each person needs different content, use batch instead — this endpoint cannot personalise per recipient.

Parameters

NameTypeRequiredDescription
SenderFromobjectYesWho the mail is from: { "Email": "...", "DisplayName": "..." }. Missing, empty or whitespace-only Email is rejected with 400.
ReplyToobjectYesWhere replies go. Use ReplyToList instead for several addresses.
SubjectstringYesSubject line.
PreHeaderTextstringNoPreview line shown after the subject in most mail apps.
EmailBodystringYesBase64-encoded HTML. Raw HTML is rejected with 422.
ScheduleDateTimedate-timeNoSend later instead of now. Format yyyy-MM-dd HH:mm in your account's time zone — seconds are dropped. The 202 then says Scheduled and repeats the time with its UtcOffset.
FrequencystringNoRepeat a scheduled send. Defaults to None. A repeating email's ScheduleDateTime is read as UTC. It needs one, at least 10 minutes away, and any RecurrenceEndDate must not be before that first send; otherwise the request is refused with 422. Pair with RecurrenceEndDate to stop it.
WebHookUrlstringNoWe post delivery reports here as they happen, so you do not have to poll.
Recipients.ToarrayYesThe addresses to send to.
Recipients.CcEmailsarrayNoCopied addresses.
Recipients.BCcEmailsarrayNoBlind-copied addresses.

Responses

StatusMeaning
202Accepted and queued. Returns QueueId, QueuedTimestamp and SendType: Immediate, or Scheduled / Recurring with ScheduledDateTime and UtcOffset.
400The request failed field validation before it was processed — a required field missing, a required text field empty or only whitespace, or a value of the wrong type. The body names the offending fields. Rules applied after the request binds come back as 422 instead. A missing or blank EmailBody is not a 400: the API checks it itself and answers 422, unless an EmailCampaignId stands in for it.
401Missing, expired or invalid bearer token.
422A rule rejected the request, or the message could not be queued — see Errors. The body carries "status": "Failed", a message naming the problem, and data with any offending ids. A rejected request sends nothing, and sent again with nothing changed it fails the same way, so fix what the message names first, in the request or in the account's setup in the portal. Retry only when the message starts Message queue failed or asks you to try again in a few minutes.
curl -X POST https://email-dev.jirafix.net/v1/email/single/tomultiplerecipients \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "SenderFrom": { "Email": "no-reply@yourcompany.com" },
        "ReplyTo":    { "Email": "support@yourcompany.com" },
        "Subject": "Scheduled maintenance this Sunday",
        "PreHeaderText": "A short outage on Sunday morning",
        "EmailBody": "PHA+V2Ugd2lsbCBiZSBvZmZsaW5lIGJyaWVmbHkuPC9wPg==",
        "ScheduleDateTime": "2026-09-10 08:00",
        "Frequency": "None",
        "WebHookUrl": "https://yourcompany.com/webhooks/email",
        "Recipients": {
          "To": ["a@example.com", "b@example.com"],
          "CcEmails": ["records@yourcompany.com"],
          "BCcEmails": ["audit@yourcompany.com"]
        }
      }'

Send a batch

POST /v1/email/batch

Sends to a saved list, or to recipients you supply — each personalised individually.

Unlike the other sends, batch nests the sending fields under SendingDetails — see the example. Give at least one of SendingDetails.ListId, SendingDetails.IncludeSegmentationId or a Recipients array. With none of them, the request is rejected. To send to part of a list, see Send to segments.

Parameters

NameTypeRequiredDescription
SendingDetails.SenderFromobjectYesWho the mail is from: { "Email": "...", "DisplayName": "..." }. Missing, empty or whitespace-only Email is rejected with 400.
SendingDetails.ReplyToobjectYesWhere replies go. Use ReplyToList instead for several addresses.
SendingDetails.SubjectstringYesSubject line.
SendingDetails.PreHeaderTextstringNoPreview line shown after the subject in most mail apps.
SendingDetails.EmailBodystringYesBase64-encoded HTML. Raw HTML is rejected with 422.
SendingDetails.ScheduleDateTimedate-timeNoSend later instead of now. Format yyyy-MM-dd HH:mm in your account's time zone — seconds are dropped. The 202 then says Scheduled and repeats the time with its UtcOffset.
SendingDetails.FrequencystringNoRepeat a scheduled send. Defaults to None. A repeating email's ScheduleDateTime is read as UTC. It needs one, at least 10 minutes away, and any RecurrenceEndDate must not be before that first send; otherwise the request is refused with 422. Pair with RecurrenceEndDate to stop it.
SendingDetails.WebHookUrlstringNoWe post delivery reports here as they happen, so you do not have to poll.
SendingDetails.ListIdarrayNoSubscriber lists to send to, whole. Required unless you supply SendingDetails.IncludeSegmentationId or Recipients.
SendingDetails.IncludeSegmentationIdarrayNoSegments to send to: only their contacts, not their whole list. Combine with SendingDetails.ListId to add whole lists too, but never with a segment's own list. See Send to segments.
SendingDetails.ExcludeSegmentationIdarrayNoSegments whose contacts must not get this email. Removes them from the whole send, matched by email address — never from Recipients. Each segment's list must be in SendingDetails.ListId or be the list of an included segment.
RecipientsarrayNoUp to 1,000 per call. Every entry needs a To, and every To must be unique — duplicates are rejected and the response lists the offending addresses. Required unless you supply a ListId.
Recipients[].PersonalizationSubstitutionTagsarrayNoPer-recipient values substituted into the body — this is what batch gives you that the multi-address send does not.

Responses

StatusMeaning
202Accepted and queued. Returns QueueId, QueuedTimestamp and SendType: Immediate, or Scheduled / Recurring with ScheduledDateTime and UtcOffset.
400The request failed field validation before it was processed — a required field missing, a required text field empty or only whitespace, or a value of the wrong type. The body names the offending fields. Rules applied after the request binds come back as 422 instead. A missing or blank EmailBody is not a 400: the API checks it itself and answers 422, unless an EmailCampaignId stands in for it.
401Missing, expired or invalid bearer token.
422A rule rejected the request, or the message could not be queued — see Errors. The body carries "status": "Failed", a message naming the problem, and data with any offending ids. A rejected request sends nothing, and sent again with nothing changed it fails the same way, so fix what the message names first, in the request or in the account's setup in the portal. Retry only when the message starts Message queue failed or asks you to try again in a few minutes.
curl -X POST https://email-dev.jirafix.net/v1/email/batch \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "SendingDetails": {
          "SenderFrom": { "Email": "no-reply@yourcompany.com" },
          "ReplyTo":    { "Email": "support@yourcompany.com" },
          "Subject": "Your statement is ready",
          "PreHeaderText": "This month's statement",
          "EmailBody": "PHA+SGVsbG8ge3tmaXJzdE5hbWV9fTwvcD4=",
          "ScheduleDateTime": "2026-09-10 07:00",
          "Frequency": "None",
          "WebHookUrl": "https://yourcompany.com/webhooks/email"
        },
        "Recipients": [
          {
            "To": "a@example.com",
            "PersonalizationSubstitutionTags": [
              { "TagName": "firstName", "TagValue": "María" }
            ]
          },
          { "To": "b@example.com" }
        ]
      }'
# Same endpoint, addressed to saved lists instead of an explicit Recipients array.
curl -X POST https://email-dev.jirafix.net/v1/email/batch \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "SendingDetails": {
          "SenderFrom": { "Email": "no-reply@yourcompany.com" },
          "ReplyTo":    { "Email": "support@yourcompany.com" },
          "Subject": "Your statement is ready",
          "EmailBody": "PHA+SGVsbG8ge3tmaXJzdE5hbWV9fTwvcD4=",
          "ListId": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"]
        }
      }'
# Same endpoint, addressed to the contacts in one segment of a list, not the whole list.
curl -X POST https://email-dev.jirafix.net/v1/email/batch \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "SendingDetails": {
          "SenderFrom": { "Email": "no-reply@yourcompany.com" },
          "ReplyTo":    { "Email": "support@yourcompany.com" },
          "Subject": "Your statement is ready",
          "EmailBody": "PHA+SGVsbG8ge3tmaXJzdE5hbWV9fTwvcD4=",
          "IncludeSegmentationId": ["9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"]
        }
      }'
# Same endpoint: the whole list, except the contacts in one of its segments.
curl -X POST https://email-dev.jirafix.net/v1/email/batch \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "SendingDetails": {
          "SenderFrom": { "Email": "no-reply@yourcompany.com" },
          "ReplyTo":    { "Email": "support@yourcompany.com" },
          "Subject": "Your statement is ready",
          "EmailBody": "PHA+SGVsbG8ge3tmaXJzdE5hbWV9fTwvcD4=",
          "ListId": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
          "ExcludeSegmentationId": ["9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"]
        }
      }'

Send a saved template

POST /v1/email/predefinedemail

Sends a template already built in the portal.

The template owns the subject, body and sender, so you supply only who it goes to. Find template ids with List trigger templates.

Parameters

NameTypeRequiredDescription
PredefinedTemplateIdstringYesThe template to send, e.g. TEMAIL-822.
RecipientsarrayNoEach entry needs a To. Required unless you supply a ListId or IncludeSegmentationId.
ListIdarrayNoSend to saved lists, whole, instead of explicit recipients.
IncludeSegmentationIdarrayNoSegments to send to: only their contacts, not their whole list. Combine with ListId to add whole lists too, but never with a segment's own list. See Send to segments.
ExcludeSegmentationIdarrayNoSegments whose contacts must not get this email. Removes them from the whole send, matched by email address — never from Recipients. Each segment's list must be in ListId or be the list of an included segment.
CcEmailsarrayNoCopied addresses.
BCcEmailsarrayNoBlind-copied addresses.
ScheduleDateTimedate-timeNoSend later instead of now. Format yyyy-MM-dd HH:mm in your account's time zone — seconds are dropped. The 202 then says Scheduled and repeats the time with its UtcOffset.
FrequencystringNoRepeat a scheduled send. Defaults to None. A repeating email's ScheduleDateTime is read as UTC. It needs one, at least 10 minutes away, and any RecurrenceEndDate must not be before that first send; otherwise the request is refused with 422. Pair with RecurrenceEndDate to stop it.

Responses

StatusMeaning
202Accepted and queued. Returns QueueId, QueuedTimestamp and SendType: Immediate, or Scheduled / Recurring with ScheduledDateTime and UtcOffset.
400The request failed field validation before it was processed — a required field missing, a required text field empty or only whitespace, or a value of the wrong type. The body names the offending fields. Rules applied after the request binds come back as 422 instead.
401Missing, expired or invalid bearer token.
422A rule rejected the request, or the message could not be queued — see Errors. The body carries "status": "Failed", a message naming the problem, and data with any offending ids. A rejected request sends nothing, and sent again with nothing changed it fails the same way, so fix what the message names first, in the request or in the account's setup in the portal. Retry only when the message starts Message queue failed or asks you to try again in a few minutes.
curl -X POST https://email-dev.jirafix.net/v1/email/predefinedemail \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "PredefinedTemplateId": "TEMAIL-822",
        "Recipients": [{ "To": "customer@example.com" }],
        "CcEmails": ["records@yourcompany.com"],
        "BCcEmails": ["audit@yourcompany.com"],
        "ScheduleDateTime": "2026-09-10 10:00",
        "Frequency": "None"
      }'
# Same endpoint, addressed to saved lists instead of an explicit Recipients array.
curl -X POST https://email-dev.jirafix.net/v1/email/predefinedemail \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "PredefinedTemplateId": "TEMAIL-822",
        "ListId": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"]
      }'
# Same endpoint, addressed to the contacts in one segment of a list, not the whole list.
curl -X POST https://email-dev.jirafix.net/v1/email/predefinedemail \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "PredefinedTemplateId": "TEMAIL-822",
        "IncludeSegmentationId": ["9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"]
      }'
# Same endpoint: the whole list, except the contacts in one of its segments.
curl -X POST https://email-dev.jirafix.net/v1/email/predefinedemail \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
        "PredefinedTemplateId": "TEMAIL-822",
        "ListId": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
        "ExcludeSegmentationId": ["9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"]
      }'

Send to segments

/batch and /predefinedemail can send to part of a list instead of all of it. A segment is a saved filter on one list; read a list's segments, and their ids, with GET /v1/contacts/list/{listId}/segmentations on the CRM API. You send only the segment's id — we look up its list and type.

To send toGive
Whole listsListId — as before
Only the contacts in some segmentsIncludeSegmentationId
Whole lists plus segments of other listsListId and IncludeSegmentationId
A list except the contacts in some of its segmentsListId and ExcludeSegmentationId
A segment except the contacts in another segment of the same listIncludeSegmentationId and ExcludeSegmentationId
An exclusion applies to the whole send

A contact in an excluded segment is removed from everything the request sends to, matched by email address — not only from the excluded segment's own list. If the same person is on a second list in ListId, they are left out of that list too. Explicit Recipients are never excluded: an address you list there always gets the email. A contact in two included segments, or in a list and a segment, gets one email.

Rules — checked before anything is queued. Any failure answers 422 and nothing is sent.

RuleWhy
Each segment id must be one of your own segments, not a list id and not deleted.Offending ids come back in InValidSegmentationIds, like InValidListIds.
A segment must have been created by the account owner, not by a team member or staff login.Sends can only use the account owner's segments. A segment another login created is refused with its own message; ask the account owner to create it.
A segment the send engine would skip is refused — usually one whose list has no contact subscribed to email marketing.A skipped exclusion would not be applied to the other lists of the send, so the request is refused instead.
An included segment's list must not also be in ListId.The whole list would go out and the segment would mean nothing.
ExcludeSegmentationId needs a ListId or IncludeSegmentationId.There must be something to remove contacts from. Recipients do not count.
An excluded segment's list must be in ListId, or be the list of an included segment.Excluding from a list you are not sending to has no meaning.
The same segment cannot be in both fields.It would be added and removed at once.
A segment must have been counted, and an included segment must have contacts with an email address.A segment is counted within a few minutes of being created or edited. An empty excluded segment is fine: it removes nobody.
Known limitation: one-time scheduled sends

Segments are checked when you make the request and again when the send is queued, and a repeating send is checked again at every occurrence. A one-time send with a ScheduleDateTime is not checked again at its scheduled time: if an excluded segment is deleted, or its saved count drops to 0, in between, the exclusion is skipped and its contacts get the email. Do not delete or rebuild a segment that a scheduled send excludes.

Availability

Segment targeting is switched on environment by environment. Where it is not on yet, a request that uses IncludeSegmentationId or ExcludeSegmentationId answers 422 saying so, and nothing is sent.

Check delivery status

Take the QueueId from any send and ask what happened to it. This is the only authoritative answer on delivery — the 202 from the send means accepted, nothing more.

GET /v1/email/{id}/status

Reads the outcome of a previously queued send.

Details counts recipients by stage — Total, Queued, Submitted, Delivered and Failed — so a batch can be tracked as it drains.

Parameters

NameTypeRequiredDescription
idguidYesThe QueueId returned by the send.

Responses

StatusMeaning
200Current status, with a per-stage recipient breakdown in Details.
400No send matches that id. Note this is a 400, not a 404.
401Missing, expired or invalid bearer token.
curl -X GET https://email-dev.jirafix.net/v1/email/9f1c7d2e-4b3a-4c1d-9e8f-2a7b6c5d4e3f/status \
  -H "Authorization: Bearer <your-token>"
200 OK

{
  "QueueId": "9f1c7d2e-4b3a-4c1d-9e8f-2a7b6c5d4e3f",
  "Status": "Completed",
  "Message": "Sent",
  "Details": {
    "Total": 2,
    "Queued": 0,
    "Submitted": 2,
    "Delivered": 2,
    "Failed": 0
  }
}
Out of funds

If the account has run out of credit the status reads InSufficient Fund and a Balance object is included. Top up and send again — the original send does not resume on its own.

Campaigns

GET /v1/email/emailcampaigns

Lists the email campaigns on the account.

Use this to find an EmailCampaignId for /single.

Responses

StatusMeaning
200The campaigns on the account.
400The request could not be read.
401Missing, expired or invalid bearer token.
curl -X GET https://email-dev.jirafix.net/v1/email/emailcampaigns \
  -H "Authorization: Bearer <your-token>"

Trigger templates

GET /v1/email/trigger-templates

Lists the saved templates you can send.

The ids here are what /predefinedemail expects.

Parameters

NameTypeRequiredDescription
isCalledFromSignUpbooleanNoNarrows the list to sign-up templates.

Responses

StatusMeaning
200The available templates.
401Missing, expired or invalid bearer token.
curl -X GET "https://email-dev.jirafix.net/v1/email/trigger-templates?isCalledFromSignUp=false" \
  -H "Authorization: Bearer <your-token>"

Lists and contact counts

GET /v1/email/lists

Lists the subscriber lists reachable by email, with contact counts.

Parameters

NameTypeRequiredDescription
excludeCountbooleanNoSet to true to skip counting, which returns faster on large lists.

Responses

StatusMeaning
200The lists, with counts unless you excluded them.
401Missing, expired or invalid bearer token.
curl -X GET "https://email-dev.jirafix.net/v1/email/lists?excludeCount=true" \
  -H "Authorization: Bearer <your-token>"
GET /v1/email/{listId}/contacts/count

Contact count and segment breakdown for one subscriber list.

Parameters

NameTypeRequiredDescription
listIdguidYesThe subscriber list to count.

Responses

StatusMeaning
200The count and segment breakdown. An unknown list also answers 200, with nothing in it — check the payload, not the status code.
401Missing, expired or invalid bearer token.
curl -X GET https://email-dev.jirafix.net/v1/email/3fa85f64-5717-4562-b3fc-2c963f66afa6/contacts/count \
  -H "Authorization: Bearer <your-token>"

Errors

A 422 means the request was understood and a rule rejected it, or, rarely, that the message could not be queued. A rejected request sends nothing. The body always has the same shape: { "title": "UnprocessableEntity", "statusCode": 422, "status": "Failed", "message": "…", "data": { … } }. The message says which rule, and data carries any offending ids, such as InValidListIds or InValidSegmentationIds; a key with nothing to report can be present with a null value.

StatusWhat it meansWhat to do
202Accepted and queued.Track it with the status endpoint.
400A required field is missing or a required text field is empty or only whitespace (except EmailBody: see the table below), a field has the wrong type, or the id you asked about does not exist.Read the body — it names the offending fields.
401The token is missing, expired or invalid.Fetch a new token and retry once.
422A rule rejected the request, or the message could not be queued — see the table below.Fix what the message names, in the request or in the account's setup in the portal: sent again with nothing changed, it fails the same way. Retry only when the message starts Message queue failed or asks you to try again in a few minutes.

What a 422 is telling you — messages are quoted for one id; with several ids they use the plural, such as Segments … are …. The rejections that return ids in InValidSegmentationIds can come back together in one 422, one part per kind of problem. On a queue failure, data repeats the message in Errors.

MessageCause
Either Email body is requiredEmailBody was empty on /send.
Either Email body or Campaign Id is requiredNeither content nor a campaign was supplied.
Email body should be in base64The body was raw HTML. Base64-encode it.
Phone Number Should be Verified. Please login into account and verify to proceed furtherThe account's phone number is not verified. Sign in to the portal and verify it.
Invalid list idsA ListId is unknown or another account's. On a batch send the ids come back in InValidListIds; other sends name the problem in the message only.
Invalid template idThe PredefinedTemplateId is unknown or another account's.
Invalid campaign idThe EmailCampaignId is unknown or another account's. On a batch send the id comes back in InValidCampaignIds; other sends name the problem in the message only.
Sender email has not been set up yet. …The account has no sender email set up. Set one up in the portal, or contact support.
The provided sender email, …, is not valid. …The SenderFrom address is not one of the account's sender emails.
Scheduled Date should be future dateScheduleDateTime is in the past.
A repeating email needs a ScheduleDateTime for its first send.A Frequency other than None came without a ScheduleDateTime.
RecurrenceEndDate is before the first send, so no email would go out.The repeat would end before it starts.
The first send of a repeating email must be at least 10 minutes from now.A repeating schedule takes a few minutes to set up, so a sooner first send could be missed.
ScheduleDateTime is too far in the future to repeat.No repeat fits before the last date we can store.
Either list or recipients is required to sendA batch left out both ListId and Recipients, and named no segment.
Segment … is not found in your account.A segment id is unknown or another account's. The ids come back in InValidSegmentationIds.
Id … is a list, not a segment. …A list id was sent in a segment field. Send list ids in ListId. The ids come back in InValidSegmentationIds.
Segment … was created by a team member or staff login, not the account owner …Only the account owner's segments can be used for sending. The ids come back in InValidSegmentationIds.
Segment … is deleted. / Segment … is on a list that was deleted.The segment, or its list, was deleted. The ids come back in InValidSegmentationIds.
Segment … is missing a saved filter …The segment has no saved filter, or is not a kind of segment a send can use. Open it in the portal and save it. The ids come back in InValidSegmentationIds.
Segment … would be skipped when the email is sent …The segment's list has no contact subscribed to email marketing, so the send engine leaves it out.
Segment … belongs to list …, which is already in ListId.You sent a segment and its whole list. Keep one of them.
Segment … belongs to list …, which this request does not send to. …An excluded segment's list must be in ListId, or be the list of a segment in IncludeSegmentationId.
ExcludeSegmentationId removes contacts from the lists and segments you send to …An exclusion came without a ListId or IncludeSegmentationId.
Segment … is in both IncludeSegmentationId and ExcludeSegmentationId. …The same segment was sent in both fields. Put it in only one of them.
Segment … has not been counted yet …The segment is new or was just edited. If the message says it is being counted, try again in a few minutes; otherwise open and save it in the portal to recount it. The segment is named in the message only.
Segment … could not be counted right now …We could not check the segment's contacts just now, so nothing was queued. Try again in a few minutes.
Segment … has no contacts with an email address …An included segment has nobody to send to. An excluded segment in the same state is accepted: it removes nobody.
Segment … has contacts, but its saved count is 0 …The saved count is out of date, so the send would skip the segment; if it is excluded, its contacts would get the email. Open and save it in the portal to recount it.
IncludeSegmentationId and ExcludeSegmentationId are not available on this API yet. …Segment targeting is not switched on in this environment.
Message queue failed: …We could not queue the message, so it was almost certainly not sent. Retry; if it keeps happening, contact support.
Aha! batch limit exceeded. Limit is per batch 1000More than 1,000 recipients in one batch. Split it.
Each recipients must have unique emailThe batch repeated an address; the response lists which.
Content is required and should be base 64No attachment's Content decoded as Base64, an empty Attachments list included. A missing Content is a 400.
Disposition is required and should be either attachment or inlineAn attachment's Disposition was neither attachment nor inline. A missing or empty one is a 400 with the same text.

Limits

LimitValue
Recipients per batch1,000
Request size, attachments included39 MB on /send, /single, /batch and /single/tomultiplerecipients
Schedule precisionOne minute — seconds are dropped