AgentPhone Usage API
The usage API from AgentPhone — 5 operation(s) for usage.
The usage API from AgentPhone — 5 operation(s) for usage.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/agentphone:agentphone-usage-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: SMS Usage API
description: A simple API to provision phone numbers and receive SMS
version: 0.1.0
tags:
- name: Usage
paths:
/v1/usage:
get:
tags:
- Usage
summary: Get Usage
description: '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'
operationId: get_usage_v1_usage_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UsageResponse'
security:
- HTTPBearer: []
/v1/usage/daily:
get:
tags:
- Usage
summary: Get Daily Usage
description: 'Get daily usage breakdown for the last N days (up to 365).
Returns per-day counts of messages, calls, and webhook deliveries.'
operationId: get_daily_usage_v1_usage_daily_get
security:
- HTTPBearer: []
parameters:
- name: days
in: query
required: false
schema:
type: integer
maximum: 365
minimum: 1
default: 30
title: Days
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/DailyUsageResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/usage/monthly:
get:
tags:
- Usage
summary: Get Monthly Usage
description: 'Get monthly usage aggregation for the last N months.
Returns per-month totals of messages, calls, and webhook deliveries.'
operationId: get_monthly_usage_v1_usage_monthly_get
security:
- HTTPBearer: []
parameters:
- name: months
in: query
required: false
schema:
type: integer
maximum: 24
minimum: 1
default: 6
title: Months
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/MonthlyUsageResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/usage/by-number:
get:
tags:
- Usage
summary: Get Usage By Number
description: Get usage statistics broken down by phone number, with linked agent info.
operationId: get_usage_by_number_v1_usage_by_number_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/NumberUsageResponse'
security:
- HTTPBearer: []
/v1/usage/by-agent:
get:
tags:
- Usage
summary: Get Usage By Agent
description: 'Get usage broken down by agent for the current calendar week, month, or year.
Includes message count, completed call count, and total call seconds per agent.
Calls/messages with no agent attached are bucketed as "Unassigned".'
operationId: get_usage_by_agent_v1_usage_by_agent_get
security:
- HTTPBearer: []
parameters:
- name: period
in: query
required: true
schema:
enum:
- week
- month
- year
type: string
title: Period
- name: tz
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: IANA timezone, e.g. America/New_York
title: Tz
description: IANA timezone, e.g. America/New_York
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgentUsageResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
AgentUsageItem:
properties:
agentId:
anyOf:
- type: string
- type: 'null'
title: Agentid
agentName:
type: string
title: Agentname
messages:
type: integer
title: Messages
calls:
type: integer
title: Calls
totalSeconds:
type: integer
title: Totalseconds
isOrphan:
type: boolean
title: Isorphan
default: false
type: object
required:
- agentId
- agentName
- messages
- calls
- totalSeconds
title: AgentUsageItem
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
UsageStats:
properties:
totalMessages:
type: integer
title: Totalmessages
messagesLast24h:
type: integer
title: Messageslast24H
messagesLast7d:
type: integer
title: Messageslast7D
messagesLast30d:
type: integer
title: Messageslast30D
smsSegmentsLast30d:
type: integer
title: Smssegmentslast30D
default: 0
totalCalls:
type: integer
title: Totalcalls
callsLast24h:
type: integer
title: Callslast24H
callsLast7d:
type: integer
title: Callslast7D
callsLast30d:
type: integer
title: Callslast30D
totalWebhookDeliveries:
type: integer
title: Totalwebhookdeliveries
successfulWebhookDeliveries:
type: integer
title: Successfulwebhookdeliveries
failedWebhookDeliveries:
type: integer
title: Failedwebhookdeliveries
type: object
required:
- totalMessages
- messagesLast24h
- messagesLast7d
- messagesLast30d
- totalCalls
- callsLast24h
- callsLast7d
- callsLast30d
- totalWebhookDeliveries
- successfulWebhookDeliveries
- failedWebhookDeliveries
title: UsageStats
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
MonthlyUsagePoint:
properties:
month:
type: string
title: Month
messages:
type: integer
title: Messages
calls:
type: integer
title: Calls
webhooks:
type: integer
title: Webhooks
type: object
required:
- month
- messages
- calls
- webhooks
title: MonthlyUsagePoint
DailyUsagePoint:
properties:
date:
type: string
title: Date
messages:
type: integer
title: Messages
calls:
type: integer
title: Calls
webhooks:
type: integer
title: Webhooks
type: object
required:
- date
- messages
- calls
- webhooks
title: DailyUsagePoint
NumberUsageResponse:
properties:
reportGeneratedAt:
type: string
title: Reportgeneratedat
data:
items:
$ref: '#/components/schemas/NumberUsageItem'
type: array
title: Data
type: object
required:
- reportGeneratedAt
- data
title: NumberUsageResponse
MonthlyUsageResponse:
properties:
reportGeneratedAt:
type: string
title: Reportgeneratedat
data:
items:
$ref: '#/components/schemas/MonthlyUsagePoint'
type: array
title: Data
months:
type: integer
title: Months
type: object
required:
- reportGeneratedAt
- data
- months
title: MonthlyUsageResponse
UsageResponse:
properties:
reportGeneratedAt:
type: string
title: Reportgeneratedat
numbers:
$ref: '#/components/schemas/NumberLimits'
stats:
$ref: '#/components/schemas/UsageStats'
periodStart:
type: string
title: Periodstart
periodEnd:
type: string
title: Periodend
type: object
required:
- reportGeneratedAt
- numbers
- stats
- periodStart
- periodEnd
title: UsageResponse
NumberLimits:
properties:
used:
type: integer
title: Used
limit:
type: integer
title: Limit
remaining:
type: integer
title: Remaining
type: object
required:
- used
- limit
- remaining
title: NumberLimits
NumberUsageItem:
properties:
numberId:
type: string
title: Numberid
phoneNumber:
type: string
title: Phonenumber
country:
type: string
title: Country
status:
type: string
title: Status
agentId:
anyOf:
- type: string
- type: 'null'
title: Agentid
agentName:
anyOf:
- type: string
- type: 'null'
title: Agentname
messages:
type: integer
title: Messages
calls:
type: integer
title: Calls
type: object
required:
- numberId
- phoneNumber
- country
- status
- messages
- calls
title: NumberUsageItem
DailyUsageResponse:
properties:
reportGeneratedAt:
type: string
title: Reportgeneratedat
data:
items:
$ref: '#/components/schemas/DailyUsagePoint'
type: array
title: Data
days:
type: integer
title: Days
type: object
required:
- reportGeneratedAt
- data
- days
title: DailyUsageResponse
AgentUsageResponse:
properties:
reportGeneratedAt:
type: string
title: Reportgeneratedat
data:
items:
$ref: '#/components/schemas/AgentUsageItem'
type: array
title: Data
period:
type: string
title: Period
periodStart:
type: string
title: Periodstart
periodEnd:
type: string
title: Periodend
type: object
required:
- reportGeneratedAt
- data
- period
- periodStart
- periodEnd
title: AgentUsageResponse
securitySchemes:
HTTPBearer:
type: http
scheme: bearer