Get recent chats
curl --request POST \
--url https://app.sagepilot.ai/platform-api/v1/customers/recent_chats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({customerId: '<string>'})
};
fetch('https://app.sagepilot.ai/platform-api/v1/customers/recent_chats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.sagepilot.ai/platform-api/v1/customers/recent_chats"
payload = { "customerId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"id": "c8beea3e-8046-4dff-835f-ac2e12238a4a",
"workspace_id": "ab1360ce-ef91-4397-8fbd-3ed77ef80e08",
"code": 1000,
"created_at": "2026-02-07T08:33:06.697712Z",
"status": "closed",
"subject": "Initial greeting and introduction in a demo environment",
"sub_status": null,
"priority": "",
"agent_id": null,
"unread_status": false,
"channel_kind": "playground",
"message_content": "Hi — I’m here to help with QA and testing of the Sagepilot AI agent in this demo environment. I can run test scenarios, execute specific function calls, reproduce and diagnose errors, validate features or workflows, and fetch product/order data for testing.\n\nWhat would you like me to do right now? If you have a specific function, parameters, or a feature to validate, please share them and I’ll run the test.",
"message_role": "pilot",
"last_message_created_at": "2026-02-07T08:33:20.521000Z",
"message_agent_id": null,
"message_pilot_id": "8ecf3ded-7090-4997-9444-6c9f8c367f54",
"customer_name": "Vikram Singh Chundawat"
}
]
Get recent chats
List recent ticket chats for a customer.
POST
/
platform-api
/
v1
/
customers
/
recent_chats
Get recent chats
curl --request POST \
--url https://app.sagepilot.ai/platform-api/v1/customers/recent_chats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({customerId: '<string>'})
};
fetch('https://app.sagepilot.ai/platform-api/v1/customers/recent_chats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.sagepilot.ai/platform-api/v1/customers/recent_chats"
payload = { "customerId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"id": "c8beea3e-8046-4dff-835f-ac2e12238a4a",
"workspace_id": "ab1360ce-ef91-4397-8fbd-3ed77ef80e08",
"code": 1000,
"created_at": "2026-02-07T08:33:06.697712Z",
"status": "closed",
"subject": "Initial greeting and introduction in a demo environment",
"sub_status": null,
"priority": "",
"agent_id": null,
"unread_status": false,
"channel_kind": "playground",
"message_content": "Hi — I’m here to help with QA and testing of the Sagepilot AI agent in this demo environment. I can run test scenarios, execute specific function calls, reproduce and diagnose errors, validate features or workflows, and fetch product/order data for testing.\n\nWhat would you like me to do right now? If you have a specific function, parameters, or a feature to validate, please share them and I’ll run the test.",
"message_role": "pilot",
"last_message_created_at": "2026-02-07T08:33:20.521000Z",
"message_agent_id": null,
"message_pilot_id": "8ecf3ded-7090-4997-9444-6c9f8c367f54",
"customer_name": "Vikram Singh Chundawat"
}
]
[
{
"id": "c8beea3e-8046-4dff-835f-ac2e12238a4a",
"workspace_id": "ab1360ce-ef91-4397-8fbd-3ed77ef80e08",
"code": 1000,
"created_at": "2026-02-07T08:33:06.697712Z",
"status": "closed",
"subject": "Initial greeting and introduction in a demo environment",
"sub_status": null,
"priority": "",
"agent_id": null,
"unread_status": false,
"channel_kind": "playground",
"message_content": "Hi — I’m here to help with QA and testing of the Sagepilot AI agent in this demo environment. I can run test scenarios, execute specific function calls, reproduce and diagnose errors, validate features or workflows, and fetch product/order data for testing.\n\nWhat would you like me to do right now? If you have a specific function, parameters, or a feature to validate, please share them and I’ll run the test.",
"message_role": "pilot",
"last_message_created_at": "2026-02-07T08:33:20.521000Z",
"message_agent_id": null,
"message_pilot_id": "8ecf3ded-7090-4997-9444-6c9f8c367f54",
"customer_name": "Vikram Singh Chundawat"
}
]
Required access
| Authentication | Scope | Dataset grant |
|---|---|---|
| API client v2 | customers:read | customers |
Body
string
required
Customer UUID to fetch chats for. Open a customer in the Customer module and use the last UUID in the URL:
/dashboard/[workspace_id]/customers/[customer_id]. See Resource IDs.string
Optional workspace UUID. The authenticated workspace is used by default. Find the current workspace ID in Settings > API Details > Channels. See Resource IDs.
boolean
default:"false"
Include chats from linked contacts.
Query parameters
integer
default:"1"
Page number.
integer
default:"20"
Records per page. Maximum value is
200.Response
object[]
required
Recent chat records for the customer.
⌘I