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 Monthly Usage

GET
https://api.agentphone.ai/v1/usage/monthly
GET
/v1/usage/monthly
1const url = 'https://api.agentphone.ai/v1/usage/monthly';
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 "month": "string",
5 "messages": 1,
6 "calls": 1,
7 "webhooks": 1
8 }
9 ],
10 "months": 1
11}

Get monthly usage aggregation for the last N months. Returns per-month totals of messages, calls, and webhook deliveries.

Was this page helpful?
Previous

Get Usage By Number

Next
Built with

Authentication

AuthorizationBearer

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

Query parameters

monthsintegerOptional1-24Defaults to 6

Response

Successful Response
datalist of objects
monthsinteger

Errors

422
Unprocessable Entity Error