Skip to content
Markets open

Switch API reference

Switch: customer trunks

Customer trunks: addressing, credentials, limits, readiness and approvals.

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

BrowseSwitch: customer trunks

List the trunk authentication methods available to you

GET/api/v1/switch/customer-trunks/auth-modes

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

For each method: what the customer must send and what the switch checks. Methods the platform cannot honour for you are omitted.

Response 200

FieldTypeDescription
datarequiredobject[]-
moderequireddata[].modestring-One of ip, credentials, ip_and_credentials, registration, certificate
titlerequireddata[].titlestring-
summaryrequireddata[].summarystring-
sendsrequireddata[].sendsstring[]What the customer must send
checksrequireddata[].checksstring[]What the switch checks on every call
requiresrequireddata[].requiresstring[]-One of addresses, credentials
needsPlatformSupportdata[].needsPlatformSupportboolean-

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.

Update a Switch customer trunk

PATCH/api/v1/switch/customer-trunks/{trunkId}

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

Setting status to disabled stops new calls but keeps the trunk configurable. A sipPassword sent here is echoed back once. Archived trunks are frozen: restore first. Send X-If-Unchanged-Since: <updatedAt you loaded> to have the save refused with 409 STALE_WRITE if someone changed the record since.

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
labelstring-max 120 chars
authModestringWhat the customer must present; the service refuses a mode the trunk is not configured forOne of ip, credentials, ip_and_credentials, registration, certificate
sipUsernamestring | null-max 64 chars
sipPasswordstring | null-max 64 chars
maxConcurrentCallsinteger | null-0 to 100000
maxCpsinteger | null-0 to 10000
markupPctnumber | null-0 to 10000
billingIncrementstring | null-max 10 chars
blockedPrefixesstring | null-max 8000 chars
statusstring-One of active, disabled
mediaModestring-One of proxy, direct
techPrefixstring | null-max 24 chars
cliRewriteobject | null-
modecliRewrite.modestring-One of pattern
valuecliRewrite.valuestring-max 24 chars
stripcliRewrite.stripinteger-0 to 15
addcliRewrite.addstring-max 12 chars
matchcliRewrite.matchstring-max 200 chars
replacecliRewrite.replacestring-max 200 chars
allowedPrefixesstring[] | null-
allowedCountriesstring[] | null-
blockedCountriesstring[] | null-
maxCallDurationSecondsinteger | null-1 to 21600
requireCliboolean-
allowedClisstring[] | null-
marginProtectionModestring-One of off, monitor, enforce
minMarginPctnumber | null-0 to 99.999
minMarginAbsnumber | null-0 to 1000
maxLossPerMinutenumber | null-0 to 1000
dailyLossLimitnumber | nullWarns only; never blocks0 to 10000000
dailyLossLimitPctnumber | null-0 to 100000

Response 200

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
subAccountIdrequireddata.subAccountIdstring (uuid)The customer this trunk belongs to
labelrequireddata.labelstring-
statusrequireddata.statusstring-One of active, disabled, archived
authModedata.authModestring-One of ip, credentials, ip_and_credentials, registration, certificate
sipUsernamerequireddata.sipUsernamestring | null-
sipPasswordSetrequireddata.sipPasswordSetboolean-
maxConcurrentCallsrequireddata.maxConcurrentCallsinteger | nullNull inherits the customer ceiling
maxCpsrequireddata.maxCpsinteger | null-
markupPctrequireddata.markupPctstring | null-
billingIncrementrequireddata.billingIncrementstring | null-
techPrefixrequireddata.techPrefixstring | null-
mediaModedata.mediaModestring-One of proxy, direct
cliRewriterequireddata.cliRewriteobject | null-
allowedPrefixesrequireddata.allowedPrefixesstring[] | null-
allowedCountriesrequireddata.allowedCountriesstring[] | null-
blockedCountriesrequireddata.blockedCountriesstring[] | 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.
  • 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 an unused Switch customer trunk

DELETE/api/v1/switch/customer-trunks/{trunkId}

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

Refused, naming the dependency, once the trunk has carried traffic, holds rates or routing, or is the customer's last trunk. Archive it instead. Check removability 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
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
deletedrequireddata.deletedboolean-One of true
labelrequireddata.labelstring-

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

Show the configuration actually in force on a trunk

GET/api/v1/switch/customer-trunks/{trunkId}/effective-config

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

Every setting with the value a call would meet and the level it was inherited from, resolved by the same code as the call path. Read-only.

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
trunkrequireddata.trunkobject-
idrequireddata.trunk.idstring (uuid)-
labelrequireddata.trunk.labelstring-
statusrequireddata.trunk.statusstring-
customerIdrequireddata.trunk.customerIdstring (uuid)-
customerLabelrequireddata.trunk.customerLabelstring-
sectionsrequireddata.sectionsobject[]Each setting with the value in force and the level it came from
capacityrequireddata.capacityobject-
limitsrequireddata.capacity.limitsobject[]-
refusalsdata.capacity.refusalsany-
checkOrderrequireddata.capacity.checkOrderstring[]-
noterequireddata.capacity.notestring-
readOnlyrequireddata.readOnlyboolean-One of true

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 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.

