curl -X POST https://tawked.com/v1/email/messages/batch \
-H "Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: orders-2026-10-21-0900" \
-d '[
{
"from": "متجر أكمي <orders@acme.sa>",
"to": [
"sara@example.com"
],
"subject": "طلبك رقم 1042 قيد التجهيز",
"html": "<p>استلمنا طلبك رقم 1042.</p>",
"reference": "order-1042",
"tags": [
{
"name": "category",
"value": "order"
}
]
},
{
"from": "متجر أكمي <orders@acme.sa>",
"to": [
"ali@example.com"
],
"subject": "طلبك رقم 1043 قيد التجهيز",
"html": "<p>استلمنا طلبك رقم 1043.</p>",
"reference": "order-1043",
"tags": [
{
"name": "category",
"value": "order"
}
]
}
]'const res = await fetch("https://tawked.com/v1/email/messages/batch", {
method: "POST",
headers: {
Authorization: "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "orders-2026-10-21-0900",
},
body: JSON.stringify([
{
"from": "متجر أكمي <orders@acme.sa>",
"to": [
"sara@example.com"
],
"subject": "طلبك رقم 1042 قيد التجهيز",
"html": "<p>استلمنا طلبك رقم 1042.</p>",
"reference": "order-1042",
"tags": [
{
"name": "category",
"value": "order"
}
]
},
{
"from": "متجر أكمي <orders@acme.sa>",
"to": [
"ali@example.com"
],
"subject": "طلبك رقم 1043 قيد التجهيز",
"html": "<p>استلمنا طلبك رقم 1043.</p>",
"reference": "order-1043",
"tags": [
{
"name": "category",
"value": "order"
}
]
}
]),
});
const data = await res.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/email/messages/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'emails' => '<array>',
'application' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
res = requests.post(
"https://tawked.com/v1/email/messages/batch",
headers={"Authorization": "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx", "Idempotency-Key": "orders-2026-10-21-0900"},
json=[
{
"from": "متجر أكمي <orders@acme.sa>",
"to": [
"sara@example.com"
],
"subject": "طلبك رقم 1042 قيد التجهيز",
"html": "<p>استلمنا طلبك رقم 1042.</p>",
"reference": "order-1042",
"tags": [
{
"name": "category",
"value": "order"
}
]
},
{
"from": "متجر أكمي <orders@acme.sa>",
"to": [
"ali@example.com"
],
"subject": "طلبك رقم 1043 قيد التجهيز",
"html": "<p>استلمنا طلبك رقم 1043.</p>",
"reference": "order-1043",
"tags": [
{
"name": "category",
"value": "order"
}
]
}
],
)
data = res.json(){
"data": [
{
"id": "0199f1c2-8b01-7a20-9c3d-4e5f6a7b8c9d",
"status": "accepted",
"from": {
"name": "متجر أكمي",
"address": "orders@acme.sa"
},
"to": [
"sara@example.com"
],
"cc": [],
"bcc": [],
"reply_to": [],
"subject": "طلبك رقم 1042 قيد التجهيز",
"reference": "order-1042",
"tags": [
{
"name": "category",
"value": "order"
}
],
"scheduled_at": null,
"recipients": [
{
"id": "0199f1c2-8b02-7d41-8e5f-6a7b8c9d0e1f",
"address": "sara@example.com",
"name": null,
"type": "to",
"status": "queued"
}
],
"price_halalas": 0,
"cost": {
"emails": 1,
"suppressed": 0,
"free": 1,
"billed": 0,
"halalas": "0"
},
"created_at": "2026-10-21T12:00:00+03:00",
"mode": "live"
},
{
"id": "0199f1c2-8b03-7b62-9f7a-8b9c0d1e2f3a",
"status": "accepted",
"from": {
"name": "متجر أكمي",
"address": "orders@acme.sa"
},
"to": [
"ali@example.com"
],
"cc": [],
"bcc": [],
"reply_to": [],
"subject": "طلبك رقم 1043 قيد التجهيز",
"reference": "order-1043",
"tags": [
{
"name": "category",
"value": "order"
}
],
"scheduled_at": null,
"recipients": [
{
"id": "0199f1c2-8b04-7c83-8a9b-0c1d2e3f4a5b",
"address": "ali@example.com",
"name": null,
"type": "to",
"status": "queued"
}
],
"price_halalas": 0,
"cost": {
"emails": 1,
"suppressed": 0,
"free": 1,
"billed": 0,
"halalas": "0"
},
"created_at": "2026-10-21T12:00:00+03:00",
"mode": "live"
}
]
}Send a batch of emails
Sends up to 100 messages in one call, each with the fields of a send (no attachments), and answers 202 with data: one message per item, in order, in the extended shape. The body is a JSON array of the messages, or { "emails": [...] }, at most 10 MiB. By default the batch is all or nothing: every item is judged first, and any refusal answers 422 batch_invalid naming each refused item by its index, with nothing sent or charged. With Tawked-Batch-Validation: permissive the valid items are sent and the refused ones listed in errors beside data. An item whose every recipient is suppressed is not a refusal: it is answered failed and not charged. The batch counts as one request against the account’s rate and is charged in one go; the daily limit and the balance apply to all its e-mails together.
curl -X POST https://tawked.com/v1/email/messages/batch \
-H "Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: orders-2026-10-21-0900" \
-d '[
{
"from": "متجر أكمي <orders@acme.sa>",
"to": [
"sara@example.com"
],
"subject": "طلبك رقم 1042 قيد التجهيز",
"html": "<p>استلمنا طلبك رقم 1042.</p>",
"reference": "order-1042",
"tags": [
{
"name": "category",
"value": "order"
}
]
},
{
"from": "متجر أكمي <orders@acme.sa>",
"to": [
"ali@example.com"
],
"subject": "طلبك رقم 1043 قيد التجهيز",
"html": "<p>استلمنا طلبك رقم 1043.</p>",
"reference": "order-1043",
"tags": [
{
"name": "category",
"value": "order"
}
]
}
]'const res = await fetch("https://tawked.com/v1/email/messages/batch", {
method: "POST",
headers: {
Authorization: "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "orders-2026-10-21-0900",
},
body: JSON.stringify([
{
"from": "متجر أكمي <orders@acme.sa>",
"to": [
"sara@example.com"
],
"subject": "طلبك رقم 1042 قيد التجهيز",
"html": "<p>استلمنا طلبك رقم 1042.</p>",
"reference": "order-1042",
"tags": [
{
"name": "category",
"value": "order"
}
]
},
{
"from": "متجر أكمي <orders@acme.sa>",
"to": [
"ali@example.com"
],
"subject": "طلبك رقم 1043 قيد التجهيز",
"html": "<p>استلمنا طلبك رقم 1043.</p>",
"reference": "order-1043",
"tags": [
{
"name": "category",
"value": "order"
}
]
}
]),
});
const data = await res.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/email/messages/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'emails' => '<array>',
'application' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
res = requests.post(
"https://tawked.com/v1/email/messages/batch",
headers={"Authorization": "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx", "Idempotency-Key": "orders-2026-10-21-0900"},
json=[
{
"from": "متجر أكمي <orders@acme.sa>",
"to": [
"sara@example.com"
],
"subject": "طلبك رقم 1042 قيد التجهيز",
"html": "<p>استلمنا طلبك رقم 1042.</p>",
"reference": "order-1042",
"tags": [
{
"name": "category",
"value": "order"
}
]
},
{
"from": "متجر أكمي <orders@acme.sa>",
"to": [
"ali@example.com"
],
"subject": "طلبك رقم 1043 قيد التجهيز",
"html": "<p>استلمنا طلبك رقم 1043.</p>",
"reference": "order-1043",
"tags": [
{
"name": "category",
"value": "order"
}
]
}
],
)
data = res.json(){
"data": [
{
"id": "0199f1c2-8b01-7a20-9c3d-4e5f6a7b8c9d",
"status": "accepted",
"from": {
"name": "متجر أكمي",
"address": "orders@acme.sa"
},
"to": [
"sara@example.com"
],
"cc": [],
"bcc": [],
"reply_to": [],
"subject": "طلبك رقم 1042 قيد التجهيز",
"reference": "order-1042",
"tags": [
{
"name": "category",
"value": "order"
}
],
"scheduled_at": null,
"recipients": [
{
"id": "0199f1c2-8b02-7d41-8e5f-6a7b8c9d0e1f",
"address": "sara@example.com",
"name": null,
"type": "to",
"status": "queued"
}
],
"price_halalas": 0,
"cost": {
"emails": 1,
"suppressed": 0,
"free": 1,
"billed": 0,
"halalas": "0"
},
"created_at": "2026-10-21T12:00:00+03:00",
"mode": "live"
},
{
"id": "0199f1c2-8b03-7b62-9f7a-8b9c0d1e2f3a",
"status": "accepted",
"from": {
"name": "متجر أكمي",
"address": "orders@acme.sa"
},
"to": [
"ali@example.com"
],
"cc": [],
"bcc": [],
"reply_to": [],
"subject": "طلبك رقم 1043 قيد التجهيز",
"reference": "order-1043",
"tags": [
{
"name": "category",
"value": "order"
}
],
"scheduled_at": null,
"recipients": [
{
"id": "0199f1c2-8b04-7c83-8a9b-0c1d2e3f4a5b",
"address": "ali@example.com",
"name": null,
"type": "to",
"status": "queued"
}
],
"price_halalas": 0,
"cost": {
"emails": 1,
"suppressed": 0,
"free": 1,
"billed": 0,
"halalas": "0"
},
"created_at": "2026-10-21T12:00:00+03:00",
"mode": "live"
}
]
}Authorizations
Authorization: Bearer . An application key (tk_live_, tk_test_) has full access, which covers every product and any product added later, or custom access, chosen when the key is created: one or more of the scopes verify:check, verify:send (includes verify:check), notifications:read, notifications:send (includes notifications:read), email:read, email:send (includes email:read), email:manage (includes email:send), webhooks:manage, email:inbound, notifications:templates (includes notifications:read), chat:menus, chat:attendant. No key made on the API keys page holds notifications:templates, full access included: the three template writes answer such a key 403 insufficient_scope. A connected app's key holds it. Nor chat:menus: the five conversation menu operations answer such a key 403 insufficient_scope, and a connected app's key holds it once the client approved it. Nor chat:attendant: the five auto-attendant operations answer such a key 403 insufficient_scope too, and a connected app's key holds it once the client approved it. email:manage and webhooks:manage are held only by a key someone chose them for: a full-access key, old or new, never holds them. email:inbound, which reads, deletes and forwards received e-mail, is opt-in on every key, full access included: a key holds it only when it was turned on when the key was created. A call outside the key's access answers 403 insufficient_scope and names the scope it needs in the WWW-Authenticate response header. A partner key (tk_partner_) always has full access. Whatever its access, a key is a server-side secret.
Headers
A 1 to 256 printable-ASCII-character key for the whole batch. Replaying it with the same batch answers the first 202 as it was, with Idempotent-Replayed: true: nothing is sent or charged again; another batch under it answers 409 idempotency_key_reused. A batch's keys and single sends' keys are separate: the same key used on both is two keys. A key is free again after 24 hours.
strict (the default) or permissive. Resend's own name for it, x-batch-validation, is read the same way.
Body
The messages, 1 to 100: each an object with the fields of a send (from, to, cc, bcc, reply_to, subject, html, text, reference, headers, tags, scheduled_at), never attachments. The body may also be the array itself, as Resend takes it.
Partner keys only: the application, in the query string (?application=…) or on every item, the same for all.