Skip to content
Markets open

API reference

Application Manager

Operate retail sub-accounts: provisioning, credit and routing.

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

BrowseApplication Manager

Get reseller analytics across your sub-accounts

GET/api/v1/application/analytics

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

Headline totals and quality, a daily series, per-sub-account margin and top destinations. Figures are JSON numbers (analytics rollups, not ledger entries).

Parameters

NameInTypeDescription
daysqueryintegerTrailing window in days (default 30)

Response 200

FieldTypeDescription
datarequiredobject-
periodrequireddata.periodobject-
daysrequireddata.period.daysinteger-
summaryrequireddata.summaryobject-
callsrequireddata.summary.callsinteger-
smsrequireddata.summary.smsinteger-
minutesrequireddata.summary.minutesinteger-
revenuerequireddata.summary.revenuenumberUSD, JSON number (analytics rollup)
marginrequireddata.summary.marginnumberUSD, JSON number (analytics rollup)
asrrequireddata.summary.asrnumber | nullAnswer rate percent over customer sessions; null with no calls
acdrequireddata.summary.acdnumber-
carrierCostrequireddata.summary.carrierCostnumber-
activeSubsrequireddata.summary.activeSubsinteger-
timeseriesrequireddata.timeseriesobject[]-
daterequireddata.timeseries[].datestringYYYY-MM-DD
callsrequireddata.timeseries[].callsinteger-
smsrequireddata.timeseries[].smsinteger-
revenuerequireddata.timeseries[].revenuenumber-
marginrequireddata.timeseries[].marginnumber-
bySubAccountrequireddata.bySubAccountobject[]-
byRouterequireddata.byRouteobject[]-

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 Application Manager settings

GET/api/v1/application/settings

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

Created with defaults on first read.

Response 200

FieldTypeDescription
datarequiredobject-
operatorIdrequireddata.operatorIdstring (uuid)-
defaultMarkupPctrequireddata.defaultMarkupPctstring-
defaultBillingIncrementrequireddata.defaultBillingIncrementstring-
minMarginPctrequireddata.minMarginPctstring-
subLowBalanceThresholdrequireddata.subLowBalanceThresholdstring"0.00" disables low-balance alerts
defaultDailySpendCaprequireddata.defaultDailySpendCapstring | nullUS dollars as a decimal string with 2 decimal places, e.g. "50.00"
defaultMaxConcurrentCallsrequireddata.defaultMaxConcurrentCallsinteger | null-
brandNamerequireddata.brandNamestring | null-
brandColorrequireddata.brandColorstring | null-
brandLogoUrlrequireddata.brandLogoUrlstring | null-
requireTrunkApprovalrequireddata.requireTrunkApprovalboolean-
requireTrunkReadinessrequireddata.requireTrunkReadinessboolean-

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.

Update your Application Manager settings

PUT/api/v1/application/settings

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

Default markup, low-balance threshold, default fraud caps and portal branding. Send only what changes.

Request body (application/json)

FieldTypeDescription
defaultMarkupPctnumber-0 to 100000
subLowBalanceThresholdnumber-0 to 1000000
defaultDailySpendCapnumber | null-0 to 1000000
defaultMaxConcurrentCallsinteger | null-0 to 100000
brandNamestring | null-max 120 chars
brandColorstring | null-max 9 chars
brandLogoUrlstring (uri) | null-max 500 chars

Response 200

FieldTypeDescription
datarequiredobjectSame fields as ApplicationSettings, 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.

Get sub-account totals

GET/api/v1/application/overview

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

Response 200

FieldTypeDescription
datarequiredobject-
subCountrequireddata.subCountinteger-
activeSubCountrequireddata.activeSubCountinteger-
aggregateBalancerequireddata.aggregateBalancenumberSum of sub-account balances, USD as a JSON number

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 sub-accounts

GET/api/v1/application/sub-accounts

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

Newest first, cursor-paginated and searchable by label or external reference. total counts every match.

Parameters