Archive a Switch customer trunk

POST/api/v1/switch/customer-trunks/{trunkId}/archive

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

Takes the trunk out of service and out of operational lists, and freezes it. Nothing is destroyed; restore brings it back disabled.

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
reasonstring | null-max 500 chars

Response 200

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

Restore an archived Switch customer trunk

POST/api/v1/switch/customer-trunks/{trunkId}/restore

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

Comes back disabled, so no traffic starts until you enable it.

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
trunkIdrequiredpathstring (uuid)-

Response 200

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

Preview what disabling, enabling or archiving a trunk would do

GET/api/v1/switch/customer-trunks/{trunkId}/service-impact

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

Live channels, recent traffic, whether it is the customer's last enabled trunk, and what survives.

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-
actionquerystringDefault disableOne of disable, enable, archive, restore

Response 200

FieldTypeDescription
datarequiredobject-
actionrequireddata.actionstring-One of disable, enable, archive, restore
trunkrequireddata.trunkobject-
idrequireddata.trunk.idstring (uuid)-
labelrequireddata.trunk.labelstring-
statusrequireddata.trunk.statusstring-
customerrequireddata.customerobject-
idrequireddata.customer.idstring (uuid)-
labelrequireddata.customer.labelstring-
statusrequireddata.customer.statusstring-
liveChannelsrequireddata.liveChannelsinteger-
last24hrequireddata.last24hobject-
siblingsEnabledrequireddata.siblingsEnabledinteger-
stopsCustomerrequireddata.stopsCustomerbooleanTrue when this is the customer's last enabled trunk
reversiblerequireddata.reversibleboolean-
consequencesrequireddata.consequencesstring[]-
preservedrequireddata.preservedstring[]-

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.

Check whether a Switch customer trunk can be deleted

GET/api/v1/switch/customer-trunks/{trunkId}/removability

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

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
trunkrequireddata.trunkobject-
idrequireddata.trunk.idstring (uuid)-
labelrequireddata.trunk.labelstring-
statusrequireddata.trunk.statusstring-
deletablerequireddata.deletableboolean-
blockersrequireddata.blockersobject[]-
kindrequireddata.blockers[].kindstring-One of traffic, refusals, billing, rates, routing, audit, last_trunk
countrequireddata.blockers[].countinteger-
detailrequireddata.blockers[].detailstring-

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.

Clone a Switch customer trunk

POST/api/v1/switch/customer-trunks/{trunkId}/clone

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

Copies the trunk's settings and sell rates to a new trunk on the same customer.

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
labelrequiredstring-max 120 chars

Response 201

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
subAccountIdrequireddata.subAccountIdstring (uuid)The customer this trunk belongs to
labelrequireddata.labelstring-
statusrequireddata.statusstring-One of active, disabled, archived
authModedata.authModestring-One of ip, credentials, ip_and_credentials, registration, certificate
sipUsernamerequireddata.sipUsernamestring | null-
sipPasswordSetrequireddata.sipPasswordSetboolean-
maxConcurrentCallsrequireddata.maxConcurrentCallsinteger | nullNull inherits the customer ceiling
maxCpsrequireddata.maxCpsinteger | null-
markupPctrequireddata.markupPctstring | null-
billingIncrementrequireddata.billingIncrementstring | null-
techPrefixrequireddata.techPrefixstring | null-
mediaModedata.mediaModestring-One of proxy, direct
cliRewriterequireddata.cliRewriteobject | null-
allowedPrefixesrequireddata.allowedPrefixesstring[] | null-
allowedCountriesrequireddata.allowedCountriesstring[] | null-
blockedCountriesrequireddata.blockedCountriesstring[] | null-
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.updatedAtstring (date-time)ISO-8601 timestamp (UTC)
copiedRatesrequireddata.copiedRatesinteger-

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 trunk's allowed source addresses

GET/api/v1/switch/customer-trunks/{trunkId}/ips

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

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
cidrrequireddata[].cidrstring-
descriptionrequireddata[].descriptionstring | 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.

Allow a source address on a trunk

POST/api/v1/switch/customer-trunks/{trunkId}/ips

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

Stored in canonical form. Refused when it cannot be saved (see addresses/preview); overlaps with other entries are returned in conflicts. Applies to new calls only.

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
cidrrequiredstringAn IP address or CIDR blockmax 64 chars
descriptionstring-max 160 chars

Response 201

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
cidrrequireddata.cidrstring-
descriptionrequireddata.descriptionstring | null-
conflictsrequireddata.conflictsobject[]-
kindrequireddata.conflicts[].kindstring-
otherIdrequireddata.conflicts[].otherIdstring (uuid)-
otherCidrrequireddata.conflicts[].otherCidrstring-
otherTrunkIdrequireddata.conflicts[].otherTrunkIdstring (uuid) | null-
otherTrunkLabelrequireddata.conflicts[].otherTrunkLabelstring | null-
otherCustomerIdrequireddata.conflicts[].otherCustomerIdstring (uuid) | null-
otherCustomerLabelrequireddata.conflicts[].otherCustomerLabelstring | 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 a trunk's addresses with overlaps and customer-level entries

