curl -X POST https://tawked.com/v1/email/received/test \
-H "Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxx"const res = await fetch("https://tawked.com/v1/email/received/test", {
method: "POST",
headers: {
Authorization: "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx",
},
});
const data = await res.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/email/received/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/received/test",
headers={"Authorization": "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx"},
)
data = res.json(){
"id": "0199f3c0-6a7b-7c8d-9e0f-1a2b3c4d5e6f",
"event": "email.received",
"mode": "test",
"deliveries": 1,
"data": {
"id": "0199f3c0-6a7b-7c8d-9e0f-1a2b3c4d5e6f",
"address": {
"id": "0199f2b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
"domain": "acme.inbound.tawked.com",
"kind": "hosted"
},
"to": [
"test@acme.inbound.tawked.com"
],
"from": {
"name": "Sara",
"address": "sara@example.com"
},
"subject": "رسالة تجربة",
"spam": false,
"has_attachments": false,
"attachments_count": 0,
"size": 2048,
"status": "ready",
"thread": null,
"received_at": "2026-10-26T09:12:03+00:00",
"envelope_from": "sara@example.com",
"message_id": "<test-event@example.com>",
"in_reply_to": null,
"authentication": {
"spf": "pass",
"dkim": "pass",
"dmarc": "pass",
"dmarc_policy": null
},
"parse": "ready",
"attachments": []
}
}{
"error": "service_required"
}{
"error": "unauthorized"
}{
"error": "test_key_required",
"message": "A received e-mail is simulated with a test key (tk_test_); a live key receives real mail at its addresses."
}{
"error": "service_not_found"
}{
"error": "test_mode_limit_reached"
}{
"error": "internal_error"
}Simulate a received email
With a test key (tk_test_) holding email:send: sends one email.received webhook in test mode ("mode": "test" in the envelope) to the endpoints that receive test events, as if a message had reached the application’s hosted address (else its first). Nothing is received, stored or charged, so the id is the event’s alone: the received e-mail reads answer it 404. A live key answers 403 test_key_required. Counts against test mode’s 1000 a day for an application (Tawked’s limit). Takes no body.
curl -X POST https://tawked.com/v1/email/received/test \
-H "Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxx"const res = await fetch("https://tawked.com/v1/email/received/test", {
method: "POST",
headers: {
Authorization: "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx",
},
});
const data = await res.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/email/received/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/received/test",
headers={"Authorization": "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx"},
)
data = res.json(){
"id": "0199f3c0-6a7b-7c8d-9e0f-1a2b3c4d5e6f",
"event": "email.received",
"mode": "test",
"deliveries": 1,
"data": {
"id": "0199f3c0-6a7b-7c8d-9e0f-1a2b3c4d5e6f",
"address": {
"id": "0199f2b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
"domain": "acme.inbound.tawked.com",
"kind": "hosted"
},
"to": [
"test@acme.inbound.tawked.com"
],
"from": {
"name": "Sara",
"address": "sara@example.com"
},
"subject": "رسالة تجربة",
"spam": false,
"has_attachments": false,
"attachments_count": 0,
"size": 2048,
"status": "ready",
"thread": null,
"received_at": "2026-10-26T09:12:03+00:00",
"envelope_from": "sara@example.com",
"message_id": "<test-event@example.com>",
"in_reply_to": null,
"authentication": {
"spf": "pass",
"dkim": "pass",
"dmarc": "pass",
"dmarc_policy": null
},
"parse": "ready",
"attachments": []
}
}{
"error": "service_required"
}{
"error": "unauthorized"
}{
"error": "test_key_required",
"message": "A received e-mail is simulated with a test key (tk_test_); a live key receives real mail at its addresses."
}{
"error": "service_not_found"
}{
"error": "test_mode_limit_reached"
}{
"error": "internal_error"
}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.