Skip to content
Markets open

API reference

Revenue share numbers

Revenue share number pools, IVR and payouts.

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

BrowseRevenue share numbers

Browse the revenue share number pool

GET/api/v1/revshare/numbers

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Cheapest first. Rates shown are what you earn per minute at the best payment term.

Parameters

NameInTypeDescription
countryquerystringCountry name contains
countryCodequerystring-
qquerystringNumber starts with these digits
numberFromquerystring-
numberToquerystring-
maxRatequerynumber-
statusquerystringDefault availableOne of available, taken, retired
limitqueryinteger-
offsetqueryinteger-

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
numberrequireddata[].numberstring-
countryrequireddata[].countrystring | null-
countryCoderequireddata[].countryCodestring | null-
carrierrequireddata[].carrierstring | null-
rangeLabelrequireddata[].rangeLabelstring | null-
groupKeyrequireddata[].groupKeystring-
statusrequireddata[].statusstring-One of available, taken, retired
ratePerMinrequireddata[].ratePerMinmoneyWhat you earn per minute at the best payment term USD as a decimal string with exactly 6 places, e.g. "0.012500".
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
totalinteger-
limitinteger-
offsetinteger-

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.

Take a revenue share number

POST/api/v1/revshare/numbers/{id}/take

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

You earn on every inbound minute to it. At most 5 numbers of one type per account.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
termrequiredstring-One of 1_1, 7_1, 15_15

