curl -X POST https://tawked.com/v1/email/messages \
-H "Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042-confirmation" \
-d '{
"from": {
"name": "متجر أكمي",
"address": "orders@acme.sa"
},
"to": "customer@example.com",
"subject": "طلبك رقم 1042 قيد التجهيز",
"html": "<p>مرحبًا سارة،</p><p>استلمنا طلبك رقم 1042 وهو قيد التجهيز الآن.</p>",
"text": "مرحبًا سارة،\nاستلمنا طلبك رقم 1042 وهو قيد التجهيز الآن.",
"reply_to": "support@acme.sa",
"reference": "order-1042"
}'const res = await fetch("https://tawked.com/v1/email/messages", {
method: "POST",
headers: {
Authorization: "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "order-1042-confirmation",
},
body: JSON.stringify({
"from": {
"name": "متجر أكمي",
"address": "orders@acme.sa"
},
"to": "customer@example.com",
"subject": "طلبك رقم 1042 قيد التجهيز",
"html": "<p>مرحبًا سارة،</p><p>استلمنا طلبك رقم 1042 وهو قيد التجهيز الآن.</p>",
"text": "مرحبًا سارة،\nاستلمنا طلبك رقم 1042 وهو قيد التجهيز الآن.",
"reply_to": "support@acme.sa",
"reference": "order-1042"
}),
});
const data = await res.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/email/messages",
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([
'application' => '<string>',
'from' => '<string>',
'to' => '<string>',
'cc' => '<string>',
'bcc' => '<string>',
'reply_to' => '<string>',
'subject' => '<string>',
'html' => '<string>',
'text' => '<string>',
'template' => [
],
'reference' => '<string>',
'headers' => [
],
'tags' => '<array>',
'scheduled_at' => '<string>',
'attachments' => '<array>'
]),
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",
headers={"Authorization": "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx", "Idempotency-Key": "order-1042-confirmation"},
json={
"from": {
"name": "متجر أكمي",
"address": "orders@acme.sa"
},
"to": "customer@example.com",
"subject": "طلبك رقم 1042 قيد التجهيز",
"html": "<p>مرحبًا سارة،</p><p>استلمنا طلبك رقم 1042 وهو قيد التجهيز الآن.</p>",
"text": "مرحبًا سارة،\nاستلمنا طلبك رقم 1042 وهو قيد التجهيز الآن.",
"reply_to": "support@acme.sa",
"reference": "order-1042"
},
)
data = res.json(){
"id": "3d9a7f2e-1c4b-4e8a-9f6d-2b5c8e1a7d40",
"status": "accepted",
"from": {
"name": "متجر أكمي",
"address": "orders@acme.sa"
},
"to": "customer@example.com",
"subject": "طلبك رقم 1042 قيد التجهيز",
"reference": "order-1042",
"price_halalas": 0,
"created_at": "2026-10-09T12:00:00+03:00"
}Send an email
Sends one message to up to 50 recipients (to, cc, bcc) from an address on a verified domain of the key’s application, and answers 202 with an id to track it. The message is charged and queued at once, and sent in its turn, or at scheduled_at. A recipient on the account’s suppression list is skipped and not charged. Each recipient is refunded once if it bounces, and the whole message if it fails or is canceled; a complaint keeps it. Two shapes: one to string and none of cc, bcc, tags or scheduled_at answers the original shape (to a string, no recipients; the first answer’s status is accepted, and a replay of the same Idempotency-Key answers the message as it stands, delivered, bounced or failed once it settled); any other send answers the extended shape, where to, cc, bcc, reply_to, recipients and tags are always arrays and cost counts the e-mails. cc, bcc, headers and tags are honoured. Any other field is ignored, not refused.
curl -X POST https://tawked.com/v1/email/messages \
-H "Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042-confirmation" \
-d '{
"from": {
"name": "متجر أكمي",
"address": "orders@acme.sa"
},
"to": "customer@example.com",
"subject": "طلبك رقم 1042 قيد التجهيز",
"html": "<p>مرحبًا سارة،</p><p>استلمنا طلبك رقم 1042 وهو قيد التجهيز الآن.</p>",
"text": "مرحبًا سارة،\nاستلمنا طلبك رقم 1042 وهو قيد التجهيز الآن.",
"reply_to": "support@acme.sa",
"reference": "order-1042"
}'const res = await fetch("https://tawked.com/v1/email/messages", {
method: "POST",
headers: {
Authorization: "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "order-1042-confirmation",
},
body: JSON.stringify({
"from": {
"name": "متجر أكمي",
"address": "orders@acme.sa"
},
"to": "customer@example.com",
"subject": "طلبك رقم 1042 قيد التجهيز",
"html": "<p>مرحبًا سارة،</p><p>استلمنا طلبك رقم 1042 وهو قيد التجهيز الآن.</p>",
"text": "مرحبًا سارة،\nاستلمنا طلبك رقم 1042 وهو قيد التجهيز الآن.",
"reply_to": "support@acme.sa",
"reference": "order-1042"
}),
});
const data = await res.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/email/messages",
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([
'application' => '<string>',
'from' => '<string>',
'to' => '<string>',
'cc' => '<string>',
'bcc' => '<string>',
'reply_to' => '<string>',
'subject' => '<string>',
'html' => '<string>',
'text' => '<string>',
'template' => [
],
'reference' => '<string>',
'headers' => [
],
'tags' => '<array>',
'scheduled_at' => '<string>',
'attachments' => '<array>'
]),
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",
headers={"Authorization": "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx", "Idempotency-Key": "order-1042-confirmation"},
json={
"from": {
"name": "متجر أكمي",
"address": "orders@acme.sa"
},
"to": "customer@example.com",
"subject": "طلبك رقم 1042 قيد التجهيز",
"html": "<p>مرحبًا سارة،</p><p>استلمنا طلبك رقم 1042 وهو قيد التجهيز الآن.</p>",
"text": "مرحبًا سارة،\nاستلمنا طلبك رقم 1042 وهو قيد التجهيز الآن.",
"reply_to": "support@acme.sa",
"reference": "order-1042"
},
)
data = res.json(){
"id": "3d9a7f2e-1c4b-4e8a-9f6d-2b5c8e1a7d40",
"status": "accepted",
"from": {
"name": "متجر أكمي",
"address": "orders@acme.sa"
},
"to": "customer@example.com",
"subject": "طلبك رقم 1042 قيد التجهيز",
"reference": "order-1042",
"price_halalas": 0,
"created_at": "2026-10-09T12:00:00+03:00"
}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 you generate, scoped to your API key, as on WhatsApp messages. Replaying the same key with the same message returns a 202 for that message, its status as it stands now, with the response header Idempotent-Replayed: true: nothing is sent or charged again. The same key with a different message (recipients, subject, body, reply-to, headers, tags, time or files) answers 409 idempotency_key_reused. A message that fails before it is sent releases the key, and a key is free again after 24 hours.
Body
{ "name": "…", "address": "…" }, or one string, "Name <orders@acme.sa>" or "orders@acme.sa". address must be on a verified domain of this application, any local part. Omitted, name is the domain's default from name and address its default local part (no-reply unless changed) on the application's verified domain.
The recipients: one address as a string, or an array of them. Each is a bare address or Name <address> (the name 1 to 120 printable characters). Required unless cc or bcc holds an address. Together to, cc and bcc hold at most 50 addresses (counted before duplicates are removed); an address given twice, in any case, is kept once, in the first of to, cc, bcc that holds it.
The plain-text body, shown by clients that do not render HTML. Give html, text or both.
{"id": "<id or alias>", "variables": {"KEY": "value"}, "version": "draft"}: a hosted template of the application, rendered when the message is accepted. html and text are then refused; subject overrides the template's, from and reply_to the version's. version: "draft" sends the draft, with a test key only.
Your own headers, { "Name": "value" }: at most 15, each name 1 to 126 header-name characters, each value one line of at most 870 characters. Tawked's own are refused with 422 header_not_allowed (From, To, Cc, Bcc, Reply-To, Subject, Date, Message-ID, the MIME and trace headers, any name starting X-Tawked-, Tawked-, ARC- or Resent-, and the sending service's own X- headers). List-Unsubscribe holds <https:…> or <mailto:…> URIs in ASCII; List-Unsubscribe-Post: List-Unsubscribe=One-Click needs an https: one (RFC 8058). The names are kept with the message; the values only until it is sent.
Your own labels, [{ "name": "category", "value": "order" }]: at most 20, each name and value 1 to 256 ASCII letters, digits, _ or -, names unique (in any case) and never message_id, application_id, account_id or one starting tawked. Returned on the message and its webhooks, and filterable in the list (tag=category:order).
Up to 10 files, each { "filename", "content", "content_type", "content_id" }: filename 1 to 255 characters without /, \ or control characters; content the bytes in standard base64; content_type optional, guessed from the extension else application/octet-stream; content_id optional, 1 to 255 of letters, digits and ._@-, which places the file inside the HTML (cid:) rather than attached. At most 10 MiB together once decoded; executables, scripts and shortcuts are refused. No extra price. Not with scheduled_at.