API References - Real Time Messaging
Last updated
Last updated
Welcome to the Awesome Chat API documentation! This API offers a robust set of endpoints for creating and managing chat platforms. Features include Room Management, Message Handling, Polls, Chat History, Message Replies, Room Role-Based Access Control (RBAC), Admin Moderation, User Management, Attachments, Emojis and Efficient Search Capabilities.
Get started by obtaining your API key and referring to detailed documentation for each endpoint. Ensure proper authentication and authorization for secure integration. Create a dynamic and feature-rich chat platform with the Awesome Chat API!
For a full list of APIs go to:
Channel ID
channel123
Response schema for a room
{"room":{"allowed_user_ids":["user_1_id","user_2_id"],"app_id":"789","created_by":"1001","id":123,"owner_id":456,"session_id":"channel123","status":"active"}}
Room response
Channel ID
channel123
Number of messages to retrieve
10
Offset for pagination
0
List of message IDs
[2001,2002]
messages group by day
false
Response schema for a single message
{"content":"Hello, world!","created_by":"123","created_by_name":"John Doe","id":1001,"inserted_at":"2023-11-20T08:30:00Z"}
Message response
Channel ID
channel123
Search term
keyword
Response schema for a single message
{"content":"Hello, world!","created_by":"123","created_by_name":"John Doe","id":1001,"inserted_at":"2023-11-20T08:30:00Z"}
Message response
Channel ID
channel123
Message ID
1001
Response schema for a single message
{"content":"Hello, world!","created_by":"123","created_by_name":"John Doe","id":1001,"inserted_at":"2023-11-20T08:30:00Z"}
Message response
Channel ID
channel123
Message ID
1001
messages group by day
false
Response schema for a single message
{"content":"Hello, world!","created_by":"123","created_by_name":"John Doe","id":1001,"inserted_at":"2023-11-20T08:30:00Z"}
Message response with replies
Channel ID
channel123
Message ID
1001
Response schema for checking if the current user has voted for a poll
{"is_voted":true}
Is voted response
Channel ID
channel123
Message ID
1001
Response schema for getting total votes for a poll
{"votes":[{"answer":1,"user_id":"123"},{"answer":2,"user_id":"456"}]}
Total votes response
Channel ID
channel123
Message ID
1001
Poll Option ID
1
Response schema for a user's answer for a poll
{"poll_answer":{"answer":1,"user_id":"123"}}
Poll answer response
Channel ID
channel123
User ID
1001
Response schema for getting user details
{"user":{"id":"789","name":"John Doe"}}
User response
Channel ID
channel123
User ID
1001
Response schema for a room
{"room":{"allowed_user_ids":["user_1_id","user_2_id"],"app_id":"789","created_by":"1001","id":123,"owner_id":456,"session_id":"channel123","status":"active"}}
Room response
Channel ID
channel123
User ID
1001
Response schema for a room
{"room":{"allowed_user_ids":["user_1_id","user_2_id"],"app_id":"789","created_by":"1001","id":123,"owner_id":456,"session_id":"channel123","status":"active"}}
Room response
Search term
john
Response schema for searching users
{"users":[{"id":"789","name":"John Doe"},{"id":"123","name":"Johnathan"}]}
Users response
Response schema for multiple rooms
{"rooms":[{"allowed_user_ids":["user_1_id","user_2_id"],"app_id":"789","created_by":"1001","id":123,"owner_id":789,"session_id":"channel123","status":"active"},{"allowed_user_ids":["user_3_id","user_4_id"],"app_id":"123","created_by":"1002","id":456,"owner_id":789,"session_id":"channel456","status":"inactive"}]}
Rooms response
Parameters for creating a room
Allowed User IDs
Create Channel
Room status
Response schema for a room
{"room":{"allowed_user_ids":["user_1_id","user_2_id"],"app_id":"789","created_by":"1001","id":123,"owner_id":456,"session_id":"channel123","status":"active"}}
Room response
Channel ID
channel123
Parameters for deleting messages
If true, delete all messages in the channel
list of messages ids to delete
[2001,2002]
Response structure for message deletion
{"message":"Message deleted successfully"}
Message replies deleted successfully
Channel ID
channel123
Message ID
1001
Parameters for editing a message
New content for the message
Response schema for a single message
{"content":"Hello, world!","created_by":"123","created_by_name":"John Doe","id":1001,"inserted_at":"2023-11-20T08:30:00Z"}
Message response
Channel ID
channel123
Message ID
1001
Parameters for deleting message replies
List of reply message IDs to delete
[2001,2002]
Response structure for message deletion
{"message":"Message deleted successfully"}
Message replies deleted successfully
Generate a JWT token based on provided parameters.
Parameters for generating a token
API key tied to the Sariska account
Exp claim of JWT token
Nbf claim of JWT token
Scope of the token (messaging, media, sariska, or leave it blank)
User information
Response structure for the token generation
{"token":"your_generated_token_here"}
Token generated successfully
Get S3 presigned url and upload media to directly your s3 as you have configured in console
request for presigned url to upload and attach media
File name
some-s3-folder/file-name.jpeg
File extension
jpeg
Get S3 presigned url to upload and attach media
{"presigned_url":"url"}
Presigned URL generated successfully