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 Voices
      • GETList Agents
      • POSTCreate Agent
      • GETGet Agent
      • DELDelete Agent
      • PATCHUpdate Agent
      • POSTAttach Number To Agent
      • DELDetach Number From Agent
      • GETList Agent Conversations
      • GETList Agent Calls
LogoLogo
HomeGet API key
API Referenceagents

List Agent Conversations

GET
https://api.agentphone.ai/v1/agents/:agent_id/conversations
GET
/v1/agents/:agent_id/conversations
1const url = 'https://api.agentphone.ai/v1/agents/agent_id/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 "agentId": "string",
6 "phoneNumberId": "string",
7 "phoneNumber": "string",
8 "participant": "string",
9 "lastMessageAt": "2024-01-15T09:30:00Z",
10 "lastMessagePreview": "string",
11 "messageCount": 1,
12 "createdAt": "2024-01-15T09:30:00Z"
13 }
14 ],
15 "hasMore": true,
16 "total": 1
17}
List all conversations for an agent.
Was this page helpful?
Previous

List Agent Calls

Next
Built with

Authentication

AuthorizationBearer

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

Path parameters

agent_idstringRequired

Query parameters

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

Response

Successful Response
datalist of objects
hasMoreboolean
totalinteger

Errors

422
Unprocessable Entity Error