Skip to main content

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.

This guide explains how to implement chat functionality using the UponAI Chat API — start a session, generate responses, and end the session.
1

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.
2

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.
3

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.
4

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.
5

End the Chat Session

End a completed conversation using the end-chat endpoint.
If Auto-Close Inactive Chats is enabled, chat sessions will automatically end when the timeout triggers. You can also end them at any time via the API.

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.