Get a phone number's billable calls by business ID
GET/v1/businesses/{businessId}/phone-numbers/{phoneNumber}/billable-calls
Returns billable call counts for one phone number of a business,
identified by the business's Hiya businessId, over the given date
range, bucketed by granularity. A number without billable calls for
this business in the range returns 404, the same as a number that
isn't this business's.
Path Parameters
The ID of the business, assigned by Hiya.
9b8a1c4e-2c0f-4f3d-9a1e-7b3a2b4c6d8fAn E.164 phone number, URL-encoded — the leading + becomes %2B
(e.g. %2B12065550123).
Possible values: Value must match regular expression ^\+[1-9]\d{1,14}$
+12065550123Query Parameters
Start of the date range (inclusive), as YYYY-MM-DD. Must be on or
before endDate. endDate may be at most startDate plus 15 months,
with the day clamped to the end of the month (2026-01-31 → 2027-04-30).
2026-05-01End of the date range (inclusive), as YYYY-MM-DD. Must be on or after
startDate. endDate may be at most startDate plus 15 months, with
the day clamped to the end of the month (2026-01-31 → 2027-04-30).
2026-05-31How to bucket the returned series. Defaults to total (no series,
just the total for the range).
Possible values: [total, day, week, month]
totalResponses
- 200
- 400
- 401
- 404
- 500
The phone number's billable call counts.
Response Body
Array [
]
A phone number in E.164 format, with the leading +.
billing_E164PhoneNumber (string)Possible values: Value must match regular expression ^\+[1-9]\d{1,14}$
+12065550123The ID of the business the number is or was registered to.
string<uuid>9b8a1c4e-2c0f-4f3d-9a1e-7b3a2b4c6d8fYour own reference for the business; null if none was set.
Possible values: Value must match regular expression ^[A-Za-z0-9._-]+$
partner-customer-7421Start of the date range (inclusive).
string<date>2026-05-01End of the date range (inclusive).
string<date>2026-05-31How a billable-calls series is bucketed within the date range.
| Value | Meaning |
|-------|---------|
| total | No series — just the total for the whole range. points is empty. |
| day | One point per day. |
| week | One point per calendar week (Monday to Sunday). |
| month | One point per calendar month. |
Buckets are aligned to the calendar, not to startDate: the first
point's date can be earlier than startDate (the Monday of that
week, or the first of that month). Every point counts only calls
within startDate..endDate. Buckets with no billable calls are
omitted from points — treat a missing bucket as 0.
billing_BillingGranularity (string)Possible values: [total, day, week, month]
dayTotal billable calls from this number across the whole date
range; equal to the sum of points when a series is returned.
integer<int64>1234pointsobject[]required
The bucketed series, sorted by date ascending. Empty when
granularity is total.
Start date of this bucket (inclusive). For week and month it
can be earlier than startDate, because buckets are aligned to
the calendar.
string<date>2026-05-01Billable calls in this bucket, always greater than 0.
integer<int64>42Example from Schema
{
"phoneNumber": "+12065550123",
"businessId": "9b8a1c4e-2c0f-4f3d-9a1e-7b3a2b4c6d8f",
"externalId": "partner-customer-7421",
"startDate": "2026-05-01",
"endDate": "2026-05-31",
"granularity": "day",
"total": 1234,
"points": [
{
"date": "2026-05-01",
"value": 42
}
]
}
A query parameter is invalid — the range is reversed or longer than
15 months, or granularity is unknown.
Response Body
Array [
]
The X-Hiya-Request-Id this call was handled under — the value you
sent, or one Hiya generated if you didn't send one.
job-2f9c1a7e-0042When Hiya handled the request.
string<date-time>Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
2026-05-28T14:32:10.264Zerrorsobject[]required
The errors that occurred.
| Code | Status | Meaning |
|---|---|---|
| INVALID_QUERY_PARAM | 400 | A query parameter is invalid. |
| UNAUTHORIZED | 401 | The API key is missing or invalid. |
| NOT_FOUND | 404 | The resource doesn't exist, or isn't yours. |
| INTERNAL_ERROR | 500 | Something went wrong on our side. |
Possible values: [INVALID_QUERY_PARAM, UNAUTHORIZED, NOT_FOUND, INTERNAL_ERROR]
NOT_FOUNDA description of what went wrong.
Phone number +12065550123 not found.Example from Schema
{
"requestId": "job-2f9c1a7e-0042",
"timestamp": "2026-05-28T14:32:10.264Z",
"errors": [
{
"code": "NOT_FOUND",
"message": "Phone number +12065550123 not found."
}
]
}
{
"requestId": "job-2f9c1a7e-0042",
"timestamp": "2026-05-28T14:32:10.264Z",
"errors": [
{
"code": "INVALID_QUERY_PARAM",
"message": "endDate: must be on or after 'startDate'"
}
]
}
The API key is missing or invalid.
Response Body
Array [
]
The X-Hiya-Request-Id this call was handled under — the value you
sent, or one Hiya generated if you didn't send one.
job-2f9c1a7e-0042When Hiya handled the request.
string<date-time>Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
2026-05-28T14:32:10.264Zerrorsobject[]required
The errors that occurred.
| Code | Status | Meaning |
|---|---|---|
| INVALID_QUERY_PARAM | 400 | A query parameter is invalid. |
| UNAUTHORIZED | 401 | The API key is missing or invalid. |
| NOT_FOUND | 404 | The resource doesn't exist, or isn't yours. |
| INTERNAL_ERROR | 500 | Something went wrong on our side. |
Possible values: [INVALID_QUERY_PARAM, UNAUTHORIZED, NOT_FOUND, INTERNAL_ERROR]
NOT_FOUNDA description of what went wrong.
Phone number +12065550123 not found.Example from Schema
{
"requestId": "job-2f9c1a7e-0042",
"timestamp": "2026-05-28T14:32:10.264Z",
"errors": [
{
"code": "NOT_FOUND",
"message": "Phone number +12065550123 not found."
}
]
}
{
"requestId": "job-2f9c1a7e-0042",
"timestamp": "2026-05-28T14:32:10.264Z",
"errors": [
{
"code": "UNAUTHORIZED",
"message": "The partner API capability is not enabled for your account."
}
]
}
No business with that ID exists or it isn't one of yours, or the phone
number had no billable calls for this business in the range — the
cases are indistinguishable by design. A phone number in the path
that isn't valid E.164 also returns 404.
Response Body
Array [
]
The X-Hiya-Request-Id this call was handled under — the value you
sent, or one Hiya generated if you didn't send one.
job-2f9c1a7e-0042When Hiya handled the request.
string<date-time>Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
2026-05-28T14:32:10.264Zerrorsobject[]required
The errors that occurred.
| Code | Status | Meaning |
|---|---|---|
| INVALID_QUERY_PARAM | 400 | A query parameter is invalid. |
| UNAUTHORIZED | 401 | The API key is missing or invalid. |
| NOT_FOUND | 404 | The resource doesn't exist, or isn't yours. |
| INTERNAL_ERROR | 500 | Something went wrong on our side. |
Possible values: [INVALID_QUERY_PARAM, UNAUTHORIZED, NOT_FOUND, INTERNAL_ERROR]
NOT_FOUNDA description of what went wrong.
Phone number +12065550123 not found.Example from Schema
{
"requestId": "job-2f9c1a7e-0042",
"timestamp": "2026-05-28T14:32:10.264Z",
"errors": [
{
"code": "NOT_FOUND",
"message": "Phone number +12065550123 not found."
}
]
}
{
"requestId": "job-2f9c1a7e-0042",
"timestamp": "2026-05-28T14:32:10.264Z",
"errors": [
{
"code": "NOT_FOUND",
"message": "Phone number +12065550123 not found."
}
]
}
Something went wrong on our side.
Response Body
Array [
]
The X-Hiya-Request-Id this call was handled under — the value you
sent, or one Hiya generated if you didn't send one.
job-2f9c1a7e-0042When Hiya handled the request.
string<date-time>Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
2026-05-28T14:32:10.264Zerrorsobject[]required
The errors that occurred.
| Code | Status | Meaning |
|---|---|---|
| INVALID_QUERY_PARAM | 400 | A query parameter is invalid. |
| UNAUTHORIZED | 401 | The API key is missing or invalid. |
| NOT_FOUND | 404 | The resource doesn't exist, or isn't yours. |
| INTERNAL_ERROR | 500 | Something went wrong on our side. |
Possible values: [INVALID_QUERY_PARAM, UNAUTHORIZED, NOT_FOUND, INTERNAL_ERROR]
NOT_FOUNDA description of what went wrong.
Phone number +12065550123 not found.Example from Schema
{
"requestId": "job-2f9c1a7e-0042",
"timestamp": "2026-05-28T14:32:10.264Z",
"errors": [
{
"code": "NOT_FOUND",
"message": "Phone number +12065550123 not found."
}
]
}
{
"requestId": "job-2f9c1a7e-0042",
"timestamp": "2026-05-28T14:32:10.264Z",
"errors": [
{
"code": "INTERNAL_ERROR",
"message": "Something went wrong. Please try again later."
}
]
}