Textchat V2 API
API Specification of the Parloa TextchatV2 API
The Textchat V2 API allows you to integrate a chatbot into your application or chat system. With this API, you can manage conversations by sending requests and receiving responses from the bot. This guide explains how to use the API, even if you are new to technical concepts.
How It Works
The API works through a single URL (endpoint). You send data about the conversation, such as a userâs message or an event like starting or ending the chat, and the bot sends a response back. The bot uses this data to understand the user and keep track of the conversation.
Key Concepts
Event: An action that happens during a conversation, such as starting, sending a message, or ending the chat.
Session: A conversation instance between the user and the chatbot. Each session has a unique ID to keep track of the chat history.
Bearer Token: A type of security key that ensures only authorized users can access the bot.
Getting Started
Before you begin, make sure the following prerequisites are met:
You have signed up on the and obtained your API key.
Your supports requests. (For example, you can use tools like
curl
or Postman).You are familiar with JSON, a format used for sending and receiving data in this API.
Endpoint
To test specific parts of the chatbot via the API, such as verifying if an intent is recognized, send your requests to the following URL (referred to as the endpoint):
Replace
<releaseId>
with the unique ID of your chatbot release.Always include the parameter
platform=textchatV2
.
Authentication
The API requires authentication to ensure only authorized users can send requests. Use the Bearer Token generated during your chatbot setup. Include it in the Authorization header of your request.
Example Format:
Conversation Protocol
Ending a Conversation
To end a session, send a TextchatV2QuitEvent
. This event signals the termination of the chat session and instructs Parloa RBA to:
Reset the conversation context.
Clear session-specific data, such as state and session-scoped variables.
Trigger the
PARLOA.EndConversation
event, ensuring accurate reporting.
If the TextchatV2QuitEvent
is not sent, the session remains open indefinitely. Persistent data, such as storage variables with defined lifetimes, will not be cleared until explicitly reset. This behavior may impact reporting accuracy and session-specific analytics.
Key Notes on Session Handling
Sessions are not time-scoped and persist until explicitly terminated.
Persistent data (such as storage variables) remains across sessions unless manually reset.
The method for detecting conversation termination differs by platform:
For TextchatV2, send the
TextchatV2QuitEvent
.For Phone deployments, the system detects session termination through events such as a call hangup.
Request Parameters
dialog
(Required, string): The uniquereleaseId
of your Textchat V2 release.platform
(Required, string): Must be set to"textchatV2"
for this API.
Making a POST Request
To communicate with Parloa's chatbot, send a POST request to the API endpoint. Every request must include:
Use the API key from the Parloa developer platform for authentication.
Replace
<user-id>
,<session-id>
, and<release-id>
with relevant values.Specify the type of action (for example,
launch
,message
, orquit
).
Response
The API returns a JSON-formatted response. Use the fields below to process the chatbot's response programmatically.
Error Handling
The API provides status codes to indicate success or failure:
200 OK
The request was successful, and the bot's response is included.
400 Bad Request
The request was invalid or missing required information.
401 Unauthorized
Your API key is missing or incorrect. Verify the Authorization
header.
404 Not Found
The chatbot release or session could not be found. Check releaseId
and sessionId
.
500 Internal Server Error
An error occurred on the server. Try again later or contact support.
Last updated
Was this helpful?