This guide explains how to implement chat functionality using the UponAI Chat API — start a session, generate responses, and end the session.Documentation Index
Fetch the complete documentation index at: https://documentation.uponai.com/llms.txt
Use this file to discover all available pages before exploring further.
Create a Chat Agent
Before starting a chat session, you need a chat agent to handle the conversation.Refer to the Website Widget guide or the Create Chat Agent guide for setup instructions.
Create a Chat Session
Use the
create-chat API endpoint to start a session. The API returns a chat_id you’ll need for all subsequent requests.See the Create Chat API Reference for full parameter details.Create a Chat Completion
Use the
create-chat-completion endpoint to generate a response from your chat agent.The API returns the agent’s response in the messages array. All conversation history is automatically stored — you don’t need to manage conversation context yourself.See the Create Chat Completion API Reference for full parameter details.Retrieve Chat Details
Retrieve details about a chat session using the
get-chat endpoint, or list all sessions using POST /v3/list-chats.See the Get Chat API Reference and List Chats API Reference.SMS Integration
UponAI also supports Twilio SMS integration, letting you deploy chat agents to receive and respond to text messages. See the Enable SMS guide to set it up. Once configured, you’ll have access to:- Make an outbound SMS button to start a new SMS session
- Inbound and outbound SMS agent configuration
- Inbound webhook setup for receiving SMS messages
SMS conversations on a phone number can include multimedia (MMS). Text chat via the
create-chat-completion API does not support images or other multimedia.