Skip to main content

Open API

Use REST APIs to integrate deeply with TWT Chat, manage chat sessions, send messages, and synchronize customer data.

What You Can Do​

  • Create one-to-one chats or group chats from your server, including batch operations
  • Delete or dissolve chats and clean up data from business workflows
  • Manage FAQ and web/article knowledge entries in the knowledge base
  • Protect every API request with HMAC-SHA256 request signing

How To​

  1. Authentication and Signature - Generate request signatures before calling any API
  2. Live chat APIs - Create Session, Batch Create Sessions, Create Group, and deletion / dissolve APIs
  3. Live session APIs - Create Agent Session, Create Robot Session, and Add Agents
  4. Knowledge Base APIs - Create, edit, and delete FAQ entries; create and delete web entries; create, edit, and delete article entries
  5. Error Code Reference - Understand the unified error response format

Base URL: https://apichat.twt.com, over HTTPS, with JSON request and response bodies.

API Overview​

APIMethodModuleDescription
Authentication and Signature—AuthenticationHMAC-SHA256 request signing, required for every API
Create SessionPOSTLive ChatCreate a single one-to-one chat session
Batch Create SessionsPOSTLive ChatCreate one-to-one chat sessions in batch
Create GroupPOSTLive ChatCreate group chats in batch
Delete SessionPOSTLive ChatDelete a single chat session
Dissolve GroupPOSTLive ChatDissolve a single group chat
Batch Dissolve GroupsPOSTLive ChatDissolve group chats in batch
Create Agent SessionPOSTLive SessionCreate a session and assign the responsible agent plus participants
Create Robot SessionPOSTLive SessionCreate a session handled by Autopilot
Add AgentsPOSTLive SessionAdd agents to an existing ticket session
Knowledge Base APIsPOSTKnowledge BaseManage FAQ entries and web/article knowledge entries (article editing supported)
Error Code Reference—CommonUnified error response format

What You Get​

  • Connect TWT Chat to your own business workflows for automated chat operations
  • Start chats proactively from the server side without manual agent actions
  • Integrate with CRM, ticketing, and internal systems
Need an account?

Create a free TWT Chat account to get your API credentials.