Response 201

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
numberIdrequireddata.numberIdstring (uuid)-
userIdrequireddata.userIdstring (uuid)-
paymentTermrequireddata.paymentTermstringPayout cadence: 1_1 any day, 7_1 weekly, 15_15 twice monthlyOne of 1_1, 7_1, 15_15
effectiveRaterequireddata.effectiveRatemoneyWhat you earn per minute on this number USD as a decimal string with exactly 6 places, e.g. "0.012500".
ivrConfigIdrequireddata.ivrConfigIdstring (uuid) | null-
ivrModerequireddata.ivrModestring-One of single, split, geo
statusrequireddata.statusstring-One of active, released
callsCountrequireddata.callsCountinteger-
minutesTotalrequireddata.minutesTotalstring-
earningsTotalrequireddata.earningsTotalmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
lastCallAtrequireddata.lastCallAtstring (date-time) | nullISO-8601 timestamp (UTC)
takenAtrequireddata.takenAtstring (date-time)ISO-8601 timestamp (UTC)
releasedAtrequireddata.releasedAtstring (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.
  • 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.

Take one number of every available type

POST/api/v1/revshare/take-one-of-each

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Skips types where you already hold the maximum.

Request body (application/json)

FieldTypeDescription
termrequiredstring-One of 1_1, 7_1, 15_15

Response 200

FieldTypeDescription
datarequiredobject-
takenrequireddata.takeninteger-
groupsrequireddata.groupsinteger-

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.

Release a revenue share number back to the pool

POST/api/v1/revshare/takings/{id}/release

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

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

List the revenue share numbers you hold

GET/api/v1/revshare/my-numbers

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Active and released numbers with running call, minute and earnings totals.

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
numberIdrequireddata[].numberIdstring (uuid)-
numberrequireddata[].numberstring-
countryrequireddata[].countrystring | null-
countryCoderequireddata[].countryCodestring | null-
carrierrequireddata[].carrierstring | null-
paymentTermrequireddata[].paymentTermstringPayout cadence: 1_1 any day, 7_1 weekly, 15_15 twice monthlyOne of 1_1, 7_1, 15_15
ratePerMinrequireddata[].ratePerMinmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
statusrequireddata[].statusstring-One of active, released
callsCountrequireddata[].callsCountinteger-
minutesTotalrequireddata[].minutesTotalstring-
earningsTotalrequireddata[].earningsTotalmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
lastCallAtrequireddata[].lastCallAtstring (date-time) | nullISO-8601 timestamp (UTC)
ivrConfigIdrequireddata[].ivrConfigIdstring (uuid) | null-
ivrModerequireddata[].ivrModestring-One of single, split, geo
takenAtrequireddata[].takenAtstring (date-time)ISO-8601 timestamp (UTC)
releasedAtrequireddata[].releasedAtstring (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.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

List calls to your revenue share numbers

GET/api/v1/revshare/cdrs

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Newest first. format=csv downloads up to 5,000 rows as CSV.

Parameters

NameInTypeDescription
numberIdquerystring (uuid)-
fromquerystringISO date or timestamp
toquerystring-
formatquerystringcsv returns a CSV download instead of JSONOne of csv
limitqueryinteger-
offsetqueryinteger-

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
numberIdrequireddata[].numberIdstring (uuid)-
fromCarrierrequireddata[].fromCarrierstring | null-
toNetworkrequireddata[].toNetworkstring | null-
prefixrequireddata[].prefixstring-
callerNumberrequireddata[].callerNumberstring | nullThe full number that called your number; null when no caller ID was presented
ivrConfigIdrequireddata[].ivrConfigIdstring (uuid) | nullWhich of your IVR variants answered, when one did
originIsorequireddata[].originIsostring | null-
originCountryrequireddata[].originCountrystring | null-
startedAtrequireddata[].startedAtstring (date-time)ISO-8601 timestamp (UTC)
durationSecrequireddata[].durationSecinteger-
ratePerMinrequireddata[].ratePerMinmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
earnedAmountrequireddata[].earnedAmountmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
totalinteger-
limitinteger-
offsetinteger-

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 public revenue share call log

GET/api/v1/revshare/access-log

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Recent calls across the pool, with origin and destination geography for mapping.

Parameters

NameInTypeDescription
countryquerystring-
sincequerystring-
limitqueryinteger-
offsetqueryinteger-

Response 200

FieldTypeDescription
datarequiredobject[]-
fromCarrierrequireddata[].fromCarrierstring | null-
toNetworkrequireddata[].toNetworkstring | null-
prefixrequireddata[].prefixstring-
countryrequireddata[].countrystring | null-
startedAtrequireddata[].startedAtstring (date-time)ISO-8601 timestamp (UTC)
toIsorequireddata[].toIsostring | null-
toLatrequireddata[].toLatnumber | null-
toLngrequireddata[].toLngnumber | null-
fromIsorequireddata[].fromIsostring | null-
fromLatrequireddata[].fromLatnumber | null-
fromLngrequireddata[].fromLngnumber | null-
fromCountryrequireddata[].fromCountrystring | null-
limitinteger-
offsetinteger-

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 the carrier paths that reach the pool

GET/api/v1/revshare/access-paths

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

NameInTypeDescription
countryquerystring-
limitqueryinteger-

Response 200

FieldTypeDescription
datarequiredobject[]-
fromCarrierrequireddata[].fromCarrierstring | null-
toNetworkrequireddata[].toNetworkstring | null-
countryrequireddata[].countrystring | null-
countryCoderequireddata[].countryCodestring | null-
numbersrequireddata[].numbersinteger-
toIsorequireddata[].toIsostring | null-
toLatrequireddata[].toLatnumber | null-
toLngrequireddata[].toLngnumber | null-
fromIsorequireddata[].fromIsostring | null-
fromLatrequireddata[].fromLatnumber | null-
fromLngrequireddata[].fromLngnumber | null-
fromCountryrequireddata[].fromCountrystring | 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.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

List revenue share rates by number type

GET/api/v1/revshare/rates

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Available count and what you earn per minute at the best payment term. format=csv downloads CSV.

Parameters

NameInTypeDescription
countryquerystring-
countryCodequerystring-
maxRatequerynumber-
formatquerystringcsv returns a CSV download instead of JSONOne of csv
limitqueryinteger-
offsetqueryinteger-

Response 200

FieldTypeDescription
datarequiredobject[]-
groupKeyrequireddata[].groupKeystring-
countryrequireddata[].countrystring | null-
countryCoderequireddata[].countryCodestring | null-
isoCountryrequireddata[].isoCountrystring | null-
latrequireddata[].latnumber | null-
lngrequireddata[].lngnumber | null-
availableCountrequireddata[].availableCountinteger-
ratePerMinrequireddata[].ratePerMinmoneyUSD 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 your revenue share balance

GET/api/v1/revshare/balance

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

available = earned minus paid, requested and forfeited.

Response 200

FieldTypeDescription
datarequiredobject-
earnedrequireddata.earnedmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
paidrequireddata.paidmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
requestedrequireddata.requestedmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
availablerequireddata.availablemoneyUSD 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 when each payout term next opens

GET/api/v1/revshare/schedule

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Response 200

FieldTypeDescription
datarequiredobject[]-
termrequireddata[].termstringPayout cadence: 1_1 any day, 7_1 weekly, 15_15 twice monthlyOne of 1_1, 7_1, 15_15
labelrequireddata[].labelstring-
cadencerequireddata[].cadencestring-
nextOpenrequireddata[].nextOpenstring (date-time)ISO-8601 timestamp (UTC)
openNowrequireddata[].openNowboolean-

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 revenue share earnings statement

GET/api/v1/revshare/statement

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Totals by number and by origin carrier for a period. format=csv downloads CSV.

Parameters

NameInTypeDescription
fromquerystring-
toquerystring-
formatquerystringcsv returns a CSV download instead of JSONOne of csv

Response 200

FieldTypeDescription
datarequiredobject-
periodrequireddata.periodobject-
fromrequireddata.period.fromstring (date-time) | nullISO-8601 timestamp (UTC)
torequireddata.period.tostring (date-time) | nullISO-8601 timestamp (UTC)
totalsrequireddata.totalsobject-
callsrequireddata.totals.callsinteger-
minutesrequireddata.totals.minutesnumber-
earnedrequireddata.totals.earnedmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
byNumberrequireddata.byNumberobject[]-
numberrequireddata.byNumber[].numberstring-
countryrequireddata.byNumber[].countrystring | null-
callsrequireddata.byNumber[].callsinteger-
minutesrequireddata.byNumber[].minutesnumber-
earnedrequireddata.byNumber[].earnedmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
byOriginrequireddata.byOriginobject[]-
fromCarrierrequireddata.byOrigin[].fromCarrierstring | null-
callsrequireddata.byOrigin[].callsinteger-
minutesrequireddata.byOrigin[].minutesnumber-
earnedrequireddata.byOrigin[].earnedmoneyUSD 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.

List your revenue share payout requests

GET/api/v1/revshare/payouts

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
amountrequireddata[].amountmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
cryptoAssetrequireddata[].cryptoAssetstring | null-
networkrequireddata[].networkstring | null-
addressrequireddata[].addressstring | null-
termrequireddata[].termstringPayout cadence: 1_1 any day, 7_1 weekly, 15_15 twice monthlyOne of 1_1, 7_1, 15_15
statusrequireddata[].statusstring-One of requested, approved, paid, rejected
txRefrequireddata[].txRefstring | null-
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
paidAtrequireddata[].paidAtstring (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.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Request a revenue share payout

POST/api/v1/revshare/payouts

Access
Dashboard session. API keys are refused with 403. Use a login access token.
Rate limit
100 requests per second (the default)
Moves money
Requests a payout of your balance.

Paid in crypto to the address given. Subject to the minimum payout and, when enabled, identity verification.

Request body (application/json)

FieldTypeDescription
amountrequirednumber-min 50
cryptoAssetstring-max 40 chars
networkstring-max 40 chars
addressstring-max 200 chars
termrequiredstring-One of 1_1, 7_1, 15_15

Response 201

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
amountrequireddata.amountmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
cryptoAssetrequireddata.cryptoAssetstring | null-
networkrequireddata.networkstring | null-
addressrequireddata.addressstring | null-
paymentTermrequireddata.paymentTermstringPayout cadence: 1_1 any day, 7_1 weekly, 15_15 twice monthlyOne of 1_1, 7_1, 15_15
statusrequireddata.statusstring-One of requested
requestedAtrequireddata.requestedAtstring (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.
  • 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.
  • AlsoKYC_REQUIRED

List your IVR configurations

GET/api/v1/revshare/ivr-configs

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
userIdrequireddata[].userIdstring (uuid)-
takingIdrequireddata[].takingIdstring (uuid) | null-
kindrequireddata[].kindstring-One of default_music, upload, tts
namerequireddata[].namestring | null-
assetPathrequireddata[].assetPathstring | null-
assetMimerequireddata[].assetMimestring | nullSet when audio exists; stream it from the preview endpoint
ttsTextrequireddata[].ttsTextstring | null-
ttsVoiceIdrequireddata[].ttsVoiceIdstring | null-
statusrequireddata[].statusstring-One of draft, active
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.

Create an IVR configuration

POST/api/v1/revshare/ivr-configs

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Request body (application/json)

FieldTypeDescription
kindrequiredstring-One of default_music, upload, tts
takingIdstring (uuid) | null-
namestring | null-max 120 chars
assetPathstring | null-max 1024 chars
ttsTextstring | null-max 4000 chars
ttsVoiceIdstring | null-max 120 chars
statusstring-One of draft, active

Response 201

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

Update an IVR configuration

PATCH/api/v1/revshare/ivr-configs/{id}

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
kindstring-One of default_music, upload, tts
takingIdstring (uuid) | null-
namestring | null-max 120 chars
assetPathstring | null-max 1024 chars
ttsTextstring | null-max 4000 chars
ttsVoiceIdstring | null-max 120 chars
statusstring-One of draft, active

Response 200

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

Delete an IVR configuration

DELETE/api/v1/revshare/ivr-configs/{id}

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
messagerequireddata.messagestring-

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.

Preview text-to-speech audio before saving

POST/api/v1/revshare/ivr-configs/preview

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
20 requests per minute

Request body (application/json)

FieldTypeDescription
kindstring-
ttsTextrequiredstring-max 600 chars
ttsVoiceIdrequiredstring-

Response 200 (audio/mpeg)

The spoken text as MP3 audio.

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.

Generate the audio for a text-to-speech IVR

POST/api/v1/revshare/ivr-configs/{id}/generate

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Renders and stores the audio, and returns it.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200 (audio/mpeg)

The generated audio.

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.

Play an IVR configuration's audio

GET/api/v1/revshare/ivr-configs/{id}/preview

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200 (audio/mpeg)

The stored audio, in the media type it was saved with.

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.

Upload audio for an IVR

POST/api/v1/revshare/ivr-configs/upload

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Send a multipart file (with optional takingId and name fields), or JSON with contentBase64 as below.

Request body (application/json)

FieldTypeDescription
contentBase64string-
contentTypestring | null-max 120 chars
takingIdstring (uuid) | null-
namestring | null-max 120 chars

Response 201

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

Attach an IVR to a number you hold

PATCH/api/v1/revshare/takings/{id}

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Send ivrConfigId: null to fall back to the default music loop.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
ivrConfigIdstring (uuid) | null-

Response 200

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

Get the IVR set on a number you hold

GET/api/v1/revshare/takings/{id}/ivr

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
moderequireddata.modestring-One of single, split, geo
variantsrequireddata.variantsobject[]-
idrequireddata.variants[].idstring (uuid)-
ivrConfigIdrequireddata.variants[].ivrConfigIdstring (uuid)-
namerequireddata.variants[].namestring-
kindrequireddata.variants[].kindstring | null-One of default_music, upload, tts
weightPctrequireddata.variants[].weightPctinteger | null-
originIsorequireddata.variants[].originIsostring | null-
originCountryrequireddata.variants[].originCountrystring | null-
enabledrequireddata.variants[].enabledboolean | 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.

Replace the IVR set on a number you hold

PUT/api/v1/revshare/takings/{id}/ivr

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

single: exactly one variant. split: two or more, each with a weight. geo: one per caller country plus at most one default.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
moderequiredstring-One of single, split, geo
variantsrequiredobject[]-
ivrConfigIdrequiredvariants[].ivrConfigIdstring (uuid)-
weightPctvariants[].weightPctinteger | null-1 to 100
originIsovariants[].originIsostring | null-max 2 chars
originCountryvariants[].originCountrystring | null-max 120 chars
enabledvariants[].enabledboolean | null-

Response 200

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

Compare IVR variants on a number you hold

GET/api/v1/revshare/takings/{id}/ivr-stats

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Calls, minutes and earnings per variant and per caller country, with the best-earning variant once two have calls.

Parameters

NameInTypeDescription
idrequiredpathstring-
fromquerystring-
toquerystring-

Response 200

FieldTypeDescription
datarequiredobject-
periodrequireddata.periodobject-
fromrequireddata.period.fromstring (date-time) | nullISO-8601 timestamp (UTC)
torequireddata.period.tostring (date-time) | nullISO-8601 timestamp (UTC)
byVariantrequireddata.byVariantobject[]-
byCountryrequireddata.byCountryobject[]-
isorequireddata.byCountry[].isostring | null-
countryrequireddata.byCountry[].countrystring | null-
callsrequireddata.byCountry[].callsinteger-
minutesrequireddata.byCountry[].minutesnumber-
earningsrequireddata.byCountry[].earningsnumber-
winnerrequireddata.winnerstring (uuid) | 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.