Skip to content

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

  • country

    query · string

    Country name contains
  • countryCode

    query · string

  • q

    query · string

    Number starts with these digits
  • numberFrom

    query · string

  • numberTo

    query · string

  • maxRate

    query · number

  • status

    query · string

    Default availableOne of available, taken, retired
  • limit

    query · integer

  • offset

    query · integer

Response 200

  • datarequired

    object[]

  • idrequired

    string (uuid) · data[].id

  • numberrequired

    string · data[].number

  • countryrequired

    string | null · data[].country

  • countryCoderequired

    string | null · data[].countryCode

  • carrierrequired

    string | null · data[].carrier

  • rangeLabelrequired

    string | null · data[].rangeLabel

  • groupKeyrequired

    string · data[].groupKey

  • statusrequired

    string · data[].status

    One of available, taken, retired
  • ratePerMinrequired

    money · data[].ratePerMin

    What you earn per minute at the best payment term USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • createdAtrequired

    string (date-time) · data[].createdAt

    ISO-8601 timestamp (UTC)
  • total

    integer

  • limit

    integer

  • offset

    integer

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

  • idrequired

    path · string

Request body (application/json)

  • termrequired

    string

    One of 1_1, 7_1, 15_15

Response 201

  • datarequired

    object

  • idrequired

    string (uuid) · data.id

  • numberIdrequired

    string (uuid) · data.numberId

  • userIdrequired

    string (uuid) · data.userId

  • paymentTermrequired

    string · data.paymentTerm

    Payout cadence: 1_1 any day, 7_1 weekly, 15_15 twice monthlyOne of 1_1, 7_1, 15_15
  • effectiveRaterequired

    money · data.effectiveRate

    What you earn per minute on this number USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • ivrConfigIdrequired

    string (uuid) | null · data.ivrConfigId

  • ivrModerequired

    string · data.ivrMode

    One of single, split, geo
  • statusrequired

    string · data.status

    One of active, released
  • callsCountrequired

    integer · data.callsCount

  • minutesTotalrequired

    string · data.minutesTotal

  • earningsTotalrequired

    money · data.earningsTotal

    USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • lastCallAtrequired

    string (date-time) | null · data.lastCallAt

    ISO-8601 timestamp (UTC)
  • takenAtrequired

    string (date-time) · data.takenAt

    ISO-8601 timestamp (UTC)
  • releasedAtrequired

    string (date-time) | null · data.releasedAt

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

  • termrequired

    string

    One of 1_1, 7_1, 15_15

Response 200

  • datarequired

    object

  • takenrequired

    integer · data.taken

  • groupsrequired

    integer · data.groups

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

  • idrequired

    path · string

Response 200

  • datarequired

    object

    Same 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

  • datarequired

    object[]

  • idrequired

    string (uuid) · data[].id

  • numberIdrequired

    string (uuid) · data[].numberId

  • numberrequired

    string · data[].number

  • countryrequired

    string | null · data[].country

  • countryCoderequired

    string | null · data[].countryCode

  • carrierrequired

    string | null · data[].carrier

  • paymentTermrequired

    string · data[].paymentTerm

    Payout cadence: 1_1 any day, 7_1 weekly, 15_15 twice monthlyOne of 1_1, 7_1, 15_15
  • ratePerMinrequired

    money · data[].ratePerMin

    USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • statusrequired

    string · data[].status

    One of active, released
  • callsCountrequired

    integer · data[].callsCount

  • minutesTotalrequired

    string · data[].minutesTotal

  • earningsTotalrequired

    money · data[].earningsTotal

    USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • lastCallAtrequired

    string (date-time) | null · data[].lastCallAt

    ISO-8601 timestamp (UTC)
  • ivrConfigIdrequired

    string (uuid) | null · data[].ivrConfigId

  • ivrModerequired

    string · data[].ivrMode

    One of single, split, geo
  • takenAtrequired

    string (date-time) · data[].takenAt

    ISO-8601 timestamp (UTC)
  • releasedAtrequired

    string (date-time) | null · data[].releasedAt

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

  • numberId

    query · string (uuid)

  • from

    query · string

    ISO date or timestamp
  • to

    query · string

  • format

    query · string

    csv returns a CSV download instead of JSONOne of csv
  • limit

    query · integer

  • offset

    query · integer

