Skip to content
Markets open

API reference

Billing

Ledger, invoices, statements, spending and exports. All amounts are USD 6-decimal strings.

22 operationsBase URL https://packetexchange.io/api/v1Postman collection

List ledger transactions

GET/api/v1/billing/transactions

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Your account ledger, newest first, cursor-paginated. Filter by type and an ISO date range (inclusive from, exclusive to). With format=csv the response is a CSV file of every matching row (up to 10,000) instead of JSON.

Parameters

NameInTypeDescription
typequerystring-One of topup, charge, credit, payout, platform_fee, test_credit
fromquerystring (date-time)Inclusive start (ISO-8601)
toquerystring (date-time)Exclusive end (ISO-8601)
cursorquerystring (uuid)The nextCursor from the previous page
limitqueryinteger-Default 25
formatquerystringcsv streams every matching row (up to 10,000) as a spreadsheet fileOne of json, csv

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
userIdrequireddata[].userIdstring (uuid)-
typerequireddata[].typestringcharge = usage you paid for; credit = seller earnings or a grant; platform_fee = the exchange feeOne of topup, charge, credit, payout, platform_fee, test_credit, chargeback, refund_reversal, refund, transfer
amountrequireddata[].amountmoneySigned: negative for money out (charges, fees, payouts), positive for money in USD as a decimal string with exactly 6 places, e.g. "0.012500".
balanceAfterrequireddata[].balanceAftermoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
referencerequireddata[].referencestring | null-
relatedEntityTyperequireddata[].relatedEntityTypestring | null-
relatedEntityIdrequireddata[].relatedEntityIdstring (uuid) | null-
callIddata[].callIdstring | nullThe call or message this line bills; equals the CDR callUuid
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
nextCursorrequiredstring | nullPass as cursor to fetch the next page; null on the last page.
hasMorerequiredbooleanTrue when another page exists.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get your spending and earnings summary

GET/api/v1/billing/summary

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Dashboard totals: spending (all time and today, UTC), seller earnings (all time, 30 days, today), active purchases and campaigns, and the withdrawable versus held part of your balance.

Response 200

FieldTypeDescription
datarequiredobject-
totalSpendingrequireddata.totalSpendingmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
totalTransactionsrequireddata.totalTransactionsinteger-
spendingTodayrequireddata.spendingTodaymoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
transactionsTodayrequireddata.transactionsTodayinteger-
activePurchasesrequireddata.activePurchasesinteger-
runningCampaignsrequireddata.runningCampaignsinteger-
totalCampaignsrequireddata.totalCampaignsinteger-
totalEarningsrequireddata.totalEarningsmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
earnings30drequireddata.earnings30dmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
earningsTodayrequireddata.earningsTodaymoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
availableBalancerequireddata.availableBalancemoneyWithdrawable now USD as a decimal string with exactly 6 places, e.g. "0.012500".
heldBalancerequireddata.heldBalancemoneyCard top-ups still inside the chargeback hold window USD as a decimal string with exactly 6 places, e.g. "0.012500".

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get seller earnings broken down by route

GET/api/v1/billing/earnings-by-route

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Top 50 routes by earnings over the last days. Attribution comes from call records, so it is partial: records without a route land in an "Unattributed" row, and the total can differ slightly from the credit ledger (attribution: "partial").

Parameters

NameInTypeDescription
daysqueryinteger-Default 30

Response 200

FieldTypeDescription
datarequiredobject[]-
routeIdrequireddata[].routeIdstring (uuid) | null-
destinationNamerequireddata[].destinationNamestring-
creditsrequireddata[].creditsmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
countrequireddata[].countinteger-
daysinteger-
attributionstring-One of partial

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get your outbound usage grouped by destination country

GET/api/v1/billing/usage-by-destination

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Records, voice sessions, answered sessions, minutes, SMS segments, ASR, ACD and cost per destination country. ASR is voice-only and counted over customer sessions (a failed-over call counts once). With no dates the window is all time; basis.window states the window used. format=csv returns a CSV file.

