KartaWeb. API. V2. SendParams
(Karta v1.0.0)
The fields Karta.Sending takes, from the request bodies of
POST /api/v2/messages, POST /api/v2/messages/raw and
POST /api/v2/messages/batch as OpenApiSpex.Plug.CastAndValidate cast
them (KartaWeb.API.V2.Schemas).
The options of a message:
tagandtagsare one list of tags:tagfirst, thentags, without duplicates; the first is the message's tag.Karta.Sendingchecks them (at most 10, each 1 to 128 bytes of text).variableshas text values (the document says so); a name has 1 to 128 bytes and no control characters.Karta.Sendingchecks the size (16 KiB as JSON).send_atis a time with an offset, which the cast has turned into UTC.track_opensandtrack_clicks:falseswitches that tracking off for the message;trueis the same as leaving it out.
An option that cannot be kept is {:error, code, message, details}, as
KartaWeb.API.V2.Errors.render/5 takes it; details names the field
(a JSON pointer).
Summary
Functions
The fields of each message of a batch for Karta.Sending.send_batch/3,
in the order of the recipients: the batch's parts and options, with the
recipient alone in To, its replacements made in the subject, the text
and the HTML (KartaWeb.API.V2.Replacements), and its variables over
the batch's. Every recipient is checked before anything is sent; the
first problem is the error, with the recipient's index in details.
The fields for Karta.Sending.send_message/3.
The fields for Karta.Sending.send_raw/3.
Types
Functions
The fields of each message of a batch for Karta.Sending.send_batch/3,
in the order of the recipients: the batch's parts and options, with the
recipient alone in To, its replacements made in the subject, the text
and the HTML (KartaWeb.API.V2.Replacements), and its variables over
the batch's. Every recipient is checked before anything is sent; the
first problem is the error, with the recipient's index in details.
A batch has at most Karta.Sending.Options.batch_limit/0 recipients
(too_many_recipients), and its messages at most 50 MiB of content
together (subject, text, HTML and attachments, after replacement;
batch_too_large). They are counted as they are made
(Karta.Sending.Options.make_batch/2), so a batch that is too large is refused
before it is made whole.
The fields for Karta.Sending.send_message/3.
The fields for Karta.Sending.send_raw/3.