Events
Events are sent to a chat through thesend_event method.
File
The File event indicates about an uploaded file.Request
Custom event properties organized by namespace and property name. See
Properties.
The file URL. It must point to the Text CDN. Use the URL returned by
upload_file.Response
Custom event properties organized by namespace and property name. See
Properties.
Sample File in response
Form
The Form event contains an empty form to be filled out by the customer. It doesn’t matter how the form is configured or what fields it has — it can be any event of typeform. Currently, the Form events are not supported natively in Text, but you can leverage this feature in a custom chatting solution.
Request
Custom event properties organized by namespace and property name. See
Properties.
The fields in the form. See Form fields.
Response
Custom event properties organized by namespace and property name. See
Properties.
The form type. Common values include
prechat, postchat, and
ask_for_email. This field is absent from chats started before the field
was introduced.The fields in the form. See Form fields.
Sample Form in response
Filled form
The Filled form event contains data from a form (prechat or postchat survey).Request
Custom event properties organized by namespace and property name. See
Properties.
The completed form fields. See Filled form fields.
Response
Custom event properties organized by namespace and property name. See
Properties.
The form type. Common values include
prechat, postchat, and
ask_for_email. This field is absent from chats started before the field
was introduced.The completed form fields. See Filled form fields.
Sample Filled form in response
Message
The Message event contains text message to other chat users.Request
The message text. The raw text can be up to 16 KB. A single UTF-8 character
can use up to 4 bytes. Split longer text into multiple messages.
Custom event properties organized by namespace and property name. See
Properties.
Response
Custom event properties organized by namespace and property name. See
Properties.
Sample Message in response
Rich message
Rich message (RM) event contains a rich message data structure.Request
Custom event properties organized by namespace and property name. See
Properties.
The template that determines how the rich message is displayed. Possible
values:
cards, sticker, quick_replies.Response
Custom event properties organized by namespace and property name. See
Properties.
Sample Rich message in response
Custom
Custom event is an event with customizable payload.Request
Custom event properties organized by namespace and property name. See
Properties.
Response
The event creation timestamp generated by the server in RFC 3339 format with
microsecond precision.
Custom event properties organized by namespace and property name. See
Properties.
Sample Custom event in response
System message
System message event is native system event sent in specific situations.Request
The system message type. See System message
types.
Response
The event creation timestamp generated by the server in RFC 3339 format with
microsecond precision.
The system message type. See System message
types.
Sample System message in response
Users
Users represent agents and customers participating in chats.Agent
Fields
The timestamp of the most recent event seen by the agent, in RFC 3339
format. All earlier events are considered seen.
Sample agent data structure
My profile
Fields
The agent’s routing status. Possible values:
accepting_chats,
not_accepting_chats, offline. The offline value applies only to bot
agents.The timestamp of the most recent event seen by the agent, in RFC 3339
format. All earlier events are considered seen.
Sample My profile data structure
Customer
Fields
The date and time of the most recent event created by an agent in the
customer’s chats, in RFC 3339 format.
Whether the customer confirmed their email address. See Request email
verification.
The date and time of the most recent event seen by the customer, in RFC
3339 format. All earlier events are considered seen.
Sample Customer data structure
Other common structures
These structures describe shared objects used throughout the Agent Chat API.Access
Sample Access data structure
Chats
Fields
The chat thread. See Threads.
Sample Chat data structure
Chat summaries
Chat summary is similar to the Chat data structure. The difference is that Chat contains athread object, while Chat summary includes last_thread_summary and last_event_per_type.
Fields
A summary of the most recent thread. See Threads.
Custom chat properties organized by namespace and property name. See
Properties.
The groups that can access the chat. See Access.
Sample Chat summary data structure
Form fields
A component of the Form event.Sample Form fields
Filled form fields
A component of the Filled form event.Sample Filled form fields
Properties
Properties are key-value stores. You can set them on a chat, thread, or event. For more information, see the Configuration API documentation.Sample Properties data structure
Threads
Fields
The thread’s queue information. This field is present while the chat is
waiting for an available agent.
The server-generated thread creation timestamp in RFC 3339 format with
microsecond precision.
Sample Thread data structure
Sample restricted Thread data structure