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
      • GETGet Usage
      • GETGet Daily Usage
      • GETGet Monthly Usage
      • GETGet Usage By Number
      • GETGet Usage By Agent
LogoLogo
HomeGet API key
API Referenceusage

Get Usage By Number

GET
https://api.agentphone.ai/v1/usage/by-number
GET
/v1/usage/by-number
1const url = 'https://api.agentphone.ai/v1/usage/by-number';
2const options = {
3 method: 'GET',
4 headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
5 body: '{}'
6};
7
8try {
9 const response = await fetch(url, options);
10 const data = await response.json();
11 console.log(data);
12} catch (error) {
13 console.error(error);
14}
200Retrieved
1{
2 "data": [
3 {
4 "numberId": "num_8f3a2b7c9d4e5f01",
5 "phoneNumber": "+14155552671",
6 "country": "US",
7 "status": "active",
8 "messages": 1523,
9 "calls": 347,
10 "agentId": "agent_12345abcde",
11 "agentName": "SupportBot Alpha"
12 }
13 ]
14}
Get usage statistics broken down by phone number, with linked agent info.
Was this page helpful?
Previous

Get Usage By Agent

Next
Built with

Authentication

AuthorizationBearer

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

Response

Successful Response
datalist of objects