GET/api/v1/switch/customer-trunks/{trunkId}/addresses

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

The richer form of /ips: each entry with its canonical form and every overlapping entry on your switch, including addresses added on the customer.

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
trunkIdrequireddata.trunkIdstring (uuid)-
trunkLabelrequireddata.trunkLabelstring-
customerIdrequireddata.customerIdstring (uuid)-
entriesrequireddata.entriesobject[]-
idrequireddata.entries[].idstring (uuid)-
cidrrequireddata.entries[].cidrstring-
canonicalrequireddata.entries[].canonicalstring | null-
descriptionrequireddata.entries[].descriptionstring | null-
ambiguousdata.entries[].ambiguousboolean-
customerLevelrequireddata.customerLevelobject[]Addresses added on the customer, which apply to every trunk
ambiguousCountrequireddata.ambiguousCountinteger-
activationrequireddata.activationobject-
appliesTorequireddata.activation.appliesTostring-One of new_requests
affectsCallsInProgressrequireddata.activation.affectsCallsInProgressboolean-One of false
noterequireddata.activation.notestring-

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.

Preview an address before allowing it on a trunk

POST/api/v1/switch/customer-trunks/{trunkId}/addresses/preview

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

Read-only: the canonical form, size, whether it would be refused, and what it overlaps.

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
cidrrequiredstring-max 64 chars

Response 200

FieldTypeDescription
datarequiredobject-
canonicalrequireddata.canonicalstring-
prefixBitsrequireddata.prefixBitsinteger-
addressCountrequireddata.addressCountnumber-
blockedrequireddata.blockedobject | nullSet when the address cannot be saved at all
reasonrequireddata.blocked.reasonstring-
conflictsrequireddata.conflictsobject[]-
kindrequireddata.conflicts[].kindstring-
otherIdrequireddata.conflicts[].otherIdstring (uuid)-
otherCidrrequireddata.conflicts[].otherCidrstring-
otherTrunkIdrequireddata.conflicts[].otherTrunkIdstring (uuid) | null-
otherTrunkLabelrequireddata.conflicts[].otherTrunkLabelstring | null-
otherCustomerIdrequireddata.conflicts[].otherCustomerIdstring (uuid) | null-
otherCustomerLabelrequireddata.conflicts[].otherCustomerLabelstring | 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

Test a caller-ID rewrite rule against a sample number

POST/api/v1/switch/customer-trunks/cli-rewrite/preview

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

Dry run; saves nothing and needs no 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.

Request body (application/json)

FieldTypeDescription
ruleanyA cliRewrite rule as used on a trunk
samplerequiredstring-max 32 chars

Response 200

FieldTypeDescription
datarequiredobject-
okrequireddata.okboolean-
resultrequireddata.resultstring | null-
errordata.errorstring-

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.

Remove an allowed source address from a trunk

DELETE/api/v1/switch/customer-trunks/{trunkId}/ips/{aclId}

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
trunkIdrequiredpathstring (uuid)-
aclIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
cidrrequireddata.cidrstring-
descriptionrequireddata.descriptionstring | null-
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

Set routing on a Switch customer trunk

POST/api/v1/switch/customer-trunks/{trunkId}/routing

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

Route group, failover group, dialplan, strategy or a direct supplier for this trunk. Send X-If-Unchanged-Since: <updatedAt you loaded> to have the save refused with 409 STALE_WRITE if someone changed the record since.

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
routePlanIdstring (uuid) | null-
failoverRoutePlanIdstring (uuid) | null-
directRouteIdstring (uuid) | null-
directVendorTrunkIdstring (uuid) | null-
dialplanIdstring (uuid) | null-
strategyOverridestring | null-max 24 chars

Response 200

