For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGet API key
DocumentationIntegrationsAPI Reference
DocumentationIntegrationsAPI Reference
  • API Reference
      • GETList Conversations
      • GETGet Conversation
      • PATCHUpdate Conversation
      • GETGet Conversation Messages
      • POSTSend Typing Indicator
      • POSTSet Chat Background
      • DELRemove Chat Background
LogoLogo
HomeGet API key
API Referenceconversations

List Conversations

GET
https://api.agentphone.ai/v1/conversations
GET
/v1/conversations
1const url = 'https://api.agentphone.ai/v1/conversations';
2const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
3
4try {
5 const response = await fetch(url, options);
6 const data = await response.json();
7 console.log(data);
8} catch (error) {
9 console.error(error);
10}
1{
2 "data": [
3 {
4 "id": "string",
5 "phoneNumberId": "string",
6 "phoneNumber": "string",
7 "participant": "string",
8 "lastMessageAt": "2024-01-15T09:30:00Z",
9 "lastMessagePreview": "string",
10 "messageCount": 1,
11 "createdAt": "2024-01-15T09:30:00Z",
12 "agentId": "string",
13 "metadata": {}
14 }
15 ],
16 "hasMore": true,
17 "total": 1
18}

List all conversations for this account.

Sorted by most recent activity (lastMessageAt desc). Sorted by most recent activity.

Was this page helpful?
Previous

Get Conversation

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Query parameters

limitintegerOptional<=100Defaults to 20
offsetintegerOptional>=0Defaults to 0

Response

Successful Response
datalist of objects
hasMoreboolean
totalinteger

Errors

422
Unprocessable Entity Error