curl --request GET \
--url https://api.yourdomain.com/api/chats/chat_123abc \
--header 'Authorization: Bearer <token>'
const response = await fetch('https://api.yourdomain.com/api/chats/chat_123abc', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "https://api.yourdomain.com/api/chats/chat_123abc"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
data = response.json()
{
"success": true,
"chat": {
"id": "chat_123abc",
"name": "Project Discussion",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T14:20:00Z"
},
"message": "Chat retrieved successfully"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Chat not found"
}
Chat Management
Get Chat
Retrieves a specific chat by ID for the authenticated user
GET
/
api
/
chats
/
{id}
curl --request GET \
--url https://api.yourdomain.com/api/chats/chat_123abc \
--header 'Authorization: Bearer <token>'
const response = await fetch('https://api.yourdomain.com/api/chats/chat_123abc', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "https://api.yourdomain.com/api/chats/chat_123abc"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
data = response.json()
{
"success": true,
"chat": {
"id": "chat_123abc",
"name": "Project Discussion",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T14:20:00Z"
},
"message": "Chat retrieved successfully"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Chat not found"
}
Path Parameters
string
required
Chat ID
Response
boolean
Indicates if the request was successful
object
The chat object containing all chat details
string
Response message
curl --request GET \
--url https://api.yourdomain.com/api/chats/chat_123abc \
--header 'Authorization: Bearer <token>'
const response = await fetch('https://api.yourdomain.com/api/chats/chat_123abc', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "https://api.yourdomain.com/api/chats/chat_123abc"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
data = response.json()
{
"success": true,
"chat": {
"id": "chat_123abc",
"name": "Project Discussion",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T14:20:00Z"
},
"message": "Chat retrieved successfully"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Chat not found"
}
⌘I

