🐙 Intro
Welcome to the documentation for the Chat feature of our API. This feature provides functionality for accessing specific chat details and sending pre-defined template messages. You can use these endpoints to retrieve information about individual chats and send template messages to contacts.
🔒 Authentication
To access any of the contacts feature endpoint, you must provide a valid API key in all your requets.
To know more about out authentication methods you can access the Authentication document.
🌐 Endpoints
- ⚠️ Deprecated POST /chat/conversation/send-template: Send a selected template message to contacts;
- POST /chat/send-template: Send a selected template message to contacts;
- POST /chat/{id}/messages: Send a simple message to a open chat;
- GET /chat/{id}: Retrieve a specific chat of your application;
- GET /chat/{id}/messages: Retrieve all messages by passing a specific chat;
- GET /chat: Retrieve all chats in an environment or filter a chat using search criteria;
- GET /chat/{id}/events: Retrieve all chat events;
- GET /chat/templates-message: Retrieve all templates message on environment;
- GET /chat/numbers: Retrieve all numbers availables for send templates message.
📔 Filters, Pagination and Sorting
To filter chats you can use the GET /chat endpoint with the filters based on specific search criteria and use the pagination and sort to organize your result as you wish.
📗 Available Filters
Property | Format | Description |
---|---|---|
number | number | Chat identification number |
createdAt | date | Chat creation date |
updatedAt | date | Chat last updated date |
channel | string | Channel where the chat was started |
contact.phoneContacts.number | string | Phone number of the contact who initiated the chat |
contact.name | string | Name of the contact who initiated the chat |
contact.email | string | Email of the contact who initiated the chat |
status | string | Status of the chat |
withBot | boolean | Indicator if a bot was used in the chat |
group.id | string | Group identification |
agent.id | string | Agent identification |
⚠️ When a date is not provided for filtering chats, the search will be limited to chats created one month ago.
⚠️ The dates provided in the filter cannot be greater than one year.
The GET /chat/{id}/messages works only with pagination parameter
To know more about how to use these filtering and organization tools look at these documents:
You can use the sorting (sort), pagination (page and limit), and filtering (filters) features together to tailor your API queries and retrieve precisely the data you need.