API Documentation
Comprehensive reference for the 5chat REST API
The 5chat API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
New to our API? Start with our Installation Guide to get up and running in minutes, or read our Authentication Guide to learn about API tokens.
API Reference
Core API
Essential API endpoints for basic functionality.
/health
Health check endpoint
Returns health status and current timestamp.
Conversations
Manage conversations, retrieve conversation data, and handle conversation lifecycle.
/conversations
List conversations
Retrieves a paginated list of all conversations for the website associated with the API token.
/conversations/{token}
Get conversation
Retrieves a complete conversation including messages, visitor information, user details, summary, and localized tags.
/conversations/{token}/messages
List messages
Retrieves all messages for a specific conversation, along with conversation details, visitor info, user data, summary, and localized tags.
/conversations/{token}/rate
Rate a conversation
Allows a visitor to rate a conversation. The conversation can only be rated once.
Visitors
Manage visitor information and context.
/internal/visitors/tickets
Create a new ticket for visitor
Allows an authenticated visitor to create a support ticket. Requires x-visitor-id header for authentication.
/visitors/{token}
Get visitor by token
Retrieves visitor information by token for the authenticated website.
/visitors/{token}/context
Update visitor context
Updates context data for a visitor (geolocation data is automatically removed).
Widgets
Configure and manage chat widgets.
/widgets/{clientToken}
Get widget configuration by client token
Retrieves widget configuration data using the client token.
/widgets/{clientToken}
Update widget configuration
Updates widget settings for the authenticated website.
/widgets/{token}
Get widget configuration
Retrieves widget configuration.
Statistics
Access statistics and analytics data.
/statistics/current
Get current statistics for authenticated website
Retrieves current statistics for the authenticated website.
Tickets
API endpoints for tickets (requires authentication and permissions).
/tickets
Get all tickets for the website
Retrieves paginated tickets for the authenticated website with optional filtering.
/tickets
Create a new ticket
Creates a new ticket for the authenticated website.
/tickets/{id}
Get a ticket by ID
Retrieves a specific ticket by ID for the authenticated website.
/tickets/{id}
Update a ticket
Updates specific fields of an existing ticket.
/tickets/{id}
Delete a ticket
Permanently deletes a ticket.
/tickets/{id}/status
Update ticket status
Updates the status of a specific ticket.
/tickets/{id}/messages
Add message to ticket
Adds a new message to an existing ticket.
API Access Token
Base URL
https://api.5chat.io