NameInTypeDescription
cursorquerystring (uuid)-
limitqueryintegerDefault 50
searchquerystring-
statusquerystring-One of draft, active, suspended, closed
lowBalanceOnlyquerystring-One of true, 1

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
labelrequireddata[].labelstring-
externalRefrequireddata[].externalRefstring | null-
balancerequireddata[].balancemoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
statusrequireddata[].statusstring-One of draft, active, suspended, closed
markupPctrequireddata[].markupPctstring | nullMarkup percent as a 3-decimal string; null = operator default
dailySpendCaprequireddata[].dailySpendCapstring | nullnull = operator default; "0.00" = unlimited
maxConcurrentCallsrequireddata[].maxConcurrentCallsinteger | null-
creditLimitrequireddata[].creditLimitstringPostpaid credit, "0.00" = strict prepaid
currencyrequireddata[].currencystringDisplay currency for statementsmax 3 chars
portalEmailrequireddata[].portalEmailstring | null-
autoSuspendedrequireddata[].autoSuspendedbooleanSuspended automatically by a daily cap, lifts itself
sipUsernamerequireddata[].sipUsernamestring | null-
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata[].updatedAtstring (date-time)ISO-8601 timestamp (UTC)
lowBalancerequireddata[].lowBalanceboolean-
nextCursorstring | null-
hasMoreboolean-
totalinteger-
lowBalanceThresholdnumber-

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.

Create a sub-account

POST/api/v1/application/sub-accounts

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

Provisions its SIP credentials and one API key, both returned ONCE. Requires an active route purchase or an active route of your own.

Request body (application/json)

FieldTypeDescription
labelrequiredstring-max 255 chars
externalRefstring | null-max 10000 chars
markupPctnumber | null-0 to 100000
dailySpendCapnumber | null-0 to 1000000
maxConcurrentCallsinteger | null-0 to 100000
creditLimitnumber | null-0 to 10000000
currencystring-max 3 chars

Response 201

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
labelrequireddata.labelstring-
externalRefrequireddata.externalRefstring | null-
balancerequireddata.balancemoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
statusrequireddata.statusstring-One of draft, active, suspended, closed
markupPctrequireddata.markupPctstring | nullMarkup percent as a 3-decimal string; null = operator default
dailySpendCaprequireddata.dailySpendCapstring | nullnull = operator default; "0.00" = unlimited
maxConcurrentCallsrequireddata.maxConcurrentCallsinteger | null-
creditLimitrequireddata.creditLimitstringPostpaid credit, "0.00" = strict prepaid
currencyrequireddata.currencystringDisplay currency for statementsmax 3 chars
portalEmailrequireddata.portalEmailstring | null-
autoSuspendedrequireddata.autoSuspendedbooleanSuspended automatically by a daily cap, lifts itself
sipUsernamerequireddata.sipUsernamestring | null-
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.updatedAtstring (date-time)ISO-8601 timestamp (UTC)
apiKeyrequireddata.apiKeystringThe sub-account API key. Returned ONCE.
apiKeyPrefixrequireddata.apiKeyPrefixstring-
sipPasswordrequireddata.sipPasswordstringThe SIP password. Returned ONCE.

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.

Create up to 100 sub-accounts at once

POST/api/v1/application/sub-accounts/bulk

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

Each item is created independently, so one bad row does not fail the batch. Each created entry carries its one-time credentials.

Request body (application/json)

FieldTypeDescription
subAccountsrequiredobject[]-
labelrequiredsubAccounts[].labelstring-max 255 chars
externalRefsubAccounts[].externalRefstring | null-max 10000 chars
markupPctsubAccounts[].markupPctnumber | null-0 to 100000
dailySpendCapsubAccounts[].dailySpendCapnumber | null-0 to 1000000
maxConcurrentCallssubAccounts[].maxConcurrentCallsinteger | null-0 to 100000
creditLimitsubAccounts[].creditLimitnumber | null-0 to 10000000
currencysubAccounts[].currencystring-max 3 chars

