Docs

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.

get/health

Health check endpoint

Returns health status and current timestamp.

PublicApi
View details

Conversations

Manage conversations, retrieve conversation data, and handle conversation lifecycle.

get/conversations

List conversations

Retrieves a paginated list of all conversations for the website associated with the API token.

Conversations
View details
get/conversations/{token}

Get conversation

Retrieves a complete conversation including messages, visitor information, user details, summary, and localized tags.

Conversations
View details
get/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
View details
post/conversations/{token}/rate

Rate a conversation

Allows a visitor to rate a conversation. The conversation can only be rated once.

Conversations
View details

Visitors

Manage visitor information and context.

post/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.

Internal Visitor API
View details
get/visitors/{token}

Get visitor by token

Retrieves visitor information by token for the authenticated website.

Visitors
View details
patch/visitors/{token}/context

Update visitor context

Updates context data for a visitor (geolocation data is automatically removed).

Visitors
View details

Widgets

Configure and manage chat widgets.

get/widgets/{clientToken}

Get widget configuration by client token

Retrieves widget configuration data using the client token.

Widget Management
View details
patch/widgets/{clientToken}

Update widget configuration

Updates widget settings for the authenticated website.

Widget Management
View details
get/widgets/{token}

Get widget configuration

Retrieves widget configuration.

Widget Management
View details

Statistics

Access statistics and analytics data.

get/statistics/current

Get current statistics for authenticated website

Retrieves current statistics for the authenticated website.

Public Statistics API
View details

Tickets

API endpoints for tickets (requires authentication and permissions).

get/tickets

Get all tickets for the website

Retrieves paginated tickets for the authenticated website with optional filtering.

Tickets
View details
post/tickets

Create a new ticket

Creates a new ticket for the authenticated website.

Tickets
View details
get/tickets/{id}

Get a ticket by ID

Retrieves a specific ticket by ID for the authenticated website.

Tickets
View details
patch/tickets/{id}

Update a ticket

Updates specific fields of an existing ticket.

Tickets
View details
delete/tickets/{id}

Delete a ticket

Permanently deletes a ticket.

Tickets
View details
patch/tickets/{id}/status

Update ticket status

Updates the status of a specific ticket.

Tickets
View details
post/tickets/{id}/messages

Add message to ticket

Adds a new message to an existing ticket.

Tickets
View details

API Access Token

Base URL

https://api.5chat.io