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

GET
https://api.agentphone.ai/v1/usage
GET
/v1/usage
1const url = 'https://api.agentphone.ai/v1/usage';
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}
200Retrieved
1{
2 "plan": {
3 "name": "string",
4 "limits": {
5 "numbers": 1,
6 "messagesPerMonth": 1,
7 "voiceMinutesPerMonth": 1,
8 "maxCallDurationMinutes": 1,
9 "concurrentCalls": 1
10 }
11 },
12 "numbers": {
13 "used": 1,
14 "limit": 1,
15 "remaining": 1
16 },
17 "stats": {
18 "totalMessages": 1,
19 "messagesLast24h": 1,
20 "messagesLast7d": 1,
21 "messagesLast30d": 1,
22 "totalCalls": 1,
23 "callsLast24h": 1,
24 "callsLast7d": 1,
25 "callsLast30d": 1,
26 "totalWebhookDeliveries": 1,
27 "successfulWebhookDeliveries": 1,
28 "failedWebhookDeliveries": 1
29 },
30 "periodStart": "string",
31 "periodEnd": "string"
32}
Get usage statistics for the current account. Returns: - Phone number limits (used/limit/remaining) - Message statistics (total, last 24h, last 7 days, last 30 days) - Call statistics (total, last 24h, last 7 days, last 30 days) - Webhook delivery statistics
Was this page helpful?
Previous

Get Daily Usage

Next
Built with

Get usage statistics for the current account.

Returns:

  • Phone number limits (used/limit/remaining)
  • Message statistics (total, last 24h, last 7 days, last 30 days)
  • Call statistics (total, last 24h, last 7 days, last 30 days)
  • Webhook delivery statistics

Authentication

AuthorizationBearer

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

Response

Successful Response
planobject
numbersobject
statsobject
periodStartstring
periodEndstring