Skip to content
Markets open

Switch API reference

Switch: suppliers

Suppliers and providers you buy from: accounts, trunks, admission and diagnostics.

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

BrowseSwitch: suppliers

List providers with their trunks

GET/api/v1/switch/providers

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

Every provider on your switch, each with its trunks (secrets redacted) and endpoint counts, plus trunks not yet assigned to a provider.

Response 200

FieldTypeDescription
datarequiredobject-
accountsrequireddata.accountsobject[]-
idrequireddata.accounts[].idstring (uuid)-
namerequireddata.accounts[].namestring-
accountCoderequireddata.accounts[].accountCodestring | null-
legalNamerequireddata.accounts[].legalNamestring | null-
tradingNamerequireddata.accounts[].tradingNamestring | null-
providerTyperequireddata.accounts[].providerTypestring | null-One of carrier, aggregator, mno, mvno, sip_provider
countryrequireddata.accounts[].countrystring | null-
servicesrequireddata.accounts[].servicesstring[] | null-
portalEmailrequireddata.accounts[].portalEmailstring | null-
currencyrequireddata.accounts[].currencystring-
statusrequireddata.accounts[].statusstring-One of draft, pending_approval, testing, active, suspended, terminated
statusNoterequireddata.accounts[].statusNotestring | null-
statusChangedAtrequireddata.accounts[].statusChangedAtstring (date-time) | nullISO-8601 timestamp (UTC)
routablerequireddata.accounts[].routablebooleanWhether this provider admits new calls at all, given its status
contractStartrequireddata.accounts[].contractStartstring | nullYYYY-MM-DD
contractEndrequireddata.accounts[].contractEndstring | null-
autoRenewrequireddata.accounts[].autoRenewboolean-
rateNoticeDaysrequireddata.accounts[].rateNoticeDaysinteger | null-
disputeDaysrequireddata.accounts[].disputeDaysinteger | null-
billingModerequireddata.accounts[].billingModestring-One of prepaid, postpaid
creditLimitrequireddata.accounts[].creditLimitstring | nullDecimal string with 2 decimal places, e.g. "5000.00"
balancerequireddata.accounts[].balancemoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
paymentTermsDaysrequireddata.accounts[].paymentTermsDaysinteger | null-
invoiceCyclerequireddata.accounts[].invoiceCyclestring | null-
createdAtrequireddata.accounts[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.accounts[].updatedAtstring (date-time)ISO-8601 timestamp (UTC)
trunksrequireddata.accounts[].trunksobject[]-
idrequireddata.accounts[].trunks[].idstring (uuid)-
supplierIdrequireddata.accounts[].trunks[].supplierIdstring (uuid) | nullThe owning provider; null = ungrouped
labelrequireddata.accounts[].trunks[].labelstring-
sourcerequireddata.accounts[].trunks[].sourcestring"external" for a carrier you entered; "marketplace" for a trunk promoted from a marketplace purchase
statusrequireddata.accounts[].trunks[].statusstring-One of active, disabled, draft, testing, draining, fault
sipHostrequireddata.accounts[].trunks[].sipHoststring | nullNull on a marketplace trunk: the seller address is never disclosed
sipPortrequireddata.accounts[].trunks[].sipPortinteger | null-
transportrequireddata.accounts[].trunks[].transportstring | null-One of udp, tcp, tls
techPrefixrequireddata.accounts[].trunks[].techPrefixstring | null-
sipAuthUsernamerequireddata.accounts[].trunks[].sipAuthUsernamestring | null-
sipAuthPasswordSetrequireddata.accounts[].trunks[].sipAuthPasswordSetbooleanWhether a SIP password is stored. The value is only readable via GET /switch/suppliers/{id}/credentials
smppPasswordSetrequireddata.accounts[].trunks[].smppPasswordSetboolean-
mediaModerequireddata.accounts[].trunks[].mediaModestring-One of proxy, direct
defaultRatePerUnitrequireddata.accounts[].trunks[].defaultRatePerUnitmoney | nullCost per minute used when no deck row matches USD as a decimal string with exactly 6 places, e.g. "0.012500".
billingIncrementrequireddata.accounts[].trunks[].billingIncrementstring | null-
currencyrequireddata.accounts[].trunks[].currencystring | null-
capacityrequireddata.accounts[].trunks[].capacityinteger | nullMax concurrent channels
maxCpsrequireddata.accounts[].trunks[].maxCpsinteger | null-
settlementModerequireddata.accounts[].trunks[].settlementModestring-One of ap, prepaid
balancerequireddata.accounts[].trunks[].balancemoneyPrepaid credit remaining with this supplier (prepaid settlement) USD as a decimal string with exactly 6 places, e.g. "0.012500".
smsDeliveryMethodrequireddata.accounts[].trunks[].smsDeliveryMethodstring | null-One of http, smpp
reachablerequireddata.accounts[].trunks[].reachableboolean | null-
reachCheckedAtrequireddata.accounts[].trunks[].reachCheckedAtstring (date-time) | nullISO-8601 timestamp (UTC)
createdAtrequireddata.accounts[].trunks[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.accounts[].trunks[].updatedAtstring (date-time)ISO-8601 timestamp (UTC)
endpointCountrequireddata.accounts[].trunks[].endpointCountinteger-
endpointsEnabledrequireddata.accounts[].trunks[].endpointsEnabledinteger-
trunkCountrequireddata.accounts[].trunkCountinteger-
activeTrunksrequireddata.accounts[].activeTrunksinteger-
totalCapacityrequireddata.accounts[].totalCapacityinteger-
ungroupedrequireddata.ungroupedobject[]-
idrequireddata.ungrouped[].idstring (uuid)-
supplierIdrequireddata.ungrouped[].supplierIdstring (uuid) | nullThe owning provider; null = ungrouped
labelrequireddata.ungrouped[].labelstring-
sourcerequireddata.ungrouped[].sourcestring"external" for a carrier you entered; "marketplace" for a trunk promoted from a marketplace purchase
statusrequireddata.ungrouped[].statusstring-One of active, disabled, draft, testing, draining, fault
sipHostrequireddata.ungrouped[].sipHoststring | nullNull on a marketplace trunk: the seller address is never disclosed
sipPortrequireddata.ungrouped[].sipPortinteger | null-
transportrequireddata.ungrouped[].transportstring | null-One of udp, tcp, tls
techPrefixrequireddata.ungrouped[].techPrefixstring | null-
sipAuthUsernamerequireddata.ungrouped[].sipAuthUsernamestring | null-
sipAuthPasswordSetrequireddata.ungrouped[].sipAuthPasswordSetbooleanWhether a SIP password is stored. The value is only readable via GET /switch/suppliers/{id}/credentials
smppPasswordSetrequireddata.ungrouped[].smppPasswordSetboolean-
mediaModerequireddata.ungrouped[].mediaModestring-One of proxy, direct
defaultRatePerUnitrequireddata.ungrouped[].defaultRatePerUnitmoney | nullCost per minute used when no deck row matches USD as a decimal string with exactly 6 places, e.g. "0.012500".
billingIncrementrequireddata.ungrouped[].billingIncrementstring | null-
currencyrequireddata.ungrouped[].currencystring | null-
capacityrequireddata.ungrouped[].capacityinteger | nullMax concurrent channels
maxCpsrequireddata.ungrouped[].maxCpsinteger | null-
settlementModerequireddata.ungrouped[].settlementModestring-One of ap, prepaid
balancerequireddata.ungrouped[].balancemoneyPrepaid credit remaining with this supplier (prepaid settlement) USD as a decimal string with exactly 6 places, e.g. "0.012500".
smsDeliveryMethodrequireddata.ungrouped[].smsDeliveryMethodstring | null-One of http, smpp
reachablerequireddata.ungrouped[].reachableboolean | null-
reachCheckedAtrequireddata.ungrouped[].reachCheckedAtstring (date-time) | nullISO-8601 timestamp (UTC)
createdAtrequireddata.ungrouped[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.ungrouped[].updatedAtstring (date-time)ISO-8601 timestamp (UTC)
endpointCountrequireddata.ungrouped[].endpointCountinteger-
endpointsEnabledrequireddata.ungrouped[].endpointsEnabledinteger-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 provider

POST/api/v1/switch/providers

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

A provider is the carrier or company that owns one or more supplier trunks.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Request body (application/json)

FieldTypeDescription
namerequiredstring-max 160 chars
accountCodestring | null-max 40 chars
legalNamestring | null-max 200 chars
tradingNamestring | null-max 200 chars
providerTypestring | null-One of carrier, aggregator, mno, mvno, sip_provider
registrationNumberstring | null-max 80 chars
taxIdstring | null-max 80 chars
vatIdstring | null-max 80 chars
addressstring | null-max 600 chars
countrystring | null-max 2 chars
accountManagerstring | null-max 160 chars
tagsstring[] | null-
servicesstring[] | null-One of termination, origination, did, sms
portalEmailstring (email) | null-max 255 chars
notesstring | null-max 4000 chars
currencystring | null-max 3 chars
statusstringAccepted on create only; later changes go through POST /{id}/statusOne of draft, pending_approval, testing, active, suspended, terminated
contractStartstring | null-max 10 chars
contractEndstring | null-max 10 chars
autoRenewboolean-
rateNoticeDaysnumber | string | null-
disputeDaysnumber | string | null-
billingModestring | null-One of prepaid, postpaid
creditLimitnumber | string | null-
paymentTermsDaysnumber | string | null-
invoiceCyclestring | null-One of weekly, biweekly, monthly
billingTimezonestring | null-max 64 chars

Response 201

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
namerequireddata.namestring-
accountCoderequireddata.accountCodestring | null-
legalNamerequireddata.legalNamestring | null-
tradingNamerequireddata.tradingNamestring | null-
providerTyperequireddata.providerTypestring | null-One of carrier, aggregator, mno, mvno, sip_provider
countryrequireddata.countrystring | null-
servicesrequireddata.servicesstring[] | null-
portalEmailrequireddata.portalEmailstring | null-
currencyrequireddata.currencystring-
statusrequireddata.statusstring-One of draft, pending_approval, testing, active, suspended, terminated
statusNoterequireddata.statusNotestring | null-
statusChangedAtrequireddata.statusChangedAtstring (date-time) | nullISO-8601 timestamp (UTC)
routablerequireddata.routablebooleanWhether this provider admits new calls at all, given its status
contractStartrequireddata.contractStartstring | nullYYYY-MM-DD
contractEndrequireddata.contractEndstring | null-
autoRenewrequireddata.autoRenewboolean-
rateNoticeDaysrequireddata.rateNoticeDaysinteger | null-
disputeDaysrequireddata.disputeDaysinteger | null-
billingModerequireddata.billingModestring-One of prepaid, postpaid
creditLimitrequireddata.creditLimitstring | nullDecimal string with 2 decimal places, e.g. "5000.00"
balancerequireddata.balancemoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
paymentTermsDaysrequireddata.paymentTermsDaysinteger | null-
invoiceCyclerequireddata.invoiceCyclestring | null-
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.updatedAtstring (date-time)ISO-8601 timestamp (UTC)

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 provider with its trunks, endpoints and contacts

GET/api/v1/switch/providers/{id}

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

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
namerequireddata.namestring-
accountCoderequireddata.accountCodestring | null-
legalNamerequireddata.legalNamestring | null-
tradingNamerequireddata.tradingNamestring | null-
providerTyperequireddata.providerTypestring | null-One of carrier, aggregator, mno, mvno, sip_provider
countryrequireddata.countrystring | null-
servicesrequireddata.servicesstring[] | null-
portalEmailrequireddata.portalEmailstring | null-
currencyrequireddata.currencystring-
statusrequireddata.statusstring-One of draft, pending_approval, testing, active, suspended, terminated
statusNoterequireddata.statusNotestring | null-
statusChangedAtrequireddata.statusChangedAtstring (date-time) | nullISO-8601 timestamp (UTC)
routablerequireddata.routablebooleanWhether this provider admits new calls at all, given its status
contractStartrequireddata.contractStartstring | nullYYYY-MM-DD
contractEndrequireddata.contractEndstring | null-
autoRenewrequireddata.autoRenewboolean-
rateNoticeDaysrequireddata.rateNoticeDaysinteger | null-
disputeDaysrequireddata.disputeDaysinteger | null-
billingModerequireddata.billingModestring-One of prepaid, postpaid
creditLimitrequireddata.creditLimitstring | nullDecimal string with 2 decimal places, e.g. "5000.00"
balancerequireddata.balancemoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
paymentTermsDaysrequireddata.paymentTermsDaysinteger | null-
invoiceCyclerequireddata.invoiceCyclestring | null-
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.updatedAtstring (date-time)ISO-8601 timestamp (UTC)
contactsrequireddata.contactsobject[]-
idrequireddata.contacts[].idstring (uuid)-
supplierIdrequireddata.contacts[].supplierIdstring (uuid)-
rolerequireddata.contacts[].rolestring-One of noc, rates, billing, finance, fraud, account, emergency
namerequireddata.contacts[].namestring | null-
emailrequireddata.contacts[].emailstring | null-
phonerequireddata.contacts[].phonestring | null-
timezonerequireddata.contacts[].timezonestring | null-
notifyrequireddata.contacts[].notifyboolean-
notesrequireddata.contacts[].notesstring | null-
createdAtrequireddata.contacts[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.contacts[].updatedAtstring (date-time)ISO-8601 timestamp (UTC)
trunksrequireddata.trunksobject[]-
idrequireddata.trunks[].idstring (uuid)-
supplierIdrequireddata.trunks[].supplierIdstring (uuid) | nullThe owning provider; null = ungrouped
labelrequireddata.trunks[].labelstring-
sourcerequireddata.trunks[].sourcestring"external" for a carrier you entered; "marketplace" for a trunk promoted from a marketplace purchase
statusrequireddata.trunks[].statusstring-One of active, disabled, draft, testing, draining, fault
sipHostrequireddata.trunks[].sipHoststring | nullNull on a marketplace trunk: the seller address is never disclosed
sipPortrequireddata.trunks[].sipPortinteger | null-
transportrequireddata.trunks[].transportstring | null-One of udp, tcp, tls
techPrefixrequireddata.trunks[].techPrefixstring | null-
sipAuthUsernamerequireddata.trunks[].sipAuthUsernamestring | null-
sipAuthPasswordSetrequireddata.trunks[].sipAuthPasswordSetbooleanWhether a SIP password is stored. The value is only readable via GET /switch/suppliers/{id}/credentials
smppPasswordSetrequireddata.trunks[].smppPasswordSetboolean-
mediaModerequireddata.trunks[].mediaModestring-One of proxy, direct
defaultRatePerUnitrequireddata.trunks[].defaultRatePerUnitmoney | nullCost per minute used when no deck row matches USD as a decimal string with exactly 6 places, e.g. "0.012500".
billingIncrementrequireddata.trunks[].billingIncrementstring | null-
currencyrequireddata.trunks[].currencystring | null-
capacityrequireddata.trunks[].capacityinteger | nullMax concurrent channels
maxCpsrequireddata.trunks[].maxCpsinteger | null-
settlementModerequireddata.trunks[].settlementModestring-One of ap, prepaid
balancerequireddata.trunks[].balancemoneyPrepaid credit remaining with this supplier (prepaid settlement) USD as a decimal string with exactly 6 places, e.g. "0.012500".
smsDeliveryMethodrequireddata.trunks[].smsDeliveryMethodstring | null-One of http, smpp
reachablerequireddata.trunks[].reachableboolean | null-
reachCheckedAtrequireddata.trunks[].reachCheckedAtstring (date-time) | nullISO-8601 timestamp (UTC)
createdAtrequireddata.trunks[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.trunks[].updatedAtstring (date-time)ISO-8601 timestamp (UTC)
endpointsrequireddata.trunks[].endpointsobject[]-
idrequireddata.trunks[].endpoints[].idstring (uuid)-
vendorTrunkIdrequireddata.trunks[].endpoints[].vendorTrunkIdstring (uuid)-
rolerequireddata.trunks[].endpoints[].rolestring-One of primary, backup
hostrequireddata.trunks[].endpoints[].hoststring | nullNull on a marketplace trunk
portrequireddata.trunks[].endpoints[].portinteger | null-
transportrequireddata.trunks[].endpoints[].transportstring-One of udp, tcp, tls
priorityrequireddata.trunks[].endpoints[].priorityinteger-
weightPctrequireddata.trunks[].endpoints[].weightPctinteger | null-
enabledrequireddata.trunks[].endpoints[].enabledboolean-
optionsIntervalSecondsrequireddata.trunks[].endpoints[].optionsIntervalSecondsinteger | null-
failureThresholdrequireddata.trunks[].endpoints[].failureThresholdinteger-
recoveryThresholdrequireddata.trunks[].endpoints[].recoveryThresholdinteger-
autoDisablerequireddata.trunks[].endpoints[].autoDisableboolean-
reachablerequireddata.trunks[].endpoints[].reachableboolean | null-
reachLatencyMsrequireddata.trunks[].endpoints[].reachLatencyMsinteger | null-
reachCheckedAtrequireddata.trunks[].endpoints[].reachCheckedAtstring (date-time) | nullISO-8601 timestamp (UTC)
healthDisabledAtrequireddata.trunks[].endpoints[].healthDisabledAtstring (date-time) | nullISO-8601 timestamp (UTC)
healthrequireddata.trunks[].endpoints[].healthobjectDerived health state (what routing believes), with its counters and thresholds
flapdata.trunks[].endpoints[].flapobject | null-
createdAtrequireddata.trunks[].endpoints[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.trunks[].endpoints[].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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 provider

PATCH/api/v1/switch/providers/{id}

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

Partial update; status is changed through POST /{id}/status instead. Send X-If-Unchanged-Since: <updatedAt you loaded> to be refused with 409 STALE_WRITE if someone else saved in between.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
namestring-max 160 chars
accountCodestring | null-max 40 chars
legalNamestring | null-max 200 chars
tradingNamestring | null-max 200 chars
providerTypestring | null-One of carrier, aggregator, mno, mvno, sip_provider
registrationNumberstring | null-max 80 chars
taxIdstring | null-max 80 chars
vatIdstring | null-max 80 chars
addressstring | null-max 600 chars
countrystring | null-max 2 chars
accountManagerstring | null-max 160 chars
tagsstring[] | null-
servicesstring[] | null-One of termination, origination, did, sms
portalEmailstring (email) | null-max 255 chars
notesstring | null-max 4000 chars
currencystring | null-max 3 chars
statusstringAccepted on create only; later changes go through POST /{id}/statusOne of draft, pending_approval, testing, active, suspended, terminated
contractStartstring | null-max 10 chars
contractEndstring | null-max 10 chars
autoRenewboolean-
rateNoticeDaysnumber | string | null-
disputeDaysnumber | string | null-
billingModestring | null-One of prepaid, postpaid
creditLimitnumber | string | null-
paymentTermsDaysnumber | string | null-
invoiceCyclestring | null-One of weekly, biweekly, monthly
billingTimezonestring | null-max 64 chars

Response 200

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Delete a provider

DELETE/api/v1/switch/providers/{id}

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

Its trunks are NOT deleted: they are detached (ungrouped) with their routing intact.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
deletedrequireddata.deletedboolean-One of true
detachedTrunksrequireddata.detachedTrunksinteger-

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Change a provider lifecycle status

POST/api/v1/switch/providers/{id}/status

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

Stops or resumes traffic on every trunk of the provider. The response says whether traffic changed and how many active trunks were affected.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
statusrequiredstring-One of draft, pending_approval, testing, active, suspended, terminated
notestring | null-max 1000 chars

Response 200

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
namerequireddata.namestring-
accountCoderequireddata.accountCodestring | null-
legalNamerequireddata.legalNamestring | null-
tradingNamerequireddata.tradingNamestring | null-
providerTyperequireddata.providerTypestring | null-One of carrier, aggregator, mno, mvno, sip_provider
countryrequireddata.countrystring | null-
servicesrequireddata.servicesstring[] | null-
portalEmailrequireddata.portalEmailstring | null-
currencyrequireddata.currencystring-
statusrequireddata.statusstring-One of draft, pending_approval, testing, active, suspended, terminated
statusNoterequireddata.statusNotestring | null-
statusChangedAtrequireddata.statusChangedAtstring (date-time) | nullISO-8601 timestamp (UTC)
routablerequireddata.routablebooleanWhether this provider admits new calls at all, given its status
contractStartrequireddata.contractStartstring | nullYYYY-MM-DD
contractEndrequireddata.contractEndstring | null-
autoRenewrequireddata.autoRenewboolean-
rateNoticeDaysrequireddata.rateNoticeDaysinteger | null-
disputeDaysrequireddata.disputeDaysinteger | null-
billingModerequireddata.billingModestring-One of prepaid, postpaid
creditLimitrequireddata.creditLimitstring | nullDecimal string with 2 decimal places, e.g. "5000.00"
balancerequireddata.balancemoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
paymentTermsDaysrequireddata.paymentTermsDaysinteger | null-
invoiceCyclerequireddata.invoiceCyclestring | null-
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.updatedAtstring (date-time)ISO-8601 timestamp (UTC)
trafficChangerequireddata.trafficChangestring-One of none, resumed, stopped
affectedTrunksrequireddata.affectedTrunksinteger-

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

List a provider contacts

GET/api/v1/switch/providers/{id}/contacts

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

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject[]Same fields as SwitchProviderContact, 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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Add a provider contact

POST/api/v1/switch/providers/{id}/contacts

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

One contact per role (NOC, rates, billing, finance, fraud, account, emergency).

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
rolerequiredstring-One of noc, rates, billing, finance, fraud, account, emergency
namestring | null-max 160 chars
emailstring | null-max 255 chars
phonestring | null-max 40 chars
timezonestring | null-max 64 chars
notifyboolean-
notesstring | null-max 1000 chars

Response 201

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Update a provider contact

PATCH/api/v1/switch/providers/{id}/contacts/{contactId}

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

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-
contactIdrequiredpathstring-

Request body (application/json)

FieldTypeDescription
rolestring-One of noc, rates, billing, finance, fraud, account, emergency
namestring | null-max 160 chars
emailstring | null-max 255 chars
phonestring | null-max 40 chars
timezonestring | null-max 64 chars
notifyboolean-
notesstring | null-max 1000 chars

Response 200

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Delete a provider contact

DELETE/api/v1/switch/providers/{id}/contacts/{contactId}

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

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-
contactIdrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
deletedrequireddata.deletedboolean-One of true

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

List providers with their trunks

GET/api/v1/switch/supplier-accounts

Deprecated

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

Every provider on your switch, each with its trunks (secrets redacted) and endpoint counts, plus trunks not yet assigned to a provider. Deprecated alias of the same operation under /switch/providers.

Response 200

FieldTypeDescription
datarequiredobjectSame fields as SwitchProviderList, 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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 provider

POST/api/v1/switch/supplier-accounts

Deprecated

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

A provider is the carrier or company that owns one or more supplier trunks. Deprecated alias of the same operation under /switch/providers.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Request body (application/json)

FieldTypeDescription
namerequiredstring-max 160 chars
accountCodestring | null-max 40 chars
legalNamestring | null-max 200 chars
tradingNamestring | null-max 200 chars
providerTypestring | null-One of carrier, aggregator, mno, mvno, sip_provider
registrationNumberstring | null-max 80 chars
taxIdstring | null-max 80 chars
vatIdstring | null-max 80 chars
addressstring | null-max 600 chars
countrystring | null-max 2 chars
accountManagerstring | null-max 160 chars
tagsstring[] | null-
servicesstring[] | null-One of termination, origination, did, sms
portalEmailstring (email) | null-max 255 chars
notesstring | null-max 4000 chars
currencystring | null-max 3 chars
statusstringAccepted on create only; later changes go through POST /{id}/statusOne of draft, pending_approval, testing, active, suspended, terminated
contractStartstring | null-max 10 chars
contractEndstring | null-max 10 chars
autoRenewboolean-
rateNoticeDaysnumber | string | null-
disputeDaysnumber | string | null-
billingModestring | null-One of prepaid, postpaid
creditLimitnumber | string | null-
paymentTermsDaysnumber | string | null-
invoiceCyclestring | null-One of weekly, biweekly, monthly
billingTimezonestring | null-max 64 chars

Response 201

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 provider with its trunks, endpoints and contacts

GET/api/v1/switch/supplier-accounts/{id}

Deprecated

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

Deprecated alias of the same operation under /switch/providers.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobjectSame fields as SwitchProviderDetail, 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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 provider

PATCH/api/v1/switch/supplier-accounts/{id}

Deprecated

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

Partial update; status is changed through POST /{id}/status instead. Send X-If-Unchanged-Since: <updatedAt you loaded> to be refused with 409 STALE_WRITE if someone else saved in between. Deprecated alias of the same operation under /switch/providers.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
namestring-max 160 chars
accountCodestring | null-max 40 chars
legalNamestring | null-max 200 chars
tradingNamestring | null-max 200 chars
providerTypestring | null-One of carrier, aggregator, mno, mvno, sip_provider
registrationNumberstring | null-max 80 chars
taxIdstring | null-max 80 chars
vatIdstring | null-max 80 chars
addressstring | null-max 600 chars
countrystring | null-max 2 chars
accountManagerstring | null-max 160 chars
tagsstring[] | null-
servicesstring[] | null-One of termination, origination, did, sms
portalEmailstring (email) | null-max 255 chars
notesstring | null-max 4000 chars
currencystring | null-max 3 chars
statusstringAccepted on create only; later changes go through POST /{id}/statusOne of draft, pending_approval, testing, active, suspended, terminated
contractStartstring | null-max 10 chars
contractEndstring | null-max 10 chars
autoRenewboolean-
rateNoticeDaysnumber | string | null-
disputeDaysnumber | string | null-
billingModestring | null-One of prepaid, postpaid
creditLimitnumber | string | null-
paymentTermsDaysnumber | string | null-
invoiceCyclestring | null-One of weekly, biweekly, monthly
billingTimezonestring | null-max 64 chars

Response 200

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Delete a provider

DELETE/api/v1/switch/supplier-accounts/{id}

Deprecated

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

Its trunks are NOT deleted: they are detached (ungrouped) with their routing intact. Deprecated alias of the same operation under /switch/providers.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
deletedrequireddata.deletedboolean-One of true
detachedTrunksrequireddata.detachedTrunksinteger-

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Change a provider lifecycle status

POST/api/v1/switch/supplier-accounts/{id}/status

Deprecated

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

Stops or resumes traffic on every trunk of the provider. The response says whether traffic changed and how many active trunks were affected. Deprecated alias of the same operation under /switch/providers.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
statusrequiredstring-One of draft, pending_approval, testing, active, suspended, terminated
notestring | null-max 1000 chars

Response 200

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
namerequireddata.namestring-
accountCoderequireddata.accountCodestring | null-
legalNamerequireddata.legalNamestring | null-
tradingNamerequireddata.tradingNamestring | null-
providerTyperequireddata.providerTypestring | null-One of carrier, aggregator, mno, mvno, sip_provider
countryrequireddata.countrystring | null-
servicesrequireddata.servicesstring[] | null-
portalEmailrequireddata.portalEmailstring | null-
currencyrequireddata.currencystring-
statusrequireddata.statusstring-One of draft, pending_approval, testing, active, suspended, terminated
statusNoterequireddata.statusNotestring | null-
statusChangedAtrequireddata.statusChangedAtstring (date-time) | nullISO-8601 timestamp (UTC)
routablerequireddata.routablebooleanWhether this provider admits new calls at all, given its status
contractStartrequireddata.contractStartstring | nullYYYY-MM-DD
contractEndrequireddata.contractEndstring | null-
autoRenewrequireddata.autoRenewboolean-
rateNoticeDaysrequireddata.rateNoticeDaysinteger | null-
disputeDaysrequireddata.disputeDaysinteger | null-
billingModerequireddata.billingModestring-One of prepaid, postpaid
creditLimitrequireddata.creditLimitstring | nullDecimal string with 2 decimal places, e.g. "5000.00"
balancerequireddata.balancemoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
paymentTermsDaysrequireddata.paymentTermsDaysinteger | null-
invoiceCyclerequireddata.invoiceCyclestring | null-
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.updatedAtstring (date-time)ISO-8601 timestamp (UTC)
trafficChangerequireddata.trafficChangestring-One of none, resumed, stopped
affectedTrunksrequireddata.affectedTrunksinteger-

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

List a provider contacts

GET/api/v1/switch/supplier-accounts/{id}/contacts

Deprecated

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

Deprecated alias of the same operation under /switch/providers.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject[]Same fields as SwitchProviderContact, 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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Add a provider contact

POST/api/v1/switch/supplier-accounts/{id}/contacts

Deprecated

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

One contact per role (NOC, rates, billing, finance, fraud, account, emergency). Deprecated alias of the same operation under /switch/providers.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
rolerequiredstring-One of noc, rates, billing, finance, fraud, account, emergency
namestring | null-max 160 chars
emailstring | null-max 255 chars
phonestring | null-max 40 chars
timezonestring | null-max 64 chars
notifyboolean-
notesstring | null-max 1000 chars

Response 201

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Update a provider contact

PATCH/api/v1/switch/supplier-accounts/{id}/contacts/{contactId}

Deprecated

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

Deprecated alias of the same operation under /switch/providers.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-
contactIdrequiredpathstring-

Request body (application/json)

FieldTypeDescription
rolestring-One of noc, rates, billing, finance, fraud, account, emergency
namestring | null-max 160 chars
emailstring | null-max 255 chars
phonestring | null-max 40 chars
timezonestring | null-max 64 chars
notifyboolean-
notesstring | null-max 1000 chars

Response 200

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Delete a provider contact

DELETE/api/v1/switch/supplier-accounts/{id}/contacts/{contactId}

Deprecated

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

Deprecated alias of the same operation under /switch/providers.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-
contactIdrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
deletedrequireddata.deletedboolean-One of true

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Get call totals for a provider across its trunks

GET/api/v1/switch/providers/{id}/call-records

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

Calls, answer rate, minutes and cost over a window, overall and per trunk. cost and minutes are JSON numbers here (report figures, not ledger amounts).

Parameters

NameInTypeDescription
idrequiredpathstring-
fromquerystringISO start of the window
toquerystringISO end of the window
limitquerystring-
offsetquerystring-

Response 200

FieldTypeDescription
datarequiredobject-
windowrequireddata.windowobject-
fromrequireddata.window.fromstring-
torequireddata.window.tostring-
summaryrequireddata.summaryobject-
callsrequireddata.summary.callsnumber-
answeredrequireddata.summary.answerednumber-
asrrequireddata.summary.asrnumber | null-
minutesrequireddata.summary.minutesnumber-
costrequireddata.summary.costnumber-
acdrequireddata.summary.acdnumber | null-
avgPddMsrequireddata.summary.avgPddMsnumber | null-
byTrunkrequireddata.byTrunkobject[]-
trunkIdrequireddata.byTrunk[].trunkIdstring (uuid) | null-
labelrequireddata.byTrunk[].labelstring-
callsrequireddata.byTrunk[].callsnumber-
answeredrequireddata.byTrunk[].answerednumber-
asrrequireddata.byTrunk[].asrnumber | null-
minutesrequireddata.byTrunk[].minutesnumber-
costrequireddata.byTrunk[].costnumber-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 a provider payables and unbilled cost

GET/api/v1/switch/providers/{id}/invoices

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

The provider billing terms, its payable documents, and cost carried since the last one that has not been raised yet (a JSON number).

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
currencyrequireddata.currencystring-
billingModerequireddata.billingModestring-
creditLimitrequireddata.creditLimitstring | nullDecimal string with 2 decimal places, e.g. "5000.00"
paymentTermsDaysrequireddata.paymentTermsDaysinteger | null-
invoiceCyclerequireddata.invoiceCyclestring | null-
invoicesrequireddata.invoicesobject[]-
unbilledrequireddata.unbilledobject-
sincerequireddata.unbilled.sincestring | null-
callsrequireddata.unbilled.callsnumber-
minutesrequireddata.unbilled.minutesnumber-
costrequireddata.unbilled.costnumber-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 what is wrong with a provider right now

GET/api/v1/switch/providers/{id}/alerts

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

Derived on every read, never stored: unroutable status, trunks in fault or draining, expiring credentials, expired trunks.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
alertsrequireddata.alertsobject[]-
severityrequireddata.alerts[].severitystring-One of critical, warning, info
coderequireddata.alerts[].codestring-
messagerequireddata.alerts[].messagestring-
trunkIddata.alerts[].trunkIdstring (uuid)-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 the change history for a provider and its trunks

GET/api/v1/switch/providers/{id}/audit

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

Parameters

NameInTypeDescription
idrequiredpathstring-
limitquerystringMax entries (default 100)

Response 200

FieldTypeDescription
datarequiredobject-
entriesrequireddata.entriesobject[]-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 billing disputes with a provider

GET/api/v1/switch/providers/{id}/disputes

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

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
supplierIdrequireddata[].supplierIdstring (uuid)-
periodStartrequireddata[].periodStartstring (date-time) | nullISO-8601 timestamp (UTC)
periodEndrequireddata[].periodEndstring (date-time) | nullISO-8601 timestamp (UTC)
ourAmountrequireddata[].ourAmountstring | nullDecimal string with 2 decimal places, e.g. "5000.00"
theirAmountrequireddata[].theirAmountstring | nullDecimal string with 2 decimal places, e.g. "5000.00"
currencyrequireddata[].currencystring-
statusrequireddata[].statusstring-One of open, submitted, accepted, rejected, settled, withdrawn
reasonrequireddata[].reasonstring | null-
resolutionrequireddata[].resolutionstring | null-
invoiceRefrequireddata[].invoiceRefstring | null-
openedAtrequireddata[].openedAtstring (date-time)ISO-8601 timestamp (UTC)
respondByrequireddata[].respondBystring (date-time) | nullISO-8601 timestamp (UTC)
closedAtrequireddata[].closedAtstring (date-time) | nullISO-8601 timestamp (UTC)
daysLeftdata[].daysLeftinteger | nullDays left to respond (list only); negative = the window has passed
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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Open a billing dispute with a provider

POST/api/v1/switch/providers/{id}/disputes

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

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
periodStartstring | null-max 40 chars
periodEndstring | null-max 40 chars
ourAmountnumber | string | null-
theirAmountnumber | string | null-
currencystring | null-max 3 chars
reasonstring | null-max 4000 chars
resolutionstring | null-max 4000 chars
invoiceRefstring | null-max 120 chars
statusstring-One of open, submitted, accepted, rejected, settled, withdrawn

Response 201

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Update a billing dispute

PATCH/api/v1/switch/providers/{id}/disputes/{disputeId}

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

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-
disputeIdrequiredpathstring-

Request body (application/json)

FieldTypeDescription
periodStartstring | null-max 40 chars
periodEndstring | null-max 40 chars
ourAmountnumber | string | null-
theirAmountnumber | string | null-
currencystring | null-max 3 chars
reasonstring | null-max 4000 chars
resolutionstring | null-max 4000 chars
invoiceRefstring | null-max 120 chars
statusstring-One of open, submitted, accepted, rejected, settled, withdrawn

Response 200

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

List SIP endpoints of a supplier trunk

GET/api/v1/switch/suppliers/{id}/endpoints

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

Primary and backup addresses with derived health and flap reports. A trunk with an address but no endpoint rows has its address adopted as endpoint 1 on first read.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject[]Same fields as SwitchTrunkEndpoint, 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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Add a SIP endpoint to a supplier trunk

POST/api/v1/switch/suppliers/{id}/endpoints

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

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
rolestring-One of primary, backup
hostrequiredstring-max 255 chars
portnumber | string | null-
transportstring-One of udp, tcp, tls
prioritynumber | string-
weightPctnumber | string | null-
enabledboolean-
optionsIntervalSecondsnumber | string | null-
failureThresholdnumber | string-
recoveryThresholdnumber | string-
autoDisableboolean-

Response 201

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Update a SIP endpoint

PATCH/api/v1/switch/suppliers/{id}/endpoints/{endpointId}

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

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-
endpointIdrequiredpathstring-

Request body (application/json)

FieldTypeDescription
rolestring-One of primary, backup
hoststring-max 255 chars
portnumber | string | null-
transportstring-One of udp, tcp, tls
prioritynumber | string-
weightPctnumber | string | null-
enabledboolean-
optionsIntervalSecondsnumber | string | null-
failureThresholdnumber | string-
recoveryThresholdnumber | string-
autoDisableboolean-

Response 200

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Remove a SIP endpoint

DELETE/api/v1/switch/suppliers/{id}/endpoints/{endpointId}

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

The last endpoint of a trunk cannot be removed: add its replacement first.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-
endpointIdrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
deletedrequireddata.deletedboolean-One of true

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Render the SBC gateway configuration for a supplier trunk

GET/api/v1/switch/suppliers/{id}/sbc-profile

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

Read-only. Names which settings are profile-level (and so need a deploy) rather than applied per call. Each read is recorded in the audit log.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
trunkIdrequireddata.trunkIdstring (uuid)-
trunkLabelrequireddata.trunkLabelstring-
profileLevelrequireddata.profileLevelobject[]-
endpointIdrequireddata.profileLevel[].endpointIdstring (uuid)-
hostrequireddata.profileLevel[].hoststring-
settingsrequireddata.profileLevel[].settingsstring[]-
xmlrequireddata.xmlstringGateway configuration to place on the SBC
applyNoterequireddata.applyNotestring-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Render the SBC gateway configuration for a provider

GET/api/v1/switch/providers/{id}/sbc-profile

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

Read-only. One rendered profile per trunk; needsReload says whether any of it needs deploying. Each read is recorded in the audit log.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
supplierIdrequireddata.supplierIdstring (uuid)-
supplierNamerequireddata.supplierNamestring-
trunksrequireddata.trunksobject[]Same fields as SwitchSbcProfile, shown earlier on this page.
needsReloadrequireddata.needsReloadboolean-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 health events for a supplier trunk

GET/api/v1/switch/suppliers/{id}/health-events

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

Probe results, up/down transitions, auto-disables, restores and degradations. Probe rows are kept 7 days, state changes 90 days. Page with before = the previous nextBefore.

Parameters

NameInTypeDescription
idrequiredpathstring-
endpointIdquerystring (uuid)-
daysqueryinteger-
kindsquerystringComma-separated: probe, transition, auto_disable, restore, degraded
beforequerystringISO cursor from nextBefore
limitqueryinteger-

Response 200

FieldTypeDescription
datarequiredobject-
eventsrequireddata.eventsobject[]-
windowDaysrequireddata.windowDaysinteger-
retentionrequireddata.retentionobject-
probeDaysrequireddata.retention.probeDaysinteger-
eventDaysrequireddata.retention.eventDaysinteger-
nextBeforerequireddata.nextBeforestring | 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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 the flap report for a supplier trunk

GET/api/v1/switch/suppliers/{id}/flap-report

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

Endpoints that changed state repeatedly in the window. Observe-only: nothing is disabled because of it.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
windowHoursrequireddata.windowHoursnumber-
minTransitionsrequireddata.minTransitionsinteger-
endpointsrequireddata.endpointsobject[]-
endpointIdrequireddata.endpoints[].endpointIdstring (uuid) | null-
hostrequireddata.endpoints[].hoststring | null-
transitionsrequireddata.endpoints[].transitionsinteger-
firstAtrequireddata.endpoints[].firstAtstring (date-time)ISO-8601 timestamp (UTC)
lastAtrequireddata.endpoints[].lastAtstring (date-time)ISO-8601 timestamp (UTC)
flappingrequireddata.endpoints[].flappingboolean-
flappingrequireddata.flappingboolean-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Send a test call to a supplier trunk

POST/api/v1/switch/suppliers/{id}/test-call

Access
API key. Scoped keys need switch:manage.
Rate limit
6 requests per minute
Real traffic
Places a real test call or sends a real test SMS over the trunk.

A real INVITE from every media worker, on demand. Never touches health counters or state. Address details are withheld for a marketplace trunk. Audited.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
endpointIdstring (uuid) | null-

Response 200

FieldTypeDescription
datarequiredobject-
ranAtrequireddata.ranAtstring (date-time)ISO-8601 timestamp (UTC)
hostrequireddata.hoststring | null-
portrequireddata.portinteger | null-
techPrefixrequireddata.techPrefixstring | null-
verdictrequireddata.verdictstring-
latencyMsrequireddata.latencyMsinteger-
diagnosticsrequireddata.diagnosticsobject-
endpointHiddendata.endpointHiddenboolean-

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Move a supplier trunk to another provider

POST/api/v1/switch/suppliers/{id}/assign-account

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

Pass supplierId: null to ungroup the trunk.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
supplierIdrequiredstring (uuid) | null-

Response 200

FieldTypeDescription
datarequiredobjectA supplier (vendor) trunk. Carries every spec section-4 policy field accepted on create/update; secrets are replaced by *Set booleans.
idrequireddata.idstring (uuid)-
supplierIdrequireddata.supplierIdstring (uuid) | nullThe owning provider; null = ungrouped
labelrequireddata.labelstring-
sourcerequireddata.sourcestring"external" for a carrier you entered; "marketplace" for a trunk promoted from a marketplace purchase
statusrequireddata.statusstring-One of active, disabled, draft, testing, draining, fault
sipHostrequireddata.sipHoststring | nullNull on a marketplace trunk: the seller address is never disclosed
sipPortrequireddata.sipPortinteger | null-
transportrequireddata.transportstring | null-One of udp, tcp, tls
techPrefixrequireddata.techPrefixstring | null-
sipAuthUsernamerequireddata.sipAuthUsernamestring | null-
sipAuthPasswordSetrequireddata.sipAuthPasswordSetbooleanWhether a SIP password is stored. The value is only readable via GET /switch/suppliers/{id}/credentials
smppPasswordSetrequireddata.smppPasswordSetboolean-
mediaModerequireddata.mediaModestring-One of proxy, direct
defaultRatePerUnitrequireddata.defaultRatePerUnitmoney | nullCost per minute used when no deck row matches USD as a decimal string with exactly 6 places, e.g. "0.012500".
billingIncrementrequireddata.billingIncrementstring | null-
currencyrequireddata.currencystring | null-
capacityrequireddata.capacityinteger | nullMax concurrent channels
maxCpsrequireddata.maxCpsinteger | null-
settlementModerequireddata.settlementModestring-One of ap, prepaid
balancerequireddata.balancemoneyPrepaid credit remaining with this supplier (prepaid settlement) USD as a decimal string with exactly 6 places, e.g. "0.012500".
smsDeliveryMethodrequireddata.smsDeliveryMethodstring | null-One of http, smpp
reachablerequireddata.reachableboolean | null-
reachCheckedAtrequireddata.reachCheckedAtstring (date-time) | nullISO-8601 timestamp (UTC)
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.updatedAtstring (date-time)ISO-8601 timestamp (UTC)

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

List supplier trunks

GET/api/v1/switch/suppliers

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

Every vendor trunk on your switch, newest first. SIP and SMPP secrets are replaced by *Set booleans.

Response 200

FieldTypeDescription
datarequiredobject[]Same fields as SwitchSupplierTrunk, 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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 supplier trunk

POST/api/v1/switch/suppliers

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

A trunk needs at least one reachable endpoint: a SIP host, an HTTPS SMS delivery URL, or an SMPP host.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Request body (application/json)

FieldTypeDescription
labelrequiredstring-max 160 chars
supplierIdstring (uuid) | null-
sipHoststring | null-max 255 chars
sipPortinteger | null-1 to 65535
transportstring | null-One of udp, tcp, tls
techPrefixstring | null-max 24 chars
sipAuthUsernamestring | null-max 128 chars
sipAuthPasswordstring | null-max 128 chars
supportedCodecsstring[] | null-
defaultRatePerUnitnumber | null-min 0
mediaModestring-One of proxy, direct
billingIncrementstring | null-max 10 chars
currencystring | null-max 3 chars
capacityinteger | null-min 0
maxCpsinteger | null-min 0
statusstring-One of active, disabled, draft, testing, draining, fault
settlementModestring-One of ap, prepaid
balancenumber | null-min 0
portalEmailstring (email) | null-max 255 chars
smsDeliveryUrlstring (uri) | null-max 500 chars
smsDeliveryMethodstring | null-One of http, smpp
smppHoststring | null-max 255 chars
smppPortinteger | null-1 to 65535
smppSystemIdstring | null-
smppPasswordstring | null-max 64 chars
smppBindTypestring | null-One of transceiver, transmitter
smppSystemTypestring | null-max 13 chars
smppTpsinteger | null-1 to 1000
codestring | null-max 40 chars
descriptionstring | null-max 2000 chars
productstring | null-max 32 chars
directionstring-One of termination, origination, bidirectional
testModeboolean-
activationDatestring | null-max 10 chars
expirationDatestring | null-max 10 chars
tagsstring[] | null-
notesstring | null-max 4000 chars
credentialExpiresAtstring | null-max 40 chars
credentialRotatedAtstring | null-max 40 chars
allowedSourceNetworksstring[] | null-
requestRateLimitinteger | null-0 to 100000
sipRegisterboolean-
sipRealmstring | null-max 255 chars
incomingTechPrefixstring | null-max 24 chars
techPrefixModestring-One of add, remove, replace
techPrefixSeparatorstring | null-max 4 chars
cliRewriteany | null-
dnisRewriteany | null-
cliPolicystring-One of passthrough, replace, remove, pool
cliPoolIdstring (uuid) | null-
anonymousPolicystring-One of passthrough, reject, substitute
e164Normaliseboolean-
defaultCountryCodestring | null-max 6 chars
minDnisLengthinteger | null-0 to 32
maxDnisLengthinteger | null-0 to 32
paiPolicystring-One of omit, passthrough, generate
rpidPolicystring-One of omit, passthrough, generate
diversionPolicystring-One of omit, passthrough, generate
historyInfoPolicystring-One of omit, passthrough, generate
lrnPolicystring-One of none, passthrough, strip
packetizationMsinteger | null-10 to 120
codecModestring-One of transparent, transcode
forcedCodecstring | null-max 24 chars
srtpModestring-One of disabled, optional, required
dtmfModestring-One of rfc2833, info, inband, auto
t38Modestring-One of disabled, passthrough, relay
comfortNoiseboolean-
silenceSuppressionboolean-
symmetricRtpboolean-
inviteTimeoutSecondsinteger | null-1 to 600
pddTimeoutSecondsinteger | null-1 to 600
ringTimeoutSecondsinteger | null-1 to 600
sessionExpiresSecondsinteger | null-90 to 86400
minSeSecondsinteger | null-90 to 86400
prackModestring-One of disabled, supported, required
allowReinviteboolean-
allowUpdateboolean-
allowReferboolean-
earlyMediaPolicystring-One of passthrough, generate_ringback, suppress
recordRouteboolean-
customHeadersobject | null-
q850Mapobject | null-
cpsBurstinteger | null-0 to 10000
queueLimitinteger | null-0 to 100000
maxChannelsPerDestinationinteger | null-0 to 100000
maxCpsPerDestinationinteger | null-0 to 10000
minCallSecondsinteger | null-0 to 86400
maxCallSecondsinteger | null-0 to 86400
dailyMinutesCapinteger | null-min 0
dailySpendCapnumber | string | null-
monthlySpendCapnumber | string | null-
rampupChannelsinteger | null-0 to 100000
rampupDaysinteger | null-0 to 365
allowedPrefixesstring[] | null-
blockedPrefixesstring[] | null-
allowedCountriesstring[] | null-
blockedCountriesstring[] | null-
allowMobileboolean-
allowFixedboolean-
allowSatelliteboolean-
allowPremiumboolean-
allowTollfreeboolean-
allowEmergencyboolean-
jurisdictionPolicystring-One of any, interstate, intrastate, local
scheduleobject[] | null-
daysrequiredschedule[].daysinteger[]-
fromrequiredschedule[].fromstring-max 5 chars
torequiredschedule[].tostring-max 5 chars
tzrequiredschedule[].tzstring-max 64 chars
maintenanceWindowsobject[] | null-
fromrequiredmaintenanceWindows[].fromstring-max 40 chars
torequiredmaintenanceWindows[].tostring-max 40 chars
notemaintenanceWindows[].notestring-max 200 chars
routingEnabledboolean-
lcrEligibleboolean-
qualityEligibleboolean-
popRegionstring | null-max 40 chars
allowedCustomerGroupsstring[] | null-
allowedProductsstring[] | null-
minMarginPctnumber | string | null-
minMarginAbsnumber | string | null-
maxBuyRatenumber | string | null-
overflowTrunkIdstring (uuid) | null-
retryableSipCodesinteger[] | null-
terminalSipCodesinteger[] | null-
retryPolicystring-One of same_endpoint, next_endpoint, next_trunk
maxAttemptsPerCallinteger | null-1 to 10
qosThresholdsobject | null-
asrMinqosThresholds.asrMinnumber-0 to 100
acdMinqosThresholds.acdMinnumber-0 to 86400
nerMinqosThresholds.nerMinnumber-0 to 100
pddMaxMsqosThresholds.pddMaxMsinteger-0 to 600000
mosMinqosThresholds.mosMinnumber-1 to 5
shortCallMaxPctqosThresholds.shortCallMaxPctnumber-0 to 100
minCallsqosThresholds.minCallsinteger-1 to 1000000
windowMinutesqosThresholds.windowMinutesinteger-5 to 10080
actionqosThresholds.actionstring-One of alert, demote, reduce_cps, block_destination, disable_trunk
modeqosThresholds.modestring-One of observe, enforce
fraudControlsobject | null-
shortCallSecondsfraudControls.shortCallSecondsinteger-1 to 3600
longCallSecondsfraudControls.longCallSecondsinteger-1 to 86400
duplicateDetectfraudControls.duplicateDetectboolean-
spikeMultiplefraudControls.spikeMultiplenumber-1.1 to 1000
spendVelocityPerHourfraudControls.spendVelocityPerHournumber-0 to 1000000
highCostRatefraudControls.highCostRatenumber-0 to 10000
actionfraudControls.actionstring-One of alert, demote, reduce_cps, block_destination, disable_trunk
modefraudControls.modestring-One of observe, enforce

Response 201

FieldTypeDescription
datarequiredobjectA supplier (vendor) trunk. Carries every spec section-4 policy field accepted on create/update; secrets are replaced by *Set booleans.Same fields as SwitchSupplierTrunk, shown earlier on this page.

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 live metrics for active supplier trunks

GET/api/v1/switch/suppliers/live

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

Concurrent channels, peak CPS, reachability and the last hour of answer rate and post-dial delay per active trunk. Meant to be polled.

Response 200

FieldTypeDescription
datarequiredobject-
trunksrequireddata.trunksobject[]-
idrequireddata.trunks[].idstring (uuid)-
labelrequireddata.trunks[].labelstring-
capacityrequireddata.trunks[].capacityinteger | null-
maxCpsrequireddata.trunks[].maxCpsinteger | null-
reachablerequireddata.trunks[].reachableboolean | null-
healthrequireddata.trunks[].healthobjectDerived health state (what routing believes), with its counters and thresholds
asrrequireddata.trunks[].asrnumber | nullLast-hour answer rate %, null when idle
asrSessionsrequireddata.trunks[].asrSessionsinteger-
pddP95Msrequireddata.trunks[].pddP95Msinteger | null-
lastSipCoderequireddata.trunks[].lastSipCodeinteger | null-
lastCauserequireddata.trunks[].lastCausestring | null-
liveChannelsrequireddata.trunks[].liveChannelsinteger-
cpsrequireddata.trunks[].cpsinteger-
capacityPctrequireddata.trunks[].capacityPctinteger | null-
flappingrequireddata.trunks[].flappingboolean-
totalChannelsrequireddata.totalChannelsinteger-
peakCpsrequireddata.peakCpsinteger-
cpsAttemptsrequireddata.cpsAttemptsinteger-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Show where a supplier trunk sits in routing

GET/api/v1/switch/suppliers/{id}/routing

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

The route groups that reference it and at what priority, and any customer trunk wired straight to it. unrouted is true when no traffic can reach it.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
groupsrequireddata.groupsobject[]-
directrequireddata.directobject[]-
unroutedrequireddata.unroutedboolean-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Promote a marketplace purchase to a supplier trunk

POST/api/v1/switch/suppliers/promote

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

Turns a route you bought on the marketplace into a trunk your switch can route to. Idempotent per route: promoting again returns the existing trunk. The seller address stays hidden.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Request body (application/json)

FieldTypeDescription
routeIdrequiredstring (uuid)-

Response 201

FieldTypeDescription
datarequiredobjectA supplier (vendor) trunk. Carries every spec section-4 policy field accepted on create/update; secrets are replaced by *Set booleans.Same fields as SwitchSupplierTrunk, shown earlier on this page.

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Reveal a supplier trunk SIP credentials

GET/api/v1/switch/suppliers/{id}/credentials

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

The one audited way to read a stored SIP password back. Refused (403) for a trunk promoted from the marketplace, whose login belongs to the seller.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
sipAuthUsernamerequireddata.sipAuthUsernamestring | null-
sipAuthPasswordrequireddata.sipAuthPasswordstring | 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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 supplier trunk overview and today figures

GET/api/v1/switch/suppliers/{id}/overview

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

Trunk settings plus KPIs: today cost, minutes and calls, last-hour answer rate, ACD, PDD and MOS, live channels, CPS and outstanding payables. KPI money is a JSON number.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
supplierrequireddata.supplierobject-
kpisrequireddata.kpisobject-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 quality by destination for a supplier trunk

GET/api/v1/switch/suppliers/{id}/quality

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

Parameters

NameInTypeDescription
idrequiredpathstring-
windowqueryintegerWindow in hours (default 24)

Response 200

FieldTypeDescription
datarequiredobject-
windowHoursrequireddata.windowHoursnumber-
windowrequireddata.windowobject-
kpisrequireddata.kpisobject-
destinationsrequireddata.destinationsobject[]-
thresholdsrequireddata.thresholdsobject-
excludedMetricsrequireddata.excludedMetricsany[]-
minJudgeableSessionsrequireddata.minJudgeableSessionsnumber-
freshnessrequireddata.freshnessobject-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 quality and fraud protection events for a supplier trunk

GET/api/v1/switch/suppliers/{id}/protection-events

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

What the protection sweep saw on this trunk and what it did (enforced) or would have done (observe mode).

Parameters

NameInTypeDescription
idrequiredpathstring-
limitqueryinteger-

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
vendorTrunkIdrequireddata[].vendorTrunkIdstring (uuid)-
moderequireddata[].modestring-
actionrequireddata[].actionstring-
enforcedrequireddata[].enforcedboolean-
reasonrequireddata[].reasonstring-
breachesrequireddata[].breachesstring[] | null-
measureddata[].measuredany-
windowMinutesrequireddata[].windowMinutesinteger-
callsrequireddata[].callsinteger-
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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 supplier trunk

GET/api/v1/switch/suppliers/{id}

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

Includes its inbound IP ACLs, a loopback warning when its address is also one of your customers, and the derived health state.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobjectA supplier (vendor) trunk. Carries every spec section-4 policy field accepted on create/update; secrets are replaced by *Set booleans.
idrequireddata.idstring (uuid)-
supplierIdrequireddata.supplierIdstring (uuid) | nullThe owning provider; null = ungrouped
labelrequireddata.labelstring-
sourcerequireddata.sourcestring"external" for a carrier you entered; "marketplace" for a trunk promoted from a marketplace purchase
statusrequireddata.statusstring-One of active, disabled, draft, testing, draining, fault
sipHostrequireddata.sipHoststring | nullNull on a marketplace trunk: the seller address is never disclosed
sipPortrequireddata.sipPortinteger | null-
transportrequireddata.transportstring | null-One of udp, tcp, tls
techPrefixrequireddata.techPrefixstring | null-
sipAuthUsernamerequireddata.sipAuthUsernamestring | null-
sipAuthPasswordSetrequireddata.sipAuthPasswordSetbooleanWhether a SIP password is stored. The value is only readable via GET /switch/suppliers/{id}/credentials
smppPasswordSetrequireddata.smppPasswordSetboolean-
mediaModerequireddata.mediaModestring-One of proxy, direct
defaultRatePerUnitrequireddata.defaultRatePerUnitmoney | nullCost per minute used when no deck row matches USD as a decimal string with exactly 6 places, e.g. "0.012500".
billingIncrementrequireddata.billingIncrementstring | null-
currencyrequireddata.currencystring | null-
capacityrequireddata.capacityinteger | nullMax concurrent channels
maxCpsrequireddata.maxCpsinteger | null-
settlementModerequireddata.settlementModestring-One of ap, prepaid
balancerequireddata.balancemoneyPrepaid credit remaining with this supplier (prepaid settlement) USD as a decimal string with exactly 6 places, e.g. "0.012500".
smsDeliveryMethodrequireddata.smsDeliveryMethodstring | null-One of http, smpp
reachablerequireddata.reachableboolean | null-
reachCheckedAtrequireddata.reachCheckedAtstring (date-time) | nullISO-8601 timestamp (UTC)
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.updatedAtstring (date-time)ISO-8601 timestamp (UTC)
ipAclsrequireddata.ipAclsobject[]-
idrequireddata.ipAcls[].idstring (uuid)-
entityTyperequireddata.ipAcls[].entityTypestring-One of customer, trunk
entityIdrequireddata.ipAcls[].entityIdstring (uuid)-
cidrrequireddata.ipAcls[].cidrstring-
descriptionrequireddata.ipAcls[].descriptionstring | null-
createdAtrequireddata.ipAcls[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
hairpinrequireddata.hairpinobject | nullWarning when this address is also one of your own customers (loopback)
healthrequireddata.healthobjectDerived health state (what routing believes), with its counters and thresholds

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 supplier trunk

PATCH/api/v1/switch/suppliers/{id}

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

Partial update. When trunk change approval is on, the change is queued for review instead and the response carries pendingChange. Send X-If-Unchanged-Since: <updatedAt you loaded> to be refused with 409 STALE_WRITE if someone else saved in between.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
labelstring-max 160 chars
supplierIdstring (uuid) | null-
sipHoststring | null-max 255 chars
sipPortinteger | null-1 to 65535
transportstring | null-One of udp, tcp, tls
techPrefixstring | null-max 24 chars
sipAuthUsernamestring | null-max 128 chars
sipAuthPasswordstring | null-max 128 chars
supportedCodecsstring[] | null-
defaultRatePerUnitnumber | null-min 0
mediaModestring-One of proxy, direct
billingIncrementstring | null-max 10 chars
currencystring | null-max 3 chars
capacityinteger | null-min 0
maxCpsinteger | null-min 0
statusstring-One of active, disabled, draft, testing, draining, fault
settlementModestring-One of ap, prepaid
balancenumber | null-min 0
portalEmailstring (email) | null-max 255 chars
smsDeliveryUrlstring (uri) | null-max 500 chars
smsDeliveryMethodstring | null-One of http, smpp
smppHoststring | null-max 255 chars
smppPortinteger | null-1 to 65535
smppSystemIdstring | null-
smppPasswordstring | null-max 64 chars
smppBindTypestring | null-One of transceiver, transmitter
smppSystemTypestring | null-max 13 chars
smppTpsinteger | null-1 to 1000
codestring | null-max 40 chars
descriptionstring | null-max 2000 chars
productstring | null-max 32 chars
directionstring-One of termination, origination, bidirectional
testModeboolean-
activationDatestring | null-max 10 chars
expirationDatestring | null-max 10 chars
tagsstring[] | null-
notesstring | null-max 4000 chars
credentialExpiresAtstring | null-max 40 chars
credentialRotatedAtstring | null-max 40 chars
allowedSourceNetworksstring[] | null-
requestRateLimitinteger | null-0 to 100000
sipRegisterboolean-
sipRealmstring | null-max 255 chars
incomingTechPrefixstring | null-max 24 chars
techPrefixModestring-One of add, remove, replace
techPrefixSeparatorstring | null-max 4 chars
cliRewriteany | null-
dnisRewriteany | null-
cliPolicystring-One of passthrough, replace, remove, pool
cliPoolIdstring (uuid) | null-
anonymousPolicystring-One of passthrough, reject, substitute
e164Normaliseboolean-
defaultCountryCodestring | null-max 6 chars
minDnisLengthinteger | null-0 to 32
maxDnisLengthinteger | null-0 to 32
paiPolicystring-One of omit, passthrough, generate
rpidPolicystring-One of omit, passthrough, generate
diversionPolicystring-One of omit, passthrough, generate
historyInfoPolicystring-One of omit, passthrough, generate
lrnPolicystring-One of none, passthrough, strip
packetizationMsinteger | null-10 to 120
codecModestring-One of transparent, transcode
forcedCodecstring | null-max 24 chars
srtpModestring-One of disabled, optional, required
dtmfModestring-One of rfc2833, info, inband, auto
t38Modestring-One of disabled, passthrough, relay
comfortNoiseboolean-
silenceSuppressionboolean-
symmetricRtpboolean-
inviteTimeoutSecondsinteger | null-1 to 600
pddTimeoutSecondsinteger | null-1 to 600
ringTimeoutSecondsinteger | null-1 to 600
sessionExpiresSecondsinteger | null-90 to 86400
minSeSecondsinteger | null-90 to 86400
prackModestring-One of disabled, supported, required
allowReinviteboolean-
allowUpdateboolean-
allowReferboolean-
earlyMediaPolicystring-One of passthrough, generate_ringback, suppress
recordRouteboolean-
customHeadersobject | null-
q850Mapobject | null-
cpsBurstinteger | null-0 to 10000
queueLimitinteger | null-0 to 100000
maxChannelsPerDestinationinteger | null-0 to 100000
maxCpsPerDestinationinteger | null-0 to 10000
minCallSecondsinteger | null-0 to 86400
maxCallSecondsinteger | null-0 to 86400
dailyMinutesCapinteger | null-min 0
dailySpendCapnumber | string | null-
monthlySpendCapnumber | string | null-
rampupChannelsinteger | null-0 to 100000
rampupDaysinteger | null-0 to 365
allowedPrefixesstring[] | null-
blockedPrefixesstring[] | null-
allowedCountriesstring[] | null-
blockedCountriesstring[] | null-
allowMobileboolean-
allowFixedboolean-
allowSatelliteboolean-
allowPremiumboolean-
allowTollfreeboolean-
allowEmergencyboolean-
jurisdictionPolicystring-One of any, interstate, intrastate, local
scheduleobject[] | null-
daysrequiredschedule[].daysinteger[]-
fromrequiredschedule[].fromstring-max 5 chars
torequiredschedule[].tostring-max 5 chars
tzrequiredschedule[].tzstring-max 64 chars
maintenanceWindowsobject[] | null-
fromrequiredmaintenanceWindows[].fromstring-max 40 chars
torequiredmaintenanceWindows[].tostring-max 40 chars
notemaintenanceWindows[].notestring-max 200 chars
routingEnabledboolean-
lcrEligibleboolean-
qualityEligibleboolean-
popRegionstring | null-max 40 chars
allowedCustomerGroupsstring[] | null-
allowedProductsstring[] | null-
minMarginPctnumber | string | null-
minMarginAbsnumber | string | null-
maxBuyRatenumber | string | null-
overflowTrunkIdstring (uuid) | null-
retryableSipCodesinteger[] | null-
terminalSipCodesinteger[] | null-
retryPolicystring-One of same_endpoint, next_endpoint, next_trunk
maxAttemptsPerCallinteger | null-1 to 10
qosThresholdsobject | null-
asrMinqosThresholds.asrMinnumber-0 to 100
acdMinqosThresholds.acdMinnumber-0 to 86400
nerMinqosThresholds.nerMinnumber-0 to 100
pddMaxMsqosThresholds.pddMaxMsinteger-0 to 600000
mosMinqosThresholds.mosMinnumber-1 to 5
shortCallMaxPctqosThresholds.shortCallMaxPctnumber-0 to 100
minCallsqosThresholds.minCallsinteger-1 to 1000000
windowMinutesqosThresholds.windowMinutesinteger-5 to 10080
actionqosThresholds.actionstring-One of alert, demote, reduce_cps, block_destination, disable_trunk
modeqosThresholds.modestring-One of observe, enforce
fraudControlsobject | null-
shortCallSecondsfraudControls.shortCallSecondsinteger-1 to 3600
longCallSecondsfraudControls.longCallSecondsinteger-1 to 86400
duplicateDetectfraudControls.duplicateDetectboolean-
spikeMultiplefraudControls.spikeMultiplenumber-1.1 to 1000
spendVelocityPerHourfraudControls.spendVelocityPerHournumber-0 to 1000000
highCostRatefraudControls.highCostRatenumber-0 to 10000
actionfraudControls.actionstring-One of alert, demote, reduce_cps, block_destination, disable_trunk
modefraudControls.modestring-One of observe, enforce

Response 200

FieldTypeDescription
datarequiredobjectA supplier (vendor) trunk. Carries every spec section-4 policy field accepted on create/update; secrets are replaced by *Set booleans.
idrequireddata.idstring (uuid)-
supplierIdrequireddata.supplierIdstring (uuid) | nullThe owning provider; null = ungrouped
labelrequireddata.labelstring-
sourcerequireddata.sourcestring"external" for a carrier you entered; "marketplace" for a trunk promoted from a marketplace purchase
statusrequireddata.statusstring-One of active, disabled, draft, testing, draining, fault
sipHostrequireddata.sipHoststring | nullNull on a marketplace trunk: the seller address is never disclosed
sipPortrequireddata.sipPortinteger | null-
transportrequireddata.transportstring | null-One of udp, tcp, tls
techPrefixrequireddata.techPrefixstring | null-
sipAuthUsernamerequireddata.sipAuthUsernamestring | null-
sipAuthPasswordSetrequireddata.sipAuthPasswordSetbooleanWhether a SIP password is stored. The value is only readable via GET /switch/suppliers/{id}/credentials
smppPasswordSetrequireddata.smppPasswordSetboolean-
mediaModerequireddata.mediaModestring-One of proxy, direct
defaultRatePerUnitrequireddata.defaultRatePerUnitmoney | nullCost per minute used when no deck row matches USD as a decimal string with exactly 6 places, e.g. "0.012500".
billingIncrementrequireddata.billingIncrementstring | null-
currencyrequireddata.currencystring | null-
capacityrequireddata.capacityinteger | nullMax concurrent channels
maxCpsrequireddata.maxCpsinteger | null-
settlementModerequireddata.settlementModestring-One of ap, prepaid
balancerequireddata.balancemoneyPrepaid credit remaining with this supplier (prepaid settlement) USD as a decimal string with exactly 6 places, e.g. "0.012500".
smsDeliveryMethodrequireddata.smsDeliveryMethodstring | null-One of http, smpp
reachablerequireddata.reachableboolean | null-
reachCheckedAtrequireddata.reachCheckedAtstring (date-time) | nullISO-8601 timestamp (UTC)
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.updatedAtstring (date-time)ISO-8601 timestamp (UTC)
pendingChangedata.pendingChangeobject-
idrequireddata.pendingChange.idstring (uuid)-
fieldsrequireddata.pendingChange.fieldsstring[]-
statusrequireddata.pendingChange.statusstring-

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Delete a supplier trunk

DELETE/api/v1/switch/suppliers/{id}

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

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
deletedrequireddata.deletedboolean-One of true

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Get the production readiness checklist for a supplier trunk

GET/api/v1/switch/suppliers/{id}/readiness

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

A pure read: it reports and never blocks. Bundle carriage trunks come back exempt with no checks.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
trunkIdrequireddata.trunkIdstring (uuid)-
exemptrequireddata.exemptboolean-
exemptReasonrequireddata.exemptReasonstring | null-
staterequireddata.statestring-One of ready, not_ready, exempt
checksrequireddata.checksobject[]-
idrequireddata.checks[].idstring-
specrequireddata.checks[].specstring-
titlerequireddata.checks[].titlestring-
statusrequireddata.checks[].statusstringpass, warn or fail
evidencerequireddata.checks[].evidencestring-
fixrequireddata.checks[].fixstring-One of supplier, contacts, endpoints, configuration, cost_deck, diagnostics, settings, routing
failingrequireddata.failinginteger-
warningrequireddata.warninginteger-
grandfatheredrequireddata.grandfatheredboolean-
blockingEnabledrequireddata.blockingEnabledboolean-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 configuration versions of a supplier trunk

GET/api/v1/switch/suppliers/{id}/config-history

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

Parameters

NameInTypeDescription
idrequiredpathstring-
limitqueryinteger-

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
versionrequireddata[].versioninteger-
sourcerequireddata[].sourcestringWhich door the change came through, e.g. update, approval, api
changedFieldsrequireddata[].changedFieldsstring[]-
diffrequireddata[].diffobject | null-
noterequireddata[].notestring | null-
checksumrequireddata[].checksumstring | null-
changeRequestIdrequireddata[].changeRequestIdstring (uuid) | null-
actorUserIdrequireddata[].actorUserIdstring (uuid) | null-
actorEmaildata[].actorEmailstring | null-
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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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 one configuration version of a supplier trunk

GET/api/v1/switch/suppliers/{id}/config-history/{versionId}

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

The full snapshot as of that version, plus the previous version snapshot for comparison.

Parameters

NameInTypeDescription
idrequiredpathstring-
versionIdrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
versionrequireddata.versioninteger-
sourcerequireddata.sourcestringWhich door the change came through, e.g. update, approval, api
changedFieldsrequireddata.changedFieldsstring[]-
diffrequireddata.diffobject | null-
noterequireddata.notestring | null-
checksumrequireddata.checksumstring | null-
changeRequestIdrequireddata.changeRequestIdstring (uuid) | null-
actorUserIdrequireddata.actorUserIdstring (uuid) | null-
actorEmaildata.actorEmailstring | null-
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
snapshotrequireddata.snapshotobject-
previousrequireddata.previousobject | null-
idrequireddata.previous.idstring (uuid)-
versionrequireddata.previous.versioninteger-
snapshotrequireddata.previous.snapshotobject-
createdAtrequireddata.previous.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Test a supplier trunk SMS delivery

POST/api/v1/switch/suppliers/{id}/test-sms

Access
API key. Scoped keys need switch:manage.
Rate limit
20 requests per minute
Real traffic
Places a real test call or sends a real test SMS over the trunk.

SMPP performs a real bind with the stored credentials and sends nothing; HTTP can only be checked for a well-formed https URL.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
passrequireddata.passboolean-
viarequireddata.viastring-One of http, smpp
checksrequireddata.checksobject[]-
labelrequireddata.checks[].labelstring-
valuerequireddata.checks[].valuestring-
okrequireddata.checks[].okboolean-
messagerequireddata.messagestring-

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Test unsaved SMS delivery details

POST/api/v1/switch/suppliers/test-sms

Access
API key. Scoped keys need switch:manage.
Rate limit
20 requests per minute
Real traffic
Places a real test call or sends a real test SMS over the trunk.

For the create form. SMPP performs a real bind and sends nothing; HTTP can only be checked for a well-formed https URL. The password is used for this one handshake and never stored.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Request body (application/json)

FieldTypeDescription
smsDeliveryMethodstring | null-One of http, smpp
smsDeliveryUrlstring | null-max 500 chars
smppHoststring | null-max 255 chars
smppPortinteger | null-1 to 65535
smppSystemIdstring | nullShort account code the supplier issued (max 16 chars). An email address is rejected.max 16 chars
smppPasswordstring | null-max 64 chars
smppBindTypestring | null-One of transceiver, transmitter
smppSystemTypestring | null-max 13 chars
smppTpsinteger | null-1 to 1000

Response 200

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Email a supplier portal sign-in link

POST/api/v1/switch/suppliers/{id}/portal-invite

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

Sends a magic link to the trunk portalEmail. When no portal email is set it answers 400 VALIDATION_ERROR.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
sentrequireddata.sentboolean-One of true
torequireddata.tostring-

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

List the cost deck in force on a supplier trunk

GET/api/v1/switch/suppliers/{id}/rates

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

Active rows only; scheduled and archived rows have their own endpoints. Search matches a prefix start.

Parameters

NameInTypeDescription
idrequiredpathstring-
searchquerystringDigits; matches prefixes starting with them
limitquerystring1-1000, default 100
offsetquerystring-

Response 200

FieldTypeDescription
datarequiredobject-
rowsrequireddata.rowsobject[]-
idrequireddata.rows[].idstring (uuid)-
vendorTrunkIdrequireddata.rows[].vendorTrunkIdstring (uuid)-
prefixrequireddata.rows[].prefixstring-
originPrefixrequireddata.rows[].originPrefixstringCaller-origin prefix; "" = any origin
ratePerUnitrequireddata.rows[].ratePerUnitmoneyCost per minute USD as a decimal string with exactly 6 places, e.g. "0.012500".
destinationNamerequireddata.rows[].destinationNamestring | null-
billingIncrementrequireddata.rows[].billingIncrementstring | nulle.g. "6/6"; null inherits the trunk default
statusrequireddata.rows[].statusstring-
effectiveFromrequireddata.rows[].effectiveFromstring (date-time) | nullISO-8601 timestamp (UTC)
totalrequireddata.totalinteger-
limitrequireddata.limitinteger-
offsetrequireddata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Set the cost for one prefix on a supplier trunk

POST/api/v1/switch/suppliers/{id}/rates

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

Creates or replaces the active rate for the prefix (and origin), effective now.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
prefixrequiredstring-max 24 chars
raterequirednumberCost per minute, USDmin 0
originstring-max 24 chars
billingIncrementstring-max 10 chars

Response 201

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Set costs for many prefixes on a supplier trunk

POST/api/v1/switch/suppliers/{id}/rates/bulk

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

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
rowsrequiredobject[]-
prefixrequiredrows[].prefixstring-max 24 chars
raterequiredrows[].ratenumberCost per minute, USDmin 0
originrows[].originstring-max 24 chars
billingIncrementrows[].billingIncrementstring-max 10 chars

Response 200

FieldTypeDescription
datarequiredobject-
appliedrequireddata.appliedinteger-

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Delete one cost row from a supplier trunk

DELETE/api/v1/switch/suppliers/{id}/rates/{rateId}

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

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-
rateIdrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
deletedrequireddata.deletedboolean-One of true

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Clear the cost deck of a supplier trunk

POST/api/v1/switch/suppliers/{id}/rates/clear

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

The deck is archived, not destroyed: restore it with POST /{id}/rates/restore.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
deletedrequireddata.deletedinteger-
archivedrequireddata.archivedinteger-
recoverablerequireddata.recoverableboolean-
revisionIdrequireddata.revisionIdstring (uuid) | null-

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

List archived cost decks of a supplier trunk

GET/api/v1/switch/suppliers/{id}/rates/archived

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

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject[]-
revisionIdrequireddata[].revisionIdstring (uuid) | null-
archivedAtrequireddata[].archivedAtstring (date-time)ISO-8601 timestamp (UTC)
rowsrequireddata[].rowsinteger-
labelrequireddata[].labelstring-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Restore an archived cost deck

POST/api/v1/switch/suppliers/{id}/rates/restore

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

Restores the newest archive unless revisionId names one. Each row returns to the status it was archived from.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
revisionIdstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
restoredrequireddata.restoredinteger-
skippedrequireddata.skippedinteger-
revisionIdrequireddata.revisionIdstring (uuid) | null-

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

List scheduled cost changes on a supplier trunk

GET/api/v1/switch/suppliers/{id}/rates/scheduled

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

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject[]Same fields as SwitchTrunkRate, 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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.

Schedule a future cost change for one prefix

POST/api/v1/switch/suppliers/{id}/rates/schedule

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

A date in the past or now applies the rate immediately instead.

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
prefixrequiredstring-max 24 chars
raterequirednumberCost per minute, USDmin 0
originstring-max 24 chars
billingIncrementstring-max 10 chars
effectiveFromrequiredstring (date-time)-

Response 201

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

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Cancel a scheduled cost change

DELETE/api/v1/switch/suppliers/{id}/rates/scheduled/{rateId}

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

Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.

Parameters

NameInTypeDescription
idrequiredpathstring-
rateIdrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
cancelledrequireddata.cancelledboolean-One of true

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.
  • AlsoSTALE_WRITE

Review queued cost changes before they take effect

GET/api/v1/switch/suppliers/{id}/rates/pending-review

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

Every queued change with the price billed today, the price that takes over and when, and the effect on the last 30 days of traffic. Rates are 6-decimal strings; monthlyDelta and netMonthlyDelta are JSON numbers. At most 500 rows.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
rowsrequireddata.rowsobject[]-
idrequireddata.rows[].idstring-
kindrequireddata.rows[].kindstring-One of deck, row, removed
prefixrequireddata.rows[].prefixstring-
destinationrequireddata.rows[].destinationstring | null-
currentRaterequireddata.rows[].currentRatemoney | nullUS dollars as a decimal string with exactly 6 decimal places, e.g. "0.012500". Do money arithmetic with a decimal type, not floating point. USD as a decimal string with exactly 6 places, e.g. "0.012500".
newRaterequireddata.rows[].newRatestring | null-
deltaPctrequireddata.rows[].deltaPctnumber | null-
effectiveFromrequireddata.rows[].effectiveFromstring (date-time)ISO-8601 timestamp (UTC)
minutes30drequireddata.rows[].minutes30dnumber-
calls30drequireddata.rows[].calls30dinteger-
monthlyDeltarequireddata.rows[].monthlyDeltanumber | null-
totalRowsrequireddata.totalRowsinteger-
decksrequireddata.decksobject[]-
impactTruncatedrequireddata.impactTruncatedboolean-
summaryrequireddata.summaryobject-

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.
  • 402SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial.
  • 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.