Introduction to REST API
- July 13, 2025
- 4 mins read
Table of Content
This document will help you to use REVE Chat’s messaging API for automating and enhancing the overall quality of your customer service.
Basic API Usage
All REVE Chat API requests start with https://api.revechat.com/api/
The next segment of the URI (Uniform Resource Identifier) path depends on the type of request.
The examples in the docs are CURL statements. You can run the statements on a command line or postman to try out different API requests.
Example:
https://api.revechat.com/
How to get your Account ID?
To use REVE Chat APIs, you’ll need both your Account ID and Auth Token. If you’re unsure how to find your Account ID, follow these steps:
- Login to your Reve Chat portal.
- Navigate to the Settings from the vertical navbar
- From the left side menus, select Chat Widget
- You will get list of Chat Widget(s) in this page.
- Hover your mouse on any of the widget and click on the ‘Default Widget’ Text.
- Go the Code Snippet tab from the top to get your Account ID.
Alternatively go to this link and get your Account ID as marked in the below screenshot.
Example:
curl --location -g 'https://api.revechat.com/api/chats/{account_id}/' \
--header 'Authorization: paste your authorization key here' \
--data ''
How to get your Authorization key?
To use REVE Chat APIs, you must generate an Auth Token from your account. Follow these steps to generate your token:
- Login to your Reve Chat portal.
- Navigate to the Settings from the vertical navbar
- From the left side menus, expand the Security Menu and click on Auth Key
- Generate your Token, then Copy the token to use in the API. The generated token will be valid for 30 days from the time of creation.
Example:
curl --location -g 'https://api.revechat.com/api/chats/{account_id}/' \
--header 'Authorization: paste your authorization key here' \
--data ''
Note: API access is limited and available upon request. If you don’t see this option in your account, please contact the REVE Chat Helpdesk or email us at [email protected].
Rate Limit
The REVE Chat API is rate limited. We only allow a certain number of requests per minute. We reserve the right to adjust the rate limit for given endpoints in order to provide a high quality of service for all clients.
If the rate limit is exceeded, REVE Chat will respond with a HTTP 429 Too Many Requests response code, a body that details the reason for the rate limiter kicking in, and the amount of time you have to wait for making further requests.
Request Format
All the API requests in REVE Chat API are done through GET method.
The Endpoints can be invoked by API calling with optional query parameters. The parameters undergoes validation in order to follow certain input format, which are described in their respective sections below. In case of invalid format, the system returns error consisting of status code and probable root cause.
While using multiple query parameters, the system returns errors for each and every input parameter. Hence, you will find all the error messsages for all the invalid input parameters, if any case of multipule invalid parameters.
All API requests must be made over HTTPS.
Example:
curl --location 'https://api.revechat.com/api/chats/8683034?agent_id=81830&page_no=1&agent_email_id=talha%40revechat.com&date_from=1747119480000&date_to=1752389880000' \
--header 'Authorization: eyJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50SWQiOiI4NjgzMDM0Iiwic3ViIjoiYXV0aG9yaXphdGlvbiIsImV4cCI6MTc1NDk4MTM4MSwiaWF0IjoxNzUyMzg5MzgxfQ.yZ2jyKiY-dKCwDU_V09shdOugJKHaczMWlVFuitYQ9Q' \
--header 'Cookie: revechatLocaleCookie=en'
Response Format
For each valid request, REVE Chat API returns response in “application/.json” type. All the resultsets are in .json format for later usability.
While encountering any errors, the system generates error status code and error message containing possible root cause of error, and returns it in “application/.json” format.
Explore API Response format from Chats API or Agents API.
Date Format
In REVE Chat API, all the dates are managed in UTC time, i.e., GMT+0.
Hence, the REVE Chat system assumes the input date range parameters for searching purposes to follow UTC time. We accept the date range parameters to in Timestamp in millisecond format, any other format will raise error. Additionally, in response, the values are returned in milliseconds equivalent to the date-time in UTC time.
Example:
To query results in date range from May 29, 2025 12:00:00 AM to June 13, 2025 12:00:00 AM,
The query parameter would be:
- ‘date_from’= 1748476800000
- ‘date_to’= 1749772800000
Time Zone
By default, the TimeZone for all the date are considered to be in UTC time, i.e., GMT + 0. While using the API you must consider adding additional GMT offset in order to convert the date & time to your desired timezone.
Example:
If your timezone is New York (NY), which is GMT-5. In this case, all you have to do is add the GMT offset, in this case it is (-5), to the api date results in order to get it in NY TimeZone.
To query results in date range from May 29, 2025 12:00:00 AM to June 13, 2025 12:00:00 AM where timezone is GMT-5
- ‘date_from’=1748476800000
- ‘date_to’= 1749772800000