Response 200

  • datarequired

    object[]

  • idrequired

    string (uuid) · data[].id

  • numberIdrequired

    string (uuid) · data[].numberId

  • fromCarrierrequired

    string | null · data[].fromCarrier

  • toNetworkrequired

    string | null · data[].toNetwork

  • prefixrequired

    string · data[].prefix

  • callerNumberrequired

    string | null · data[].callerNumber

    The full number that called your number; null when no caller ID was presented
  • ivrConfigIdrequired

    string (uuid) | null · data[].ivrConfigId

    Which of your IVR variants answered, when one did
  • originIsorequired

    string | null · data[].originIso

  • originCountryrequired

    string | null · data[].originCountry

  • startedAtrequired

    string (date-time) · data[].startedAt

    ISO-8601 timestamp (UTC)
  • durationSecrequired

    integer · data[].durationSec

  • ratePerMinrequired

    money · data[].ratePerMin

    USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • earnedAmountrequired

    money · data[].earnedAmount

    USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • createdAtrequired

    string (date-time) · data[].createdAt

    ISO-8601 timestamp (UTC)
  • total

    integer

  • limit

    integer

  • offset

    integer

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

  • country

    query · string

  • since

    query · string

  • limit

    query · integer

  • offset

    query · integer

Response 200

  • datarequired

    object[]

  • fromCarrierrequired

    string | null · data[].fromCarrier

  • toNetworkrequired

    string | null · data[].toNetwork

  • prefixrequired

    string · data[].prefix

  • countryrequired

    string | null · data[].country

  • startedAtrequired

    string (date-time) · data[].startedAt

    ISO-8601 timestamp (UTC)
  • toIsorequired

    string | null · data[].toIso

  • toLatrequired

    number | null · data[].toLat

  • toLngrequired

    number | null · data[].toLng

  • fromIsorequired

    string | null · data[].fromIso

  • fromLatrequired

    number | null · data[].fromLat

  • fromLngrequired

    number | null · data[].fromLng

  • fromCountryrequired

    string | null · data[].fromCountry

  • limit

    integer

  • offset

    integer

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

  • country

    query · string

  • limit

    query · integer

Response 200

  • datarequired

    object[]

  • fromCarrierrequired

    string | null · data[].fromCarrier

  • toNetworkrequired

    string | null · data[].toNetwork

  • countryrequired

    string | null · data[].country

  • countryCoderequired

    string | null · data[].countryCode

  • numbersrequired

    integer · data[].numbers

  • toIsorequired

    string | null · data[].toIso

  • toLatrequired

    number | null · data[].toLat

  • toLngrequired

    number | null · data[].toLng

  • fromIsorequired

    string | null · data[].fromIso

  • fromLatrequired

    number | null · data[].fromLat

  • fromLngrequired

    number | null · data[].fromLng

  • fromCountryrequired

    string | null · data[].fromCountry

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

  • country

    query · string

  • countryCode

    query · string

  • maxRate

    query · number

  • format

    query · string

    csv returns a CSV download instead of JSONOne of csv
  • limit

    query · integer

  • offset

    query · integer