Parameters

NameInTypeDescription
fromquerystring (date-time)-
toquerystring (date-time)-
formatquerystring-One of json, csv

Response 200

FieldTypeDescription
datarequiredobject[]-
countryrequireddata[].countrystring-
countryCoderequireddata[].countryCodestring | null-
attemptsrequireddata[].attemptsintegerDeprecated: same as records (a row count, not a call count)
recordsrequireddata[].recordsinteger-
voiceSessionsrequireddata[].voiceSessionsinteger-
answeredrequireddata[].answeredinteger-
minutesrequireddata[].minutesnumber-
segmentsrequireddata[].segmentsinteger-
asrrequireddata[].asrnumber | nullPercent, voice only; null with no voice sessions
asrBasisrequireddata[].asrBasisobjectWhich population and window the ASR counts
acdrequireddata[].acdnumber | nullAverage answered duration in seconds
costrequireddata[].costmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
basisobject-
populationrequiredbasis.populationstring-One of customer_sessions
windowrequiredbasis.windowstring-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get your end-of-day balance history

GET/api/v1/billing/balance-history

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

One point per UTC day that had ledger activity. Balances here are plain JSON numbers for charting, not ledger strings.

Parameters

NameInTypeDescription
daysqueryinteger-Default 30

Response 200

FieldTypeDescription
datarequiredobject-
pointsrequireddata.pointsobject[]-
daterequireddata.points[].datestringYYYY-MM-DD (UTC)
balancerequireddata.points[].balancenumber-
currentBalancerequireddata.currentBalancenumber-
hasDatarequireddata.hasDataboolean-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get daily voice and SMS spend

GET/api/v1/billing/traffic-timeseries

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Charges per UTC day split into voice and SMS. Amounts are plain JSON numbers for charting.

Parameters

NameInTypeDescription
daysqueryinteger-Default 30

Response 200

FieldTypeDescription
datarequiredobject-
pointsrequireddata.pointsobject[]-
daterequireddata.points[].datestringYYYY-MM-DD (UTC)
voicerequireddata.points[].voicenumber-
smsrequireddata.points[].smsnumber-
totalrequireddata.points[].totalnumber-
daysrequireddata.daysinteger-
hasDatarequireddata.hasDataboolean-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

List your call and message records

GET/api/v1/billing/cdrs

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Your call detail records (test probes excluded), newest first, cursor-paginated. With format=csv the response is a CSV file of up to 50,000 rows. For larger exports use POST /billing/exports.

Parameters

NameInTypeDescription
fromquerystring (date-time)-
toquerystring (date-time)-
kindquerystring-One of voice, sms
directionquerystring-One of outbound, inbound
cursorquerystring (uuid)-
limitqueryinteger-Default 50
formatquerystringcsv streams up to 50,000 rowsOne of json, csv

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
callUuidrequireddata[].callUuidstring | null-
callGroupIdrequireddata[].callGroupIdstring (uuid) | nullGroups the legs of one customer call when it failed over
directionrequireddata[].directionstring-One of outbound, inbound
kindrequireddata[].kindstring-One of voice, sms
routeIdrequireddata[].routeIdstring (uuid) | null-
fromNumberrequireddata[].fromNumberstring | null-
toNumberrequireddata[].toNumberstring | null-
clirequireddata[].clistring | null-
statusrequireddata[].statusstring | null-
sipCoderequireddata[].sipCodeinteger | null-
hangupCauserequireddata[].hangupCausestring | null-
durationSecondsrequireddata[].durationSecondsinteger | null-
billedSecondsrequireddata[].billedSecondsinteger | null-
segmentsrequireddata[].segmentsinteger | nullSMS segments
pddMsrequireddata[].pddMsinteger | null-
buyerCostrequireddata[].buyerCostmoney | nullWhat you were charged for this record USD as a decimal string with exactly 6 places, e.g. "0.012500".
sellerCreditrequireddata[].sellerCreditmoney | nullSeller earnings. Null unless you are the seller on this record USD as a decimal string with exactly 6 places, e.g. "0.012500".
ratePerUnitrequireddata[].ratePerUnitmoney | nullUS dollars as a decimal string with exactly 6 decimal places, e.g. "0.012500". Do money arithmetic with a decimal type, not floating point. USD as a decimal string with exactly 6 places, e.g. "0.012500".
answeredAtrequireddata[].answeredAtstring (date-time) | nullISO-8601 timestamp (UTC)
endedAtrequireddata[].endedAtstring (date-time) | nullISO-8601 timestamp (UTC)
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
nextCursorrequiredstring | nullPass as cursor to fetch the next page; null on the last page.
hasMorerequiredbooleanTrue when another page exists.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Stream your call records as CSV

GET/api/v1/billing/cdrs/export

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Streams every matching record (up to 1,000,000 rows) as a CSV file in one response.

Parameters

NameInTypeDescription
fromquerystring (date-time)-
toquerystring (date-time)-
kindquerystring-One of voice, sms
directionquerystring-One of outbound, inbound

Response 200 (text/csv)

A CSV file of call detail records.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

List your call-record exports

GET/api/v1/billing/exports

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Your 50 most recent export jobs.

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
typerequireddata[].typestring-One of cdr
paramsrequireddata[].paramsobject-
fromdata[].params.fromstring (date-time)ISO-8601 timestamp (UTC)
todata[].params.tostring (date-time)ISO-8601 timestamp (UTC)
kinddata[].params.kindstring-One of voice, sms
directiondata[].params.directionstring-One of outbound, inbound
statusrequireddata[].statusstring-One of pending, running, done, failed
rowCountrequireddata[].rowCountinteger | null-
errorrequireddata[].errorstring | null-
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
completedAtrequireddata[].completedAtstring (date-time) | nullISO-8601 timestamp (UTC)
downloadablerequireddata[].downloadablebooleanTrue once the job is done and its file is on record
downloadUrlrequireddata[].downloadUrlstring | nullThe download endpoint for this job once it is done (GET /billing/exports/{id}/download). The only way to the file: no server path is ever returned.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Start a background call-record export

POST/api/v1/billing/exports

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Queues a CSV export job. At most 3 exports may be pending or running at once; a fourth gets 429 TOO_MANY_EXPORTS. Poll GET /billing/exports and download when downloadable is true.

Request body (application/json)

FieldTypeDescription
fromstring (date-time)-
tostring (date-time)-
filtersobjectTakes precedence over the top-level from/to
fromfilters.fromstring (date-time)-
tofilters.tostring (date-time)-
kindfilters.kindstring-One of voice, sms
directionfilters.directionstring-One of outbound, inbound

Response 202

FieldTypeDescription
datarequiredobjectSame fields as BillingExportJob, shown earlier on this page.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.
  • AlsoTOO_MANY_EXPORTS

Download a finished call-record export

GET/api/v1/billing/exports/{id}/download

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Returns the CSV file. Only the account that queued the export can download it (another account gets 404). 409 EXPORT_NOT_READY while the job is not finished; 410 EXPORT_EXPIRED once the retention sweep has deleted the file.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200 (text/csv)

The export as a CSV file.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.
  • AlsoEXPORT_NOT_READY, EXPORT_EXPIRED

List your receipts and statements

GET/api/v1/billing/invoices

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Top-up receipts and statements (up to 200, newest first). For numbered tax invoices see GET /billing/tax-invoices.

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
numberrequireddata[].numberintegerSequential document number; printed as INV-000123
typerequireddata[].typestring-One of topup_receipt, statement
amountrequireddata[].amountmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
currencyrequireddata[].currencystring-
periodStartrequireddata[].periodStartstring (date-time) | nullISO-8601 timestamp (UTC)
periodEndrequireddata[].periodEndstring (date-time) | nullISO-8601 timestamp (UTC)
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get a receipt or statement

GET/api/v1/billing/invoices/{id}

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

JSON by default; format=html returns a self-contained printable page.

Parameters

NameInTypeDescription
idrequiredpathstring-
formatquerystringhtml returns a printable pageOne of json, html

Response 200

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
numberrequireddata.numberintegerSequential document number; printed as INV-000123
typerequireddata.typestring-One of topup_receipt, statement
amountrequireddata.amountmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
currencyrequireddata.currencystring-
periodStartrequireddata.periodStartstring (date-time) | nullISO-8601 timestamp (UTC)
periodEndrequireddata.periodEndstring (date-time) | nullISO-8601 timestamp (UTC)
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
dataJsonrequireddata.dataJsonobject | null-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get your monthly statement

GET/api/v1/billing/statements

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Every ledger line in a calendar month (UTC) with totals by type and the tax on platform fees. Totals and net are plain JSON numbers; line-item amounts are ledger strings. format=csv returns a CSV file.

Parameters

NameInTypeDescription
monthrequiredquerystringCalendar month, YYYY-MM (UTC)
formatquerystring-One of json, csv

Response 200

FieldTypeDescription
datarequiredobject-
monthrequireddata.monthstring-
periodStartrequireddata.periodStartstring (date-time)ISO-8601 timestamp (UTC)
periodEndrequireddata.periodEndstring (date-time)ISO-8601 timestamp (UTC)
netrequireddata.netnumbercredits + top-ups - charges - payouts
totalsrequireddata.totalsobject-
chargesrequireddata.totals.chargesnumber-
creditsrequireddata.totals.creditsnumber-
topupsrequireddata.totals.topupsnumber-
payoutsrequireddata.totals.payoutsnumber-
byTyperequireddata.totals.byTypeobject-
lineItemsrequireddata.lineItemsobject[]-
idrequireddata.lineItems[].idstring (uuid)-
typerequireddata.lineItems[].typestring-One of topup, charge, credit, payout, platform_fee, test_credit, chargeback, refund_reversal, refund, transfer
amountrequireddata.lineItems[].amountmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
referencerequireddata.lineItems[].referencestring | null-
createdAtrequireddata.lineItems[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
taxrequireddata.taxobject-
taxableSupplyrequireddata.tax.taxableSupplystring-One of platform_fees
baserequireddata.tax.basenumber-
ratePctrequireddata.tax.ratePctnumber-
taxAmountrequireddata.tax.taxAmountnumber-
totalrequireddata.tax.totalnumber-
treatmentrequireddata.tax.treatmentstring-
labelrequireddata.tax.labelstring-
noterequireddata.tax.notestring | null-
taxIdrequireddata.tax.taxIdstring | null-
taxCountryrequireddata.tax.taxCountrystring | null-
homeCountryrequireddata.tax.homeCountrystring-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get the financial position of your wallet or a sub-account

GET/api/v1/billing/financial-activity/position

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Posted balance, credit limit, reserved for live calls, settlement holds, pending payments, and what that leaves to spend, with the source of each figure. Figures are plain JSON numbers (USD). Pass customerId for a sub-account you operate.

Parameters

NameInTypeDescription
customerIdquerystring (uuid)A sub-account you operate; omit for your own wallet

Response 200

FieldTypeDescription
datarequiredobject-
walletKindrequireddata.walletKindstring-One of user, sub_account
walletIdrequireddata.walletIdstring (uuid)-
labelrequireddata.labelstring-
currencyrequireddata.currencystring-
postedBalancerequireddata.postedBalancenumber-
creditLimitrequireddata.creditLimitnumber-
creditLimitRecordedrequireddata.creditLimitRecordedboolean-
reservedForActiveCallsrequireddata.reservedForActiveCallsnumber-
settlementHoldsrequireddata.settlementHoldsnumber-
pendingPaymentsrequireddata.pendingPaymentsnumber-
promotionalCreditrequireddata.promotionalCreditnumber-
confirmedFundsrequireddata.confirmedFundsnumber-
availableToSpendrequireddata.availableToSpendnumber-
overCommittedrequireddata.overCommittedboolean-
negativeBalancerequireddata.negativeBalancestring-One of not_negative, within_agreed_credit, beyond_agreed_credit
beyondCreditByrequireddata.beyondCreditBynumber-
activeCallsrequireddata.activeCallsinteger-
reservationEnforcedrequireddata.reservationEnforcedbooleanTrue when reservations actually gate new calls, not just observe them
creditNoterequireddata.creditNotestring-
sourcesrequireddata.sourcesobject-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

List live call authorisations on a wallet

GET/api/v1/billing/financial-activity/authorisations

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Funds currently reserved for calls in progress. Amounts are plain JSON numbers (USD).

Parameters

NameInTypeDescription
customerIdquerystring (uuid)A sub-account you operate; omit for your own wallet

Response 200

FieldTypeDescription
datarequiredobject-
callsrequireddata.callsobject[]-
callUuidrequireddata.calls[].callUuidstring-
amountrequireddata.calls[].amountnumber-
expiresAtrequireddata.calls[].expiresAtstring (date-time)ISO-8601 timestamp (UTC)
totalrequireddata.totalnumber-
enforcedrequireddata.enforcedboolean-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Reconcile a wallet balance against its ledger

GET/api/v1/billing/financial-activity/reconciliation

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Explains the posted balance by ledger component and reports anything it cannot explain as unreconciled, rather than as confirmed money. Amounts are plain JSON numbers (USD).

Parameters

NameInTypeDescription
customerIdquerystring (uuid)A sub-account you operate; omit for your own wallet

Response 200

FieldTypeDescription
datarequiredobject-
walletKindrequireddata.walletKindstring-One of user, sub_account
walletIdrequireddata.walletIdstring (uuid)-
labelrequireddata.labelstring-
currencyrequireddata.currencystring-
postedBalancerequireddata.postedBalancenumber-
openingBalancerequireddata.openingBalanceobject-
amountrequireddata.openingBalance.amountnumber-
documentedrequireddata.openingBalance.documentedboolean-
noterequireddata.openingBalance.notestring-
componentsrequireddata.componentsobject[]-
keyrequireddata.components[].keystring-
labelrequireddata.components[].labelstring-
amountrequireddata.components[].amountnumber-
countrequireddata.components[].countinteger-
sourcerequireddata.components[].sourcestring-
explainedrequireddata.explainednumber-
unattributedrequireddata.unattributedobject-
amountrequireddata.unattributed.amountnumber-
countrequireddata.unattributed.countinteger-
noterequireddata.unattributed.notestring-
unreconciledrequireddata.unreconcilednumber-
hasUnreconciledrequireddata.hasUnreconciledboolean-
unpostedUsagerequireddata.unpostedUsageobject-
amountrequireddata.unpostedUsage.amountnumber-
callsrequireddata.unpostedUsage.callsinteger-
noterequireddata.unpostedUsage.notestring-
checkedAtrequireddata.checkedAtstring (date-time)ISO-8601 timestamp (UTC)

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

List posted, pending and unposted money movements

GET/api/v1/billing/financial-activity/activity

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

One timeline of posted ledger lines, pending payments and usage not yet posted. truncated is true when more rows matched than limit. Amounts are plain JSON numbers (USD).

Parameters

NameInTypeDescription
customerIdquerystring (uuid)A sub-account you operate; omit for your own wallet
limitqueryinteger-Default 100
fromquerystring (date-time)-
toquerystring (date-time)-
statequerystring-One of all, posted, pending, usage

Response 200

FieldTypeDescription
datarequiredobject-
rowsrequireddata.rowsobject[]-
idrequireddata.rows[].idstring-
staterequireddata.rows[].statestring-One of posted, pending, usage
atrequireddata.rows[].atstring (date-time)ISO-8601 timestamp (UTC)
kindrequireddata.rows[].kindstring-
labelrequireddata.rows[].labelstring-
amountrequireddata.rows[].amountnumber-
balanceAfterrequireddata.rows[].balanceAfternumber | null-
referencerequireddata.rows[].referencestring | null-
callIdrequireddata.rows[].callIdstring | null-
traceTorequireddata.rows[].traceTostring-
truncatedrequireddata.truncatedboolean-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

List sub-account wallets you operate with their positions

GET/api/v1/billing/financial-activity/customers

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Every non-closed sub-account with its balance, credit and what it can spend now. Amounts are plain JSON numbers.

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
labelrequireddata[].labelstring-
currencyrequireddata[].currencystring-
statusrequireddata[].statusstring-
postedBalancerequireddata[].postedBalancenumber-
creditLimitrequireddata[].creditLimitnumber-
confirmedFundsrequireddata[].confirmedFundsnumber-
reservedForActiveCallsrequireddata[].reservedForActiveCallsnumber-
activeCallsrequireddata[].activeCallsinteger-
availableToSpendrequireddata[].availableToSpendnumber-
negativeWithinAgreedCreditrequireddata[].negativeWithinAgreedCreditboolean-
beyondAgreedCreditrequireddata[].beyondAgreedCreditboolean-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

List your tax invoices

GET/api/v1/billing/tax-invoices

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Numbered tax invoices (gap-free per account), newest first, up to 500.

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
seqrequireddata[].seqintegerGap-free per-account sequence
numberrequireddata[].numberstring-
periodrequireddata[].periodstringYYYY-MM
periodStartrequireddata[].periodStartstring (date-time)ISO-8601 timestamp (UTC)
periodEndrequireddata[].periodEndstring (date-time)ISO-8601 timestamp (UTC)
currencyrequireddata[].currencystring-
subtotalrequireddata[].subtotalstringDecimal string
taxAmountrequireddata[].taxAmountstringDecimal string
totalrequireddata[].totalstringDecimal string
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Generate the tax invoice for a month

POST/api/v1/billing/tax-invoices/generate

Access
API key. Scoped keys need account:write.
Rate limit
100 requests per second (the default)

Idempotent per period: if the month already has an invoice it is returned with alreadyExisted: true and status 200; a new one returns 201. 503 when the invoice register is not available on this node.

Request body (application/json)

FieldTypeDescription
periodrequiredstring-

Response 201

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
seqrequireddata.seqintegerGap-free per-account sequence
numberrequireddata.numberstring-
periodrequireddata.periodstringYYYY-MM
periodStartrequireddata.periodStartstring (date-time)ISO-8601 timestamp (UTC)
periodEndrequireddata.periodEndstring (date-time)ISO-8601 timestamp (UTC)
currencyrequireddata.currencystring-
subtotalrequireddata.subtotalstringDecimal string
taxAmountrequireddata.taxAmountstringDecimal string
totalrequireddata.totalstringDecimal string
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
dataJsonrequireddata.dataJsonobject | nullFrozen line items and the tax section as issued
alreadyExistedrequireddata.alreadyExistedboolean-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get a tax invoice

GET/api/v1/billing/tax-invoices/{id}

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

JSON by default; format=html returns a printable invoice page.

Parameters

NameInTypeDescription
idrequiredpathstring-
formatquerystringhtml returns a printable pageOne of json, html

Response 200

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
seqrequireddata.seqintegerGap-free per-account sequence
numberrequireddata.numberstring-
periodrequireddata.periodstringYYYY-MM
periodStartrequireddata.periodStartstring (date-time)ISO-8601 timestamp (UTC)
periodEndrequireddata.periodEndstring (date-time)ISO-8601 timestamp (UTC)
currencyrequireddata.currencystring-
subtotalrequireddata.subtotalstringDecimal string
taxAmountrequireddata.taxAmountstringDecimal string
totalrequireddata.totalstringDecimal string
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
dataJsonrequireddata.dataJsonobject | nullFrozen line items and the tax section as issued

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.