Send a batch
Up to 100 emails in one request, without attachments. Validation is all-or-nothing: one invalid email and nothing is sent, with every problem listed by index. Charged once for the whole batch.
Up to 100 emails in one request, without attachments. Validation is all-or-nothing: one invalid email and nothing is sent, with every problem listed by index. Charged once for the whole batch.
apiKeyAuthorizationBearer <token>Authorization: Bearer chy_live_… (or chy_test_…). A live key may
be sending-only, and may be locked to one domain.
Idempotency-Key?string1–256 characters, no control characters, kept 24 hours per
workspace. The same key with the same body returns the first response
again; with a different body, 409 idempotency_conflict; an empty,
too long or malformed key, 400 invalid_idempotency_key. Send one on
every request, e.g. <event-type>/<entity-id>.
1 <= length <= 256application/json- body
emails*array<>Same fields as a single email, without attachments.
1 <= items <= 100Every email accepted. Ids are in request order.
application/json- response
emails*array<>import { CharchySend } from "@charchy/send"const send = new CharchySend() // reads CHARCHY_SEND_KEYconst { data, error } = await send.emails.batch( [ { from: "Darin Game <orders@daringaming.com>", to: "Darin Game <orders@daringaming.com>", subject: "string", }, ], { idempotencyKey: "order-confirmation/4821" }){ "emails": [ { "id": "em_8f2k1x9q4w7m3n5p6r0s2t4v", "status": "scheduled" } ]}