Tags, variables and scheduling

Besides its content, a message can carry options that Karta keeps with it: tags, variables, a time to send, and switches that turn tracking off for that message. Which options you can set depends on how you send:

OptionKarta API (/api/v2)Postal APIMailgun APISendGrid APIPostmark APISMTP
One tagtagtagfirst o:tagfirst of categoriesTagno
Several tags (up to 10)tagsnoo:tag (repeated)categoriesnono
Variablesvariablesnov:<name>, h:X-Mailgun-Variablescustom_argsMetadatano
Send later (up to 72 h)send_atnoo:deliverytimesend_atnono
Tracking off for this messagetrack_opens, track_clicksnoo:tracking, o:tracking-opens, o:tracking-clickstracking_settingsTrackOpens, TrackLinksno
One message per recipient (batch)POST /api/v2/messages/batchnorecipient-variablespersonalizations/email/batch (messages of their own)no
Inline images (cid:)nonoinlineattachments with disposition: inlineattachments with a ContentIDin the MIME message
Message-ID of your ownnonoh:Message-Idheaders Message-IDHeaders Message-IDin the message

The option names are described on each API's page. This page describes what they mean.

Tags

A tag is a label for your own use, such as receipts or newsletter. A message has at most 10 tags, each 1 to 128 bytes of text without control characters; duplicates are dropped. The first tag is the message's tag.

Tags appear in the message's status (tag and tags in the Karta API, tag in Postal's), in webhooks of every format (Postal's has only the first, Postmark's Tag too), in Mailgun's events (tags), and can be used to filter Mailgun's events (tags=receipts). Tags are not written into the message.

In the Karta API, tag and tags are one list: tag first, then tags, without duplicates, at most 10 in all.

Variables

Variables are data you attach to a message, such as an order number. They are a JSON object with string keys, at most 16 KiB when encoded. Karta does not use them; it returns them with the message and its events. They are not written into the message.

WhereHow
Karta APIvariables of the message
Postmark's messages APIMetadata of the message
Webhooks in Karta's formatdata.message.variables
Webhooks in Mailgun's format, Mailgun's eventsuser-variables
Webhooks in SendGrid's formatfields of the event, as SendGrid sends custom arguments; a variable with the name of one of SendGrid's own fields (event, email, ...) is left out there
Webhooks in Postmark's formatMetadata
Webhooks in Postal's formatnot sent: Postal's format has no such field

Karta's own fields never mix with yours: every format but SendGrid's keeps variables in a field of their own. Over the Karta API a variable's value is text and its name has 1 to 128 bytes without control characters, so that it reads the same in every format; Mailgun's h:X-Mailgun-Variables may give other JSON values.

Scheduled sending

A message can ask to be delivered later, at most 72 hours ahead. It is accepted and stored at once; its delivery jobs are scheduled for that time, and its recipients are not tried before it. A time in the past means at once; more than 72 hours ahead is refused.

The Karta API takes an RFC 3339 time with its offset (2026-11-10T09:00:00+02:00 or ...Z; a time without one is refused) and answers it in UTC. Every message of a request is judged against one moment, when the request arrived.

A scheduled message is delivered like any other when its time comes: if its server is suspended then, it waits until the server is resumed, and the server's sending limit counts it then.

The 5-day retry period starts at the scheduled time, not at acceptance. A scheduled message can be cancelled over /api/v2 and on its page (Delivery); SendGrid's batch_id, which cancels by batch, is still refused.

Turning tracking off for one message

Open and click tracking are set per server (Tracking and unsubscribe). A message can switch either off for itself, never on: a server's settings are the most a message gets. Values that mean "on" (yes, true, htmlonly in Mailgun's options, enable: true in SendGrid's) leave the server's setting. One-click unsubscribe cannot be switched off per message.

Batches

Mailgun's recipient-variables and SendGrid's personalizations send one message per recipient (or personalization) in one request:

  • All messages of a request are checked, built and authorised before any is stored, and all are accepted in one transaction: all or none.
  • At most the instance's batch limit of messages per request (KARTA_BATCH_MAX_MESSAGES, 100 by default, at most 1000), and at most 50 MiB of content in all of them together; see Configuration for the memory a batch takes.
  • The messages of a batch share one Message-ID (Mailgun: <uuid>@<sending domain>; SendGrid: the Message-ID header given, or <uuid>@<from domain>), which is what the API returns.
  • Substitutions are made in the subject, the text and the HTML: Mailgun's %recipient.<name>%, SendGrid's substitutions keys as written.

The Karta API's batch (POST /api/v2/messages/batch, Karta API) works the same way, all or none, with the same limits, but:

  • every message has its own Message-ID, and the answer lists each message;
  • placeholders are {{name}}, every placeholder needs a value for every recipient, and in the HTML values are escaped (< becomes &lt;, ...);
  • a recipient's own variables are added to the batch's;
  • the messages may have at most 50 MiB of content together (subject, text, HTML and attachments).

In every API, a batch is one request for the key's rate limit; the server's sending limit and its suspension apply to each message.