FieldTypeDescription
datarequiredobject-
subAccountIdrequireddata.subAccountIdstring (uuid)-
customerTrunkIddata.customerTrunkIdstring (uuid) | null-
dialplanIdrequireddata.dialplanIdstring (uuid) | null-
routePlanIdrequireddata.routePlanIdstring (uuid) | null-
failoverRoutePlanIdrequireddata.failoverRoutePlanIdstring (uuid) | null-
strategyOverriderequireddata.strategyOverridestring | null-
directRouteIdrequireddata.directRouteIdstring (uuid) | null-
directVendorTrunkIdrequireddata.directVendorTrunkIdstring (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

Show the route wired up for a trunk

GET/api/v1/switch/customer-trunks/{trunkId}/routing-path

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

Customer, trunk, fixed route or route group, then supplier trunks, with ids. For what a specific number would do, use /switch/routing/preview.

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
customerrequireddata.customerobject | null-
idrequireddata.customer.idstring (uuid)-
labelrequireddata.customer.labelstring-
customerTrunkrequireddata.customerTrunkobject-
idrequireddata.customerTrunk.idstring (uuid)-
labelrequireddata.customerTrunk.labelstring-
statusrequireddata.customerTrunk.statusstring-
techPrefixrequireddata.customerTrunk.techPrefixstring | null-
kindrequireddata.kindstringFixed route, route group, or nothing wiredOne of fixed, group, none
fixedrequireddata.fixedobject | null-
grouprequireddata.groupobject | null-
failoverGrouprequireddata.failoverGroupobject | null-
dialplanrequireddata.dialplanobject | null-
idrequireddata.dialplan.idstring (uuid)-
namerequireddata.dialplan.namestring-
strategyOverriderequireddata.strategyOverridestring | null-
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.

Reveal a Switch customer trunk's SIP credentials

GET/api/v1/switch/customer-trunks/{trunkId}/credentials

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

Returns the current username and password without changing them. Every reveal is recorded in the audit log.

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
sipUsernamerequireddata.sipUsernamestring | null-
sipPasswordrequireddata.sipPasswordstring | 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 trunk's credential history and last successful authentication

GET/api/v1/switch/customer-trunks/{trunkId}/credential-status

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

Everything about the credential except its value: username, storage, last change and reveal, and the last call identified with it.

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
trunkIdrequireddata.trunkIdstring (uuid)-
trunkLabelrequireddata.trunkLabelstring-
customerIdrequireddata.customerIdstring (uuid)-
customerLabelrequireddata.customerLabelstring | null-
usernamerequireddata.usernamestring | null-
passwordSetrequireddata.passwordSetboolean-
storagerequireddata.storageobject-
sealedrequireddata.storage.sealedboolean-
noterequireddata.storage.notestring-
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
lastChangedata.lastChangeany-
lastRevealdata.lastRevealany-
historyAvailablerequireddata.historyAvailableboolean-
lastSuccessfulAuthrequireddata.lastSuccessfulAuthobject | null-
atrequireddata.lastSuccessfulAuth.atstring-
sourceIprequireddata.lastSuccessfulAuth.sourceIpstring | null-
sourceIsRegisteredrequireddata.lastSuccessfulAuth.sourceIsRegisteredboolean-

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.

Record that a trunk credential was copied

POST/api/v1/switch/customer-trunks/{trunkId}/credentials/copied

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

Writes an audit entry only. Call it when your interface copies a credential to the clipboard.

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
fieldstring-default "sipPassword"One of sipPassword, sipUsername

Response 202

FieldTypeDescription
datarequiredobject-
approvalRequireddata.approvalRequiredboolean-One of true
approvalRequestIddata.approvalRequestIdstring (uuid) | null-
permissiondata.permissionstring-
expiresAtdata.expiresAtstring (date-time)-
messagedata.messagestring-

Response 204

Recorded.

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

Replace a Switch customer trunk's SIP password

POST/api/v1/switch/customer-trunks/{trunkId}/sip-password

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

Generate one, or set one by hand with mode: "manual". The new password is returned ONCE and the old one stops working immediately (no overlap window).

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
modestring-default "generate"One of generate, manual
passwordstringRequired when mode is manualmax 128 chars

Response 200

FieldTypeDescription
datarequiredobject-
trunkIdrequireddata.trunkIdstring (uuid)-
usernamerequireddata.usernamestring | null-
passwordrequireddata.passwordstringThe new password in plain text. Returned ONCE, here.
moderequireddata.modestring-One of generate, manual
changedAtrequireddata.changedAtstring (date-time)ISO-8601 timestamp (UTC)
overlapWindowrequireddata.overlapWindowenum | nullThere is no grace period: the old password stops working immediatelyOne of null
noterequireddata.notestring-

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 trunk configuration changes awaiting or after review

GET/api/v1/switch/trunk-changes

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

Parameters

NameInTypeDescription
trunkIdquerystring (uuid)-
statusquerystringComma-separated statuses, e.g. pending,approved

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
vendorTrunkIdrequireddata[].vendorTrunkIdstring (uuid)-
trunkLabelrequireddata[].trunkLabelstring | null-
statusrequireddata[].statusstring-
fieldsrequireddata[].fieldsstring[]-
changesrequireddata[].changesobject[]Secret fields show "(secret)", never their value
fieldrequireddata[].changes[].fieldstring-
fromdata[].changes[].fromany-
todata[].changes[].toany-
patchrequireddata[].patchobject-
beforeValuesrequireddata[].beforeValuesobject-
noterequireddata[].notestring | null-
requestedByrequireddata[].requestedBystring (uuid)-
requestedByEmailrequireddata[].requestedByEmailstring | null-
requestedAtrequireddata[].requestedAtstring (date-time)ISO-8601 timestamp (UTC)
reviewedByrequireddata[].reviewedBystring (uuid) | null-
reviewedAtrequireddata[].reviewedAtstring (date-time) | nullISO-8601 timestamp (UTC)
reviewNoterequireddata[].reviewNotestring | null-
appliedAtrequireddata[].appliedAtstring (date-time) | nullISO-8601 timestamp (UTC)

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 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.

Approve and apply a trunk configuration change

POST/api/v1/switch/trunk-changes/{id}/approve

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

applied is the trunk after the change, redacted like every trunk read (sipAuthPasswordSet / smppPasswordSet instead of the secrets). driftedSinceRequest lists fields that changed on the trunk after the request was made.

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

Response 200

FieldTypeDescription
datarequiredobject-
appliedrequireddata.appliedobject-
driftedSinceRequestrequireddata.driftedSinceRequeststring[]-

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.

Reject a trunk configuration change

POST/api/v1/switch/trunk-changes/{id}/reject

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

Response 200

FieldTypeDescription
datarequiredobject-
rejectedrequireddata.rejectedboolean-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.

Withdraw your own pending trunk change

POST/api/v1/switch/trunk-changes/{id}/withdraw

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-
withdrawnrequireddata.withdrawnboolean-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.

Get whether supplier trunk changes need approval

GET/api/v1/switch/trunk-approval-setting

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

Response 200

FieldTypeDescription
datarequiredobject-
requireTrunkApprovalrequireddata.requireTrunkApprovalboolean-

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.

Turn supplier trunk change approval on or off

POST/api/v1/switch/trunk-approval-setting

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.

Request body (application/json)

FieldTypeDescription
requireTrunkApprovalrequiredboolean-

Response 200

FieldTypeDescription
datarequiredobject-
requireTrunkApprovalrequireddata.requireTrunkApprovalboolean-

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 whether trunk readiness blocks first activation

GET/api/v1/switch/trunk-readiness-setting

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

Response 200

FieldTypeDescription
datarequiredobject-
requireTrunkReadinessrequireddata.requireTrunkReadinessboolean-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 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.

Turn the trunk readiness gate on or off

POST/api/v1/switch/trunk-readiness-setting

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

When on, it can refuse only the first-ever activation of a new trunk; existing trunks are grandfathered and bundle trunks are exempt.

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

Response 200

FieldTypeDescription
datarequiredobject-
requireTrunkReadinessrequireddata.requireTrunkReadinessboolean-

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 the sell deck in force on a trunk

GET/api/v1/switch/customer-trunks/{trunkId}/sell-deck

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

The resolved deck, plus the customer and system defaults it did not pick, and a sentence saying which won.

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
deckrequireddata.deckobject | null-
idrequireddata.deck.idstring (uuid)-
namerequireddata.deck.namestring-
versionrequireddata.deck.versioninteger-
statusrequireddata.deck.statusstring-
currencyrequireddata.deck.currencystring-
isSystemDefaultrequireddata.deck.isSystemDefaultboolean-
defaultRatePerUnitrequireddata.deck.defaultRatePerUnitnumber | nullUSD per minute for destinations the deck does not list; null = refuse them
chargingrequireddata.deck.chargingobject-
moderequireddata.modestring-
choicerequireddata.choicestringWhich rule won: the trunk, the customer default or the system default
bypassesCustomerDefaultrequireddata.bypassesCustomerDefaultboolean-
customerDefaultrequireddata.customerDefaultobject | nullSame fields as SwitchCustomerSellDeckRef, shown earlier on this page.
systemDefaultrequireddata.systemDefaultobject | nullSame fields as SwitchCustomerSellDeckRef, shown earlier on this page.
liveRowCountrequireddata.liveRowCountinteger-
explanationrequireddata.explanationstring-
problemrequireddata.problemstring | 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.

Assign a sell deck to a trunk

PUT/api/v1/switch/customer-trunks/{trunkId}/sell-deck

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

Without confirm: true nothing changes and the response shows what would be in force. With it, the trunk reprices from the next call.

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
moderequiredstringHow a trunk picks its sell deckOne of customer_default, system_default, deck, none
deckIdstring (uuid) | null-
confirmboolean-
reasonstring-

Response 200

FieldTypeDescription
datarequiredobject-
changeddata.changedboolean-One of true
beforedata.beforeobjectSame fields as SwitchTrunkEffectiveSellDeck, shown earlier on this page.
wouldBedata.wouldBeobject-
moderequireddata.wouldBe.modestring-
deckrequireddata.wouldBe.deckobject | nullSame fields as SwitchCustomerSellDeckRef, shown earlier on this page.
ratesdata.wouldBe.ratesany-
bypassesCustomerDefaultrequireddata.wouldBe.bypassesCustomerDefaultboolean-
warningrequireddata.wouldBe.warningstring | null-
defaultRaterequireddata.wouldBe.defaultRatenumber | null-
unlistedDestinationsrequireddata.wouldBe.unlistedDestinationsstring-
afterdata.afterobjectSame fields as SwitchTrunkEffectiveSellDeck, 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

Preview a sell-deck assignment for a trunk

GET/api/v1/switch/customer-trunks/{trunkId}/sell-deck/preview

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

What would be in force under a mode, computed by the same resolver. Writes nothing.

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-
modequerystringDefault customer_defaultOne of customer_default, system_default, deck, none
deckIdquerystring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
moderequireddata.modestring-
deckrequireddata.deckobject | nullSame fields as SwitchCustomerSellDeckRef, shown earlier on this page.
ratesdata.ratesany-
bypassesCustomerDefaultrequireddata.bypassesCustomerDefaultboolean-
warningrequireddata.warningstring | null-
defaultRaterequireddata.defaultRatenumber | null-
unlistedDestinationsrequireddata.unlistedDestinationsstring-

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 trunk's sell rates with buy cost and margin

GET/api/v1/switch/customer-trunks/{trunkId}/rates

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

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-
searchquerystringPrefix or destination text
limitqueryinteger-
offsetqueryinteger-
viewquerystringDefault currentOne of current, scheduled, discontinued, expiring, all
originquerystring-One of any, origin_only, destination_only
incrementquerystring-One of any, custom, inherited
costquerystring-One of any, missing
marginquerystring-One of any, thin, negative

Response 200

FieldTypeDescription
datarequiredobject-
rowsrequireddata.rowsobject[]-
idrequireddata.rows[].idstring (uuid)-
subAccountIdrequireddata.rows[].subAccountIdstring (uuid)-
customerTrunkIdrequireddata.rows[].customerTrunkIdstring (uuid) | null-
prefixrequireddata.rows[].prefixstring-
originPrefixrequireddata.rows[].originPrefixstring"" = any origin
ratePerUnitrequireddata.rows[].ratePerUnitmoneySell price per minute, 6-decimal USD string USD as a decimal string with exactly 6 places, e.g. "0.012500".
billingIncrementrequireddata.rows[].billingIncrementstring | null-
statusrequireddata.rows[].statusstringactive, pending (scheduled) or discontinued
effectiveFromrequireddata.rows[].effectiveFromstring (date-time)ISO-8601 timestamp (UTC)
endDaterequireddata.rows[].endDatestring (date-time) | nullISO-8601 timestamp (UTC)
buyCostrequireddata.rows[].buyCostnumber | nullBest eligible buy cost per minute (USD number); null = no supplier prices it
marginPctrequireddata.rows[].marginPctnumber | null-
thinrequireddata.rows[].thinboolean-
negativerequireddata.rows[].negativeboolean-
costSupplierrequireddata.rows[].costSupplierstring | null-
costSourcerequireddata.rows[].costSourcestring-
costMatchedPrefixrequireddata.rows[].costMatchedPrefixstring | null-
costNoterequireddata.rows[].costNotestring | null-
totalrequireddata.totalinteger-
totalIsPageScopedrequireddata.totalIsPageScopedbooleanTrue when a cost or margin filter narrowed the page, so total counts this page only
limitrequireddata.limitinteger-
offsetrequireddata.offsetinteger-
viewrequireddata.viewstring-
summaryrequireddata.summaryobject-
prefixesrequireddata.summary.prefixesinteger-
blendedMarginPctrequireddata.summary.blendedMarginPctnumber | null-
thinCountrequireddata.summary.thinCountinteger-
negativeCountrequireddata.summary.negativeCountinteger-
defaultRateCostCountrequireddata.summary.defaultRateCostCountinteger-
unpricedCountrequireddata.summary.unpricedCountinteger-
basisdata.basisany-

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 or replace one sell rate on a trunk

POST/api/v1/switch/customer-trunks/{trunkId}/rates

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
prefixrequiredstring-max 24 chars
raterequirednumberUSD per minutemin 0
originstring-max 24 chars
billingIncrementstring-max 10 chars

Response 201

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
subAccountIdrequireddata.subAccountIdstring (uuid)-
customerTrunkIdrequireddata.customerTrunkIdstring (uuid) | null-
prefixrequireddata.prefixstring-
originPrefixrequireddata.originPrefixstring"" = any origin
ratePerUnitrequireddata.ratePerUnitmoneySell price per minute, 6-decimal USD string USD as a decimal string with exactly 6 places, e.g. "0.012500".
billingIncrementrequireddata.billingIncrementstring | null-
statusrequireddata.statusstringactive, pending (scheduled) or discontinued
effectiveFromrequireddata.effectiveFromstring (date-time)ISO-8601 timestamp (UTC)
endDaterequireddata.endDatestring (date-time) | nullISO-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

Count a trunk's sell rates by view

GET/api/v1/switch/customer-trunks/{trunkId}/rates/counts

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

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
currentrequireddata.currentinteger-
scheduledrequireddata.scheduledinteger-
expiringrequireddata.expiringinteger-
discontinuedrequireddata.discontinuedinteger-
allrequireddata.allinteger-

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 upcoming sell-rate starts and ends on a trunk

GET/api/v1/switch/customer-trunks/{trunkId}/rates/upcoming

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

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
subAccountIdrequireddata[].subAccountIdstring (uuid)-
customerTrunkIdrequireddata[].customerTrunkIdstring (uuid) | null-
prefixrequireddata[].prefixstring-
originPrefixrequireddata[].originPrefixstring"" = any origin
ratePerUnitrequireddata[].ratePerUnitmoneySell price per minute, 6-decimal USD string USD as a decimal string with exactly 6 places, e.g. "0.012500".
billingIncrementrequireddata[].billingIncrementstring | null-
statusrequireddata[].statusstringactive, pending (scheduled) or discontinued
effectiveFromrequireddata[].effectiveFromstring (date-time)ISO-8601 timestamp (UTC)
endDaterequireddata[].endDatestring (date-time) | nullISO-8601 timestamp (UTC)
kindrequireddata[].kindstring-One of starts, ends
atrequireddata[].atstring (date-time) | nullISO-8601 timestamp (UTC)

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 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 sell-rate discontinuation events on a trunk

GET/api/v1/switch/customer-trunks/{trunkId}/rates/discontinuations

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

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject[]-
revisionIdrequireddata[].revisionIdstring (uuid) | null-
discontinuedAtrequireddata[].discontinuedAtstring (date-time)ISO-8601 timestamp (UTC)
rowsrequireddata[].rowsinteger-
labelrequireddata[].labelstring-
effectivedata[].effectiveany | null-
timezonerequireddata[].timezonestring | null-
changeModerequireddata[].changeModestring | 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.

Preview discontinuing a trunk's whole sell deck

POST/api/v1/switch/customer-trunks/{trunkId}/rates/discontinue-all/preview

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

Omit the effective fields to act now. Send either effectiveFrom (an instant with an offset) or effectiveLocal plus timezone; a bare date is refused because midnight differs by country.

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
effectiveFromstringAn instant with offset, e.g. "2026-10-01T00:00:00Z". A bare date is refused.max 40 chars
effectiveLocalstringA wall-clock time, e.g. "2026-10-01T00:00"; requires timezonemax 30 chars
timezonestring | nullIANA zone, e.g. Europe/London; always recordedmax 64 chars

Response 200

FieldTypeDescription
datarequiredobject-
customerLabelrequireddata.customerLabelstring-
activeRatesrequireddata.activeRatesinteger-
scheduledRatesrequireddata.scheduledRatesinteger-
alreadyDiscontinuedrequireddata.alreadyDiscontinuedinteger-
endDaterequireddata.endDatestring (date-time)ISO-8601 timestamp (UTC)
immediaterequireddata.immediateboolean-
timezonerequireddata.timezonestring | null-
effectOnNewCallsrequireddata.effectOnNewCallsstring-
minutes30drequireddata.minutes30dnumber-
calls30drequireddata.calls30dinteger-
revenue30drequireddata.revenue30dnumberUS dollars as a JSON number (computed figure)
impactTruncatedrequireddata.impactTruncatedboolean-
samplerequireddata.sampleobject[]-
prefixrequireddata.sample[].prefixstring-
originPrefixrequireddata.sample[].originPrefixstring-
ratePerUnitrequireddata.sample[].ratePerUnitmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
billingIncrementrequireddata.sample[].billingIncrementstring | 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

Discontinue a trunk's whole sell deck

POST/api/v1/switch/customer-trunks/{trunkId}/rates/discontinue-all

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

Nothing is deleted; priced calls keep their rate. Omit the effective fields to act now. Send either effectiveFrom (an instant with an offset) or effectiveLocal plus timezone; a bare date is refused because midnight differs by country.

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
effectiveFromstringAn instant with offset, e.g. "2026-10-01T00:00:00Z". A bare date is refused.max 40 chars
effectiveLocalstringA wall-clock time, e.g. "2026-10-01T00:00"; requires timezonemax 30 chars
timezonestring | nullIANA zone, e.g. Europe/London; always recordedmax 64 chars
includeScheduledboolean-

Response 200

FieldTypeDescription
datarequiredobject-
endDaterequireddata.endDatestring (date-time)ISO-8601 timestamp (UTC)
effectivedata.effectiveanyThe moment described in words and in the recorded zone
revisionIddata.revisionIdstring (uuid) | null-
discontinuedrequireddata.discontinuedinteger-
deletedrequireddata.deletedintegerDeprecated alias of discontinued; nothing is deleted
scheduledLeftrequireddata.scheduledLeftinteger-

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

Discontinue one sell rate on a trunk

POST/api/v1/switch/customer-trunks/{trunkId}/rates/{rateId}/discontinue

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

Omit the effective fields to act now. Send either effectiveFrom (an instant with an offset) or effectiveLocal plus timezone; a bare date is refused because midnight differs by country.

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
trunkIdrequiredpathstring (uuid)-
rateIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
effectiveFromstringAn instant with offset, e.g. "2026-10-01T00:00:00Z". A bare date is refused.max 40 chars
effectiveLocalstringA wall-clock time, e.g. "2026-10-01T00:00"; requires timezonemax 30 chars
timezonestring | nullIANA zone, e.g. Europe/London; always recordedmax 64 chars

Response 200

FieldTypeDescription
datarequiredobject-
endDaterequireddata.endDatestring (date-time)ISO-8601 timestamp (UTC)
effectivedata.effectiveanyThe moment described in words and in the recorded zone
revisionIddata.revisionIdstring (uuid) | null-
discontinuedrequireddata.discontinuedboolean-One of true
deletedrequireddata.deletedbooleanDeprecated alias; the rate is discontinued, not deletedOne of true
immediaterequireddata.immediateboolean-

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

Add or replace many sell rates on a trunk

POST/api/v1/switch/customer-trunks/{trunkId}/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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
rowsrequiredobject[]-
prefixrequiredrows[].prefixstring-max 24 chars
raterequiredrows[].ratenumber-min 0
originrows[].originstring-max 24 chars
billingIncrementrows[].billingIncrementstring-max 10 chars

Response 200

FieldTypeDescription
datarequiredobject-
appliedrequireddata.appliedinteger-
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

Discontinue one sell rate on a trunk now

DELETE/api/v1/switch/customer-trunks/{trunkId}/rates/{rateId}

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

Kept for existing clients: the rate is discontinued immediately, not deleted.

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
trunkIdrequiredpathstring (uuid)-
rateIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
endDaterequireddata.endDatestring (date-time)ISO-8601 timestamp (UTC)
effectivedata.effectiveanyThe moment described in words and in the recorded zone
revisionIddata.revisionIdstring (uuid) | null-
discontinuedrequireddata.discontinuedboolean-One of true
deletedrequireddata.deletedbooleanDeprecated alias; the rate is discontinued, not deletedOne of true
immediaterequireddata.immediateboolean-

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

Discontinue every sell rate on a trunk now

POST/api/v1/switch/customer-trunks/{trunkId}/rates/clear

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
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject-
endDaterequireddata.endDatestring (date-time)ISO-8601 timestamp (UTC)
effectivedata.effectiveanyThe moment described in words and in the recorded zone
revisionIddata.revisionIdstring (uuid) | null-
discontinuedrequireddata.discontinuedinteger-
deletedrequireddata.deletedintegerDeprecated alias of discontinued; nothing is deleted
scheduledLeftrequireddata.scheduledLeftinteger-

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 (future-dated) sell rates on a trunk

GET/api/v1/switch/customer-trunks/{trunkId}/rates/scheduled

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

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-

Response 200

FieldTypeDescription
datarequiredobject[]Same fields as SwitchCustomerSellRate, 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 sell-rate change on a trunk

POST/api/v1/switch/customer-trunks/{trunkId}/rates/schedule

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

The rate becomes active at the effective moment. Omit the effective fields to act now. Send either effectiveFrom (an instant with an offset) or effectiveLocal plus timezone; a bare date is refused because midnight differs by country.

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
effectiveFromstringAn instant with offset, e.g. "2026-10-01T00:00:00Z". A bare date is refused.max 40 chars
effectiveLocalstringA wall-clock time, e.g. "2026-10-01T00:00"; requires timezonemax 30 chars
timezonestring | nullIANA zone, e.g. Europe/London; always recordedmax 64 chars
prefixrequiredstring-max 24 chars
raterequirednumberUSD per minutemin 0
originstring-max 24 chars
billingIncrementstring-max 10 chars

Response 201

FieldTypeDescription
datarequiredobjectSame fields as SwitchCustomerSellRate, 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 sell rate on a trunk

DELETE/api/v1/switch/customer-trunks/{trunkId}/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
trunkIdrequiredpathstring (uuid)-
rateIdrequiredpathstring (uuid)-

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

Reprice as a markup over buy cost from a trunk

POST/api/v1/switch/customer-trunks/{trunkId}/rates/apply-markup

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

Applies to the customer's deck; on a single-trunk customer that is this trunk's deck.

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
trunkIdrequiredpathstring (uuid)-

Request body (application/json)

FieldTypeDescription
markupPctrequirednumber-min -100
prefixesstring[]Only these prefixes; omit for the whole deck

Response 200

FieldTypeDescription
datarequiredobject-
updatedrequireddata.updatedinteger-
skippedrequireddata.skippedinteger-
basisdata.basisany-
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

Export a trunk's sell rates as CSV

GET/api/v1/switch/customer-trunks/{trunkId}/rates.csv

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

Scoped to this trunk's deck; takes the same filters as the list.

Parameters

NameInTypeDescription
trunkIdrequiredpathstring (uuid)-
searchquerystringPrefix or destination text
viewquerystringDefault currentOne of current, scheduled, discontinued, expiring, all
originquerystring-One of any, origin_only, destination_only
incrementquerystring-One of any, custom, inherited
costquerystring-One of any, missing
marginquerystring-One of any, thin, negative

Response 200 (text/csv)

The trunk's filtered sell deck as a CSV attachment.

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.