curl -X PATCH https://tawked.com/v1/partner/applications/store_88/verify-settings \
-H "Authorization: Bearer tk_partner_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"code_length": 8,
"ttl_seconds": 600,
"android_app_hash": "FA+9qCX9VSu"
}'const res = await fetch("https://tawked.com/v1/partner/applications/store_88/verify-settings", {
method: "PATCH",
headers: {
Authorization: "Bearer tk_partner_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
"code_length": 8,
"ttl_seconds": 600,
"android_app_hash": "FA+9qCX9VSu"
}),
});
const data = await res.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/partner/applications/{external_id}/verify-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'code_length' => 123,
'ttl_seconds' => 123,
'max_attempts' => 123,
'max_per_hour' => 123,
'autofill_domain_enabled' => true,
'android_app_hash' => '<string>',
'daily_spend_cap_halalas' => 123,
'max_per_ip_per_hour' => 123,
'max_new_destinations_per_hour' => 123
]),
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.patch(
"https://tawked.com/v1/partner/applications/store_88/verify-settings",
headers={"Authorization": "Bearer tk_partner_xxxxxxxxxxxxxxxxxxxx"},
json={
"code_length": 8,
"ttl_seconds": 600,
"android_app_hash": "FA+9qCX9VSu"
},
)
data = res.json(){
"external_id": "store_88",
"verify": {
"code_length": 8,
"ttl_seconds": 600,
"max_attempts": 3,
"max_per_hour": 5,
"autofill_domain": "flowers.example",
"autofill_domain_enabled": true,
"android_app_hash": "FA+9qCX9VSu",
"daily_spend_cap_halalas": null,
"max_per_ip_per_hour": 20,
"max_new_destinations_per_hour": 300
}
}{
"error": "invalid_request",
"fields": [
"code_length",
"ttl_seconds"
]
}{
"error": "unauthorized"
}{
"error": "ip_not_allowed"
}{
"error": "not_found"
}{
"error": "application_archived"
}{
"error": "too_many_requests"
}{
"error": "internal_error"
}Update the verify settings
Changes any subset of the application’s verify settings. Send the fields at the top level of the body or nested under verify; omitted fields stay as they are, a value out of range refuses the whole request with the offending names in fields, an empty or unrecognised patch is refused with fields: ["verify"], and nothing here re-screens the names or changes the status. The answer is every setting in force after the change.
curl -X PATCH https://tawked.com/v1/partner/applications/store_88/verify-settings \
-H "Authorization: Bearer tk_partner_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"code_length": 8,
"ttl_seconds": 600,
"android_app_hash": "FA+9qCX9VSu"
}'const res = await fetch("https://tawked.com/v1/partner/applications/store_88/verify-settings", {
method: "PATCH",
headers: {
Authorization: "Bearer tk_partner_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
"code_length": 8,
"ttl_seconds": 600,
"android_app_hash": "FA+9qCX9VSu"
}),
});
const data = await res.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/partner/applications/{external_id}/verify-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'code_length' => 123,
'ttl_seconds' => 123,
'max_attempts' => 123,
'max_per_hour' => 123,
'autofill_domain_enabled' => true,
'android_app_hash' => '<string>',
'daily_spend_cap_halalas' => 123,
'max_per_ip_per_hour' => 123,
'max_new_destinations_per_hour' => 123
]),
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.patch(
"https://tawked.com/v1/partner/applications/store_88/verify-settings",
headers={"Authorization": "Bearer tk_partner_xxxxxxxxxxxxxxxxxxxx"},
json={
"code_length": 8,
"ttl_seconds": 600,
"android_app_hash": "FA+9qCX9VSu"
},
)
data = res.json(){
"external_id": "store_88",
"verify": {
"code_length": 8,
"ttl_seconds": 600,
"max_attempts": 3,
"max_per_hour": 5,
"autofill_domain": "flowers.example",
"autofill_domain_enabled": true,
"android_app_hash": "FA+9qCX9VSu",
"daily_spend_cap_halalas": null,
"max_per_ip_per_hour": 20,
"max_new_destinations_per_hour": 300
}
}{
"error": "invalid_request",
"fields": [
"code_length",
"ttl_seconds"
]
}{
"error": "unauthorized"
}{
"error": "ip_not_allowed"
}{
"error": "not_found"
}{
"error": "application_archived"
}{
"error": "too_many_requests"
}{
"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.
Headers
A 1 to 128 printable-ASCII key you generate, scoped to your API key. Replaying it with the same request answers the original 2xx unchanged, with the response header Idempotent-Replayed: true, and runs nothing again; the same key with another request answers 409 idempotency_key_reused, and a request still in flight 409 idempotency_in_progress. A refused request is never stored, so a corrected retry under the same key runs. Keys expire after 24 hours.
Path Parameters
Your own id for the application, as given at provisioning.
Body
Digits in the code, 4 to 8.
How long a code lives, in seconds: one of 60, 120, 180, 300, 600, 900.
Wrong codes allowed per verification, 1 to 5.
Sends to one destination per hour, 1 to 10.
Whether the @domain #code line goes out at the end of the SMS. The domain itself is derived from the website and cannot be set here.
The 11-character hash for Google's SMS Retriever on Android, or null to clear it.
A cap on one day's charges for this application in halalas (Riyadh calendar day), 100 to 100000000, or null for no cap. Over it, sends answer 429 spend_cap_reached.
Starts per end-user IP per hour, 1 to 1000, checked only when client_ip is passed on start. Over it, that address answers 429 ip_rate_limited.
Distinct new destinations per hour, 10 to 100000. Crossing it pauses the application (service.paused) until you unpause it.