Skip to main content
PUT
cURL
Guide: Connected apps

Authorizations

Authorization
string
header
required

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), 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. 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

Idempotency-Key
string

A 1 to 128 printable-ASCII-character 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.

Body

application/json
menu
object
required

The menu: opening (the first message, up to 1024 characters), list_button (the list's button label, up to 20 characters; «القائمة» or Menu by default), away (the line sent outside the team's working hours instead of handing over, or null for Tawked's default; the hours are set in the console), fallback (sent when the customer writes instead of choosing, up to 1024 characters, or null for Tawked's default) and choices, up to 10. A choice is { id, title, description, action }: id optional (c_ then 4 to 12 lowercase letters or digits), title up to 20 characters as buttons (1 to 3 choices) or 24 as a list (4 to 10), description a list item's second line up to 72 characters or null. action is one of { "type": "reply", "text", "link" } (the text, and an https link under it or null); { "type": "submenu", "text", "choices" } (up to 10 choices, one level only; Tawked adds «رجوع» when there is room); { "type": "ask", "detail", "label", "question", "tag", "assign" } (detail is order_number, name, city or custom, label for custom only: asks one detail, then hands the conversation to the team with the answer and the tag); { "type": "team", "line", "tag", "assign" } (hands the conversation to the team; line is what the customer is told, or null); { "type": "radeef" } (hands it to Radeef). tag is the label the conversation gets in Tawked Chat, 2 to 40 letters, digits, _ or -; assign is { "mode": "auto" }, Tawked Chat assigning as usual. The top level needs a team choice. Refused outright: required, not_object, too_large (over 64 KB or 256 choices in all).

Example:

Response

Saved

draft_saved_at
string<date-time>
problems
(string | null)[]
menu
object