Response 200

  • datarequired

    object[]

  • groupKeyrequired

    string · data[].groupKey

  • countryrequired

    string | null · data[].country

  • countryCoderequired

    string | null · data[].countryCode

  • isoCountryrequired

    string | null · data[].isoCountry

  • latrequired

    number | null · data[].lat

  • lngrequired

    number | null · data[].lng

  • availableCountrequired

    integer · data[].availableCount

  • ratePerMinrequired

    money · data[].ratePerMin

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

  • datarequired

    object

  • earnedrequired

    money · data.earned

    USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • paidrequired

    money · data.paid

    USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • requestedrequired

    money · data.requested

    USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • availablerequired

    money · data.available

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

  • datarequired

    object[]

  • termrequired

    string · data[].term

    Payout cadence: 1_1 any day, 7_1 weekly, 15_15 twice monthlyOne of 1_1, 7_1, 15_15
  • labelrequired

    string · data[].label

  • cadencerequired

    string · data[].cadence

  • nextOpenrequired

    string (date-time) · data[].nextOpen

    ISO-8601 timestamp (UTC)
  • openNowrequired

    boolean · data[].openNow

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

  • from

    query · string

  • to

    query · string

  • format

    query · string

    csv returns a CSV download instead of JSONOne of csv

Response 200

  • datarequired

    object

  • periodrequired

    object · data.period

  • fromrequired

    string (date-time) | null · data.period.from

    ISO-8601 timestamp (UTC)
  • torequired

    string (date-time) | null · data.period.to

    ISO-8601 timestamp (UTC)
  • totalsrequired

    object · data.totals

  • callsrequired

    integer · data.totals.calls

  • minutesrequired

    number · data.totals.minutes

  • earnedrequired

    money · data.totals.earned

    USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • byNumberrequired

    object[] · data.byNumber

  • numberrequired

    string · data.byNumber[].number

  • countryrequired

    string | null · data.byNumber[].country

  • callsrequired

    integer · data.byNumber[].calls

  • minutesrequired

    number · data.byNumber[].minutes

  • earnedrequired

    money · data.byNumber[].earned

    USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • byOriginrequired

    object[] · data.byOrigin

  • fromCarrierrequired

    string | null · data.byOrigin[].fromCarrier

  • callsrequired

    integer · data.byOrigin[].calls

  • minutesrequired

    number · data.byOrigin[].minutes

  • earnedrequired

    money · data.byOrigin[].earned

    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.

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

  • datarequired

    object[]

  • idrequired

    string (uuid) · data[].id

  • amountrequired

    money · data[].amount

    USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • cryptoAssetrequired

    string | null · data[].cryptoAsset

  • networkrequired

    string | null · data[].network

  • addressrequired

    string | null · data[].address

  • termrequired

    string · data[].term

    Payout cadence: 1_1 any day, 7_1 weekly, 15_15 twice monthlyOne of 1_1, 7_1, 15_15
  • statusrequired

    string · data[].status

    One of requested, approved, paid, rejected
  • txRefrequired

    string | null · data[].txRef

  • createdAtrequired

    string (date-time) · data[].createdAt

    ISO-8601 timestamp (UTC)
  • paidAtrequired

    string (date-time) | null · data[].paidAt

    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.

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)

  • amountrequired

    number

    min 50
  • cryptoAsset

    string

    max 40 chars
  • network

    string

    max 40 chars
  • address

    string

    max 200 chars
  • termrequired

    string

    One of 1_1, 7_1, 15_15

Response 201

  • datarequired

    object

  • idrequired

    string (uuid) · data.id

  • amountrequired

    money · data.amount

    USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • cryptoAssetrequired

    string | null · data.cryptoAsset

  • networkrequired

    string | null · data.network

  • addressrequired

    string | null · data.address

  • paymentTermrequired

    string · data.paymentTerm

    Payout cadence: 1_1 any day, 7_1 weekly, 15_15 twice monthlyOne of 1_1, 7_1, 15_15
  • statusrequired

    string · data.status

    One of requested
  • requestedAtrequired

    string (date-time) · data.requestedAt

    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

  • datarequired

    object[]

  • idrequired

    string (uuid) · data[].id

  • userIdrequired

    string (uuid) · data[].userId

  • takingIdrequired

    string (uuid) | null · data[].takingId

  • kindrequired

    string · data[].kind

    One of default_music, upload, tts
  • namerequired

    string | null · data[].name

  • assetPathrequired

    string | null · data[].assetPath

  • assetMimerequired

    string | null · data[].assetMime

    Set when audio exists; stream it from the preview endpoint
  • ttsTextrequired

    string | null · data[].ttsText

  • ttsVoiceIdrequired

    string | null · data[].ttsVoiceId

  • statusrequired

    string · data[].status

    One of draft, active
  • createdAtrequired

    string (date-time) · data[].createdAt

    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)

  • kindrequired

    string

    One of default_music, upload, tts
  • takingId

    string (uuid) | null

  • name

    string | null

    max 120 chars
  • assetPath

    string | null

    max 1024 chars
  • ttsText

    string | null

    max 4000 chars
  • ttsVoiceId

    string | null

    max 120 chars
  • status

    string

    One of draft, active