Response 201

FieldTypeDescription
datarequiredobject-
createdrequireddata.createdobject[]Same fields as SubAccountCreated, shown earlier on this page.
failedrequireddata.failedobject[]-
labelrequireddata.failed[].labelstring-
errorrequireddata.failed[].errorstring-
requestedrequireddata.requestedinteger-
createdCountrequireddata.createdCountinteger-

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 sub-account

GET/api/v1/application/sub-accounts/{id}

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

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
labelrequireddata.labelstring-
externalRefrequireddata.externalRefstring | null-
balancerequireddata.balancemoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
statusrequireddata.statusstring-One of draft, active, suspended, closed
markupPctrequireddata.markupPctstring | nullMarkup percent as a 3-decimal string; null = operator default
dailySpendCaprequireddata.dailySpendCapstring | nullnull = operator default; "0.00" = unlimited
maxConcurrentCallsrequireddata.maxConcurrentCallsinteger | null-
creditLimitrequireddata.creditLimitstringPostpaid credit, "0.00" = strict prepaid
currencyrequireddata.currencystringDisplay currency for statementsmax 3 chars
portalEmailrequireddata.portalEmailstring | null-
autoSuspendedrequireddata.autoSuspendedbooleanSuspended automatically by a daily cap, lifts itself
sipUsernamerequireddata.sipUsernamestring | null-
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.updatedAtstring (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.
  • 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.

Update a sub-account

PATCH/api/v1/application/sub-accounts/{id}

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

Suspending or closing revokes its API keys and stops its campaigns.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
labelstring-max 255 chars
statusstring-One of active, suspended, closed
markupPctnumber | null-0 to 100000
dailySpendCapnumber | null-0 to 1000000
maxConcurrentCallsinteger | null-0 to 100000
creditLimitnumber | null-0 to 10000000
currencystring-max 3 chars

Response 200

FieldTypeDescription
datarequiredobjectSame fields as SubAccount, 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.
  • 404NOT_FOUND: no such resource on your account.
  • 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.

Fund a sub-account from your balance

POST/api/v1/application/sub-accounts/{id}/credit

Access
API key. Scoped keys need application:write.
Rate limit
100 requests per second (the default)
Safe retries
Send X-Idempotency-Key; a replay within 24 hours returns the first response.
Moves money
Moves money between your balance and a sub-account.

Moves money from your balance into the sub-account. Only active sub-accounts can be funded.

Parameters

NameInTypeDescription
idrequiredpathstring-
X-Idempotency-KeyheaderstringAny unique string (a UUID is ideal). Replays within 24 hours return the first response instead of acting twice.

Request body (application/json)

FieldTypeDescription
amountrequirednumber-min 0

Response 200

FieldTypeDescription
datarequiredobject-
operatorBalancerequireddata.operatorBalancenumber | nullYour balance after the transfer, as a JSON number; null when your balance did not move
subBalancerequireddata.subBalancenumberThe sub-account balance after the transfer, as a JSON number

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.
  • 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.

Return funds from a sub-account to your balance

POST/api/v1/application/sub-accounts/{id}/debit

Access
API key. Scoped keys need application:write.
Rate limit
100 requests per second (the default)
Safe retries
Send X-Idempotency-Key; a replay within 24 hours returns the first response.
Moves money
Moves money between your balance and a sub-account.

Works on closed sub-accounts too, so a balance can be handed back after closure.

Parameters

NameInTypeDescription
idrequiredpathstring-
X-Idempotency-KeyheaderstringAny unique string (a UUID is ideal). Replays within 24 hours return the first response instead of acting twice.

Request body (application/json)

FieldTypeDescription
amountrequirednumber-min 0
reasonrequiredstring-max 500 chars

Response 200

FieldTypeDescription
datarequiredobject-
operatorBalancerequireddata.operatorBalancenumber | nullYour balance after the transfer, as a JSON number; null when your balance did not move
subBalancerequireddata.subBalancenumberThe sub-account balance after the transfer, as a JSON number

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.
  • 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.

Record a payment a sub-account made to you

POST/api/v1/application/sub-accounts/{id}/payment

Access
API key. Scoped keys need application:write.
Rate limit
100 requests per second (the default)
Safe retries
Send X-Idempotency-Key; a replay within 24 hours returns the first response.
Moves money
Moves money between your balance and a sub-account.

Credits the sub-account for money it paid you outside the platform. Your own balance does not move.

Parameters

NameInTypeDescription
idrequiredpathstring-
X-Idempotency-KeyheaderstringAny unique string (a UUID is ideal). Replays within 24 hours return the first response instead of acting twice.

Request body (application/json)

FieldTypeDescription
amountrequirednumber-min 0
reasonstring-max 500 chars

Response 200

FieldTypeDescription
datarequiredobject-
operatorBalancerequireddata.operatorBalancenumber | nullYour balance after the transfer, as a JSON number; null when your balance did not move
subBalancerequireddata.subBalancenumberThe sub-account balance after the transfer, as a JSON number

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.
  • 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.

Reverse a recorded sub-account payment

POST/api/v1/application/sub-accounts/{id}/payment-correction

Access
API key. Scoped keys need application:write.
Rate limit
100 requests per second (the default)
Safe retries
Send X-Idempotency-Key; a replay within 24 hours returns the first response.
Moves money
Moves money between your balance and a sub-account.

Debits the sub-account to correct a payment recorded in error. Your own balance does not move.

Parameters

NameInTypeDescription
idrequiredpathstring-
X-Idempotency-KeyheaderstringAny unique string (a UUID is ideal). Replays within 24 hours return the first response instead of acting twice.

Request body (application/json)

FieldTypeDescription
amountrequirednumber-min 0
reasonrequiredstring-max 500 chars

Response 200

FieldTypeDescription
datarequiredobject-
operatorBalancerequireddata.operatorBalancenumber | nullYour balance after the transfer, as a JSON number; null when your balance did not move
subBalancerequireddata.subBalancenumberThe sub-account balance after the transfer, as a JSON number

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.
  • 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.

List a sub-account's API keys

GET/api/v1/application/sub-accounts/{id}/api-keys

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

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
keyPrefixrequireddata[].keyPrefixstring-
labelrequireddata[].labelstring-
lastUsedAtrequireddata[].lastUsedAtstring (date-time) | nullISO-8601 timestamp (UTC)
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
expiresAtrequireddata[].expiresAtstring (date-time) | nullISO-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.
  • 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.

Issue an API key for a sub-account

POST/api/v1/application/sub-accounts/{id}/api-keys

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

The key is returned ONCE. It can reach only the sub-account traffic endpoints.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 201

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
apiKeyrequireddata.apiKeystring-
prefixrequireddata.prefixstring-

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.
  • 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.

Revoke a sub-account API key

DELETE/api/v1/application/sub-accounts/{id}/api-keys/{keyId}

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

Parameters

NameInTypeDescription
idrequiredpathstring-
keyIdrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
revokedrequireddata.revokedboolean-One of true

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.
  • 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.

Set a sub-account's portal email and send a sign-in link

POST/api/v1/application/sub-accounts/{id}/portal-invite

Access
API key. Scoped keys need application:write.
Rate limit
100 requests per second (the default)
Sends email
Sends an email to a third party.

Send email: null to clear it. The link is only emailed to active sub-accounts.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
emailrequiredstring (email) | null-max 255 chars
sendInviteboolean-default true

Response 200

FieldTypeDescription
datarequiredobjectSame fields as SubAccount, 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.
  • 404NOT_FOUND: no such resource on your account.
  • 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.

Close a sub-account

POST/api/v1/application/sub-accounts/{id}/close

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

Ends service: revokes its keys and stops its campaigns. No money moves; return any balance separately with the debit endpoint. Idempotent.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobjectSame fields as SubAccount, 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.
  • 404NOT_FOUND: no such resource on your account.
  • 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.

Regenerate a sub-account SIP password

POST/api/v1/application/sub-accounts/{id}/sip-password

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

The new password is returned ONCE; the old one stops working immediately.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 201

FieldTypeDescription
datarequiredobject-
sipUsernamerequireddata.sipUsernamestring | null-
sipPasswordrequireddata.sipPasswordstring-

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.
  • 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 lifetime usage for a sub-account

GET/api/v1/application/sub-accounts/{id}/usage

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

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
recordsrequireddata.recordsinteger-
totalCostrequireddata.totalCostnumberUSD as a JSON number
totalSecondsrequireddata.totalSecondsinteger-
totalSegmentsrequireddata.totalSegmentsinteger-

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 analytics for one sub-account

GET/api/v1/application/sub-accounts/{id}/analytics

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

Parameters

NameInTypeDescription
idrequiredpathstring-
daysqueryintegerTrailing window in days (default 30)

Response 200

FieldTypeDescription
datarequiredobject-
periodrequireddata.periodobject-
daysrequireddata.period.daysinteger-
summaryrequireddata.summaryobject-
callsrequireddata.summary.callsinteger-
smsrequireddata.summary.smsinteger-
minutesrequireddata.summary.minutesinteger-
revenuerequireddata.summary.revenuenumberUSD, JSON number (analytics rollup)
marginrequireddata.summary.marginnumberUSD, JSON number (analytics rollup)
asrrequireddata.summary.asrnumber | nullAnswer rate percent over customer sessions; null with no calls
acdrequireddata.summary.acdnumber-
timeseriesrequireddata.timeseriesobject[]-
daterequireddata.timeseries[].datestringYYYY-MM-DD
callsrequireddata.timeseries[].callsinteger-
smsrequireddata.timeseries[].smsinteger-
revenuerequireddata.timeseries[].revenuenumber-
marginrequireddata.timeseries[].marginnumber-

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.

List call records for a sub-account

GET/api/v1/application/sub-accounts/{id}/cdrs

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

Newest first, offset-paginated.

Parameters

NameInTypeDescription
idrequiredpathstring-
limitqueryinteger-Default 50
offsetqueryinteger-Default 0
kindquerystring-One of voice, sms

Response 200

FieldTypeDescription
datarequiredobject[]-

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 a monthly statement for a sub-account

GET/api/v1/application/sub-accounts/{id}/statement

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

Spend in USD and in the sub-account's display currency, split by voice and SMS, with a resale-tax block. Derived, not stored.

Parameters

NameInTypeDescription
idrequiredpathstring-
monthrequiredquerystringYYYY-MM

Response 200

FieldTypeDescription
datarequiredobject-
subAccountIdrequireddata.subAccountIdstring (uuid)-
labelrequireddata.labelstring-
monthrequireddata.monthstring-
periodStartrequireddata.periodStartstring (date-time)ISO-8601 timestamp (UTC)
periodEndrequireddata.periodEndstring (date-time)ISO-8601 timestamp (UTC)
currencyrequireddata.currencystring-
fxRaterequireddata.fxRatenumber-
recordsrequireddata.recordsinteger-
spendrequireddata.spendobject-
usdrequireddata.spend.usdnumber-
inCurrencyrequireddata.spend.inCurrencynumber-
byKindrequireddata.byKindobject-
voicerequireddata.byKind.voiceobject-
usdrequireddata.byKind.voice.usdnumber-
inCurrencyrequireddata.byKind.voice.inCurrencynumber-
smsrequireddata.byKind.smsobject-
usdrequireddata.byKind.sms.usdnumber-
inCurrencyrequireddata.byKind.sms.inCurrencynumber-
taxrequireddata.taxobjectbase, ratePct, taxAmount, total, treatment, label, note

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.

Export a sub-account's call records as CSV

GET/api/v1/application/sub-accounts/{id}/cdrs/export

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

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200 (text/csv)

Every call record for the sub-account, as CSV.

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.