Response 201

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

  • idrequired

    path · string

Request body (application/json)

  • kind

    string

    One of default_music, upload, tts
  • takingId

    string (uuid) | null

  • name

    string | null

    max 120 chars
  • assetPath

    string | null

    max 1024 chars
  • ttsText

    string | null

    max 4000 chars
  • ttsVoiceId

    string | null

    max 120 chars
  • status

    string

    One of draft, active

Response 200

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

  • idrequired

    path · string

Response 200

  • datarequired

    object

  • messagerequired

    string · data.message

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)

  • kind

    string

  • ttsTextrequired

    string

    max 600 chars
  • ttsVoiceIdrequired

    string

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

  • idrequired

    path · string

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

  • idrequired

    path · string

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)

  • contentBase64

    string

  • contentType

    string | null

    max 120 chars
  • takingId

    string (uuid) | null

  • name

    string | null

    max 120 chars

Response 201

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

  • idrequired

    path · string

Request body (application/json)

  • ivrConfigId

    string (uuid) | null

Response 200

  • datarequired

    object

    Same 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

  • idrequired

    path · string

Response 200

  • datarequired

    object

  • moderequired

    string · data.mode

    One of single, split, geo
  • variantsrequired

    object[] · data.variants

  • idrequired

    string (uuid) · data.variants[].id

  • ivrConfigIdrequired

    string (uuid) · data.variants[].ivrConfigId

  • namerequired

    string · data.variants[].name

  • kindrequired

    string | null · data.variants[].kind

    One of default_music, upload, tts
  • weightPctrequired

    integer | null · data.variants[].weightPct

  • originIsorequired

    string | null · data.variants[].originIso

  • originCountryrequired

    string | null · data.variants[].originCountry

  • enabledrequired

    boolean | null · data.variants[].enabled

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

  • idrequired

    path · string

Request body (application/json)

  • moderequired

    string

    One of single, split, geo
  • variantsrequired

    object[]

  • ivrConfigIdrequired

    string (uuid) · variants[].ivrConfigId

  • weightPct

    integer | null · variants[].weightPct

    1 to 100
  • originIso

    string | null · variants[].originIso

    max 2 chars
  • originCountry

    string | null · variants[].originCountry

    max 120 chars
  • enabled

    boolean | null · variants[].enabled

Response 200

  • datarequired

    object

    Same 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

  • idrequired

    path · string

  • from

    query · string

  • to

    query · string

Response 200

  • datarequired

    object

  • periodrequired

    object · data.period

  • fromrequired

    string (date-time) | null · data.period.from

    ISO-8601 timestamp (UTC)
  • torequired

    string (date-time) | null · data.period.to

    ISO-8601 timestamp (UTC)
  • byVariantrequired

    object[] · data.byVariant

  • byCountryrequired

    object[] · data.byCountry

  • isorequired

    string | null · data.byCountry[].iso

  • countryrequired

    string | null · data.byCountry[].country

  • callsrequired

    integer · data.byCountry[].calls

  • minutesrequired

    number · data.byCountry[].minutes

  • earningsrequired

    number · data.byCountry[].earnings

  • winnerrequired

    string (uuid) | null · data.winner

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.