Switch API reference
Switch: routing
Route plans, dialplans, routing rules, ACLs and route traces.
23 operationsBase URL https://packetexchange.io/api/v1Postman collection
BrowseSwitch: routing
List route groups
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Route groups (stored as route plans): ordered supplier chains with failover rules. Newest change first, with entry counts.
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string (uuid) | - |
operatorIdrequireddata[].operatorId | string (uuid) | - |
namerequireddata[].name | string | - |
descriptionrequireddata[].description | string | null | - |
enabledrequireddata[].enabled | boolean | - |
failoverSipCodesrequireddata[].failoverSipCodes | integer[] | SIP results that move the call to the next supplier |
maxAttemptsrequireddata[].maxAttempts | integer | 1 to 6 |
selectionModerequireddata[].selectionMode | string | How the first supplier is picked; failover is always sequentialOne of priority, least_cost, weighted |
failoverTimeoutSecondsrequireddata[].failoverTimeoutSeconds | integer | null | null = the platform budget |
createdAtrequireddata[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata[].updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
entryCountrequireddata[].entryCount | integer | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Create a route group
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Names must be unique per operator. Defaults: priority selection, 3 attempts, the platform failover timeout.
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)
| Field | Type | Description |
|---|---|---|
namerequired | string | -max 120 chars |
description | string | null | -max 2000 chars |
selectionMode | string | -One of priority, least_cost, weighted |
failoverSipCodes | integer[] | - |
maxAttempts | integer | -1 to 6 |
failoverTimeoutSeconds | integer | null | -5 to 600 |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
operatorIdrequireddata.operatorId | string (uuid) | - |
namerequireddata.name | string | - |
descriptionrequireddata.description | string | null | - |
enabledrequireddata.enabled | boolean | - |
failoverSipCodesrequireddata.failoverSipCodes | integer[] | SIP results that move the call to the next supplier |
maxAttemptsrequireddata.maxAttempts | integer | 1 to 6 |
selectionModerequireddata.selectionMode | string | How the first supplier is picked; failover is always sequentialOne of priority, least_cost, weighted |
failoverTimeoutSecondsrequireddata.failoverTimeoutSeconds | integer | null | null = the platform budget |
createdAtrequireddata.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Get a route group with its suppliers
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
operatorIdrequireddata.operatorId | string (uuid) | - |
namerequireddata.name | string | - |
descriptionrequireddata.description | string | null | - |
enabledrequireddata.enabled | boolean | - |
failoverSipCodesrequireddata.failoverSipCodes | integer[] | SIP results that move the call to the next supplier |
maxAttemptsrequireddata.maxAttempts | integer | 1 to 6 |
selectionModerequireddata.selectionMode | string | How the first supplier is picked; failover is always sequentialOne of priority, least_cost, weighted |
failoverTimeoutSecondsrequireddata.failoverTimeoutSeconds | integer | null | null = the platform budget |
createdAtrequireddata.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
entriesrequireddata.entries | object[] | - |
idrequireddata.entries[].id | string (uuid) | - |
prefixrequireddata.entries[].prefix | string | "" = any destination |
routeIdrequireddata.entries[].routeId | string (uuid) | null | A marketplace route you bought |
vendorTrunkIdrequireddata.entries[].vendorTrunkId | string (uuid) | null | One of your supplier trunks |
priorityrequireddata.entries[].priority | integer | - |
weightPctrequireddata.entries[].weightPct | integer | null | - |
minAsrrequireddata.entries[].minAsr | string | null | ASR gate in percent, as a decimal string; null = off |
maxPddrequireddata.entries[].maxPdd | integer | null | PDD gate in ms; null = off |
enabledrequireddata.entries[].enabled | boolean | - |
destinationNamerequireddata.entries[].destinationName | string | null | - |
countryrequireddata.entries[].country | string | null | - |
externalrequireddata.entries[].external | boolean | True for a supplier trunk, false for a marketplace route |
supplierLabelrequireddata.entries[].supplierLabel | string | - |
supplierMetarequireddata.entries[].supplierMeta | string | - |
trunkLabelrequireddata.entries[].trunkLabel | string | null | - |
trunkHostrequireddata.entries[].trunkHost | string | null | Withheld (null) for marketplace-promoted trunks |
trunkStatusrequireddata.entries[].trunkStatus | string | null | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Update a route group's settings
PATCH/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Send failoverTimeoutSeconds: null to go back to the platform budget; omit it to leave it unchanged.
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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
name | string | -max 120 chars |
description | string | null | -max 2000 chars |
enabled | boolean | - |
selectionMode | string | -One of priority, least_cost, weighted |
failoverSipCodes | integer[] | - |
maxAttempts | integer | -1 to 6 |
failoverTimeoutSeconds | integer | null | -5 to 600 |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchRouteGroup, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Delete a route group
DELETE/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Customers assigned to it are detached and fall back to their routing strategy.
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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
deletedrequireddata.deleted | boolean | -One of true |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Clone a route group with all its suppliers
POST/
- 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
namerequireddata.name | string | - |
entriesClonedrequireddata.entriesCloned | integer | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Replace the suppliers in a route group
PUT/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Up to 200 entries, each naming exactly one supplier: a marketplace route you bought or one of your active supplier trunks. Duplicate supplier for the same prefix is refused.
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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
entriesrequired | object[] | - |
prefixentries[].prefix | string | -max 24 chars |
routeIdentries[].routeId | string (uuid) | null | - |
vendorTrunkIdentries[].vendorTrunkId | string (uuid) | null | - |
priorityentries[].priority | integer | -1 to 99 |
weightPctentries[].weightPct | integer | null | -0 to 100 |
minAsrentries[].minAsr | number | null | -0 to 100 |
maxPddentries[].maxPdd | integer | null | -min 0 |
enabledentries[].enabled | boolean | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
operatorIdrequireddata.operatorId | string (uuid) | - |
namerequireddata.name | string | - |
descriptionrequireddata.description | string | null | - |
enabledrequireddata.enabled | boolean | - |
failoverSipCodesrequireddata.failoverSipCodes | integer[] | SIP results that move the call to the next supplier |
maxAttemptsrequireddata.maxAttempts | integer | 1 to 6 |
selectionModerequireddata.selectionMode | string | How the first supplier is picked; failover is always sequentialOne of priority, least_cost, weighted |
failoverTimeoutSecondsrequireddata.failoverTimeoutSeconds | integer | null | null = the platform budget |
createdAtrequireddata.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
entriesrequireddata.entries | object[] | - |
idrequireddata.entries[].id | string (uuid) | - |
prefixrequireddata.entries[].prefix | string | "" = any destination |
routeIdrequireddata.entries[].routeId | string (uuid) | null | A marketplace route you bought |
vendorTrunkIdrequireddata.entries[].vendorTrunkId | string (uuid) | null | One of your supplier trunks |
priorityrequireddata.entries[].priority | integer | - |
weightPctrequireddata.entries[].weightPct | integer | null | - |
minAsrrequireddata.entries[].minAsr | string | null | ASR gate in percent, as a decimal string; null = off |
maxPddrequireddata.entries[].maxPdd | integer | null | PDD gate in ms; null = off |
enabledrequireddata.entries[].enabled | boolean | - |
destinationNamerequireddata.entries[].destinationName | string | null | - |
countryrequireddata.entries[].country | string | null | - |
externalrequireddata.entries[].external | boolean | True for a supplier trunk, false for a marketplace route |
supplierLabelrequireddata.entries[].supplierLabel | string | - |
supplierMetarequireddata.entries[].supplierMeta | string | - |
trunkLabelrequireddata.entries[].trunkLabel | string | null | - |
trunkHostrequireddata.entries[].trunkHost | string | null | Withheld (null) for marketplace-promoted trunks |
trunkStatusrequireddata.entries[].trunkStatus | string | null | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
List dialplans
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Dialplans are ordered rules above route groups: match a number, rewrite it and the caller ID, then route or block.
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string (uuid) | - |
operatorIdrequireddata[].operatorId | string (uuid) | - |
namerequireddata[].name | string | - |
descriptionrequireddata[].description | string | null | - |
enabledrequireddata[].enabled | boolean | - |
createdAtrequireddata[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata[].updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
ruleCountrequireddata[].ruleCount | integer | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Create a dialplan
POST/
- 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)
| Field | Type | Description |
|---|---|---|
namerequired | string | -max 120 chars |
description | string | null | -max 2000 chars |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
operatorIdrequireddata.operatorId | string (uuid) | - |
namerequireddata.name | string | - |
descriptionrequireddata.description | string | null | - |
enabledrequireddata.enabled | boolean | - |
createdAtrequireddata.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Get a dialplan with its rules
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
operatorIdrequireddata.operatorId | string (uuid) | - |
namerequireddata.name | string | - |
descriptionrequireddata.description | string | null | - |
enabledrequireddata.enabled | boolean | - |
createdAtrequireddata.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
rulesrequireddata.rules | object[] | - |
idrequireddata.rules[].id | string (uuid) | - |
dialplanIdrequireddata.rules[].dialplanId | string (uuid) | - |
positionrequireddata.rules[].position | integer | - |
labelrequireddata.rules[].label | string | null | - |
enabledrequireddata.rules[].enabled | boolean | - |
matchPrefixrequireddata.rules[].matchPrefix | string | "" = any dialled number |
matchRegexrequireddata.rules[].matchRegex | string | null | - |
minLenrequireddata.rules[].minLen | integer | null | - |
maxLenrequireddata.rules[].maxLen | integer | null | - |
matchClirequireddata.rules[].matchCli | string | null | - |
jurisdictionrequireddata.rules[].jurisdiction | string | -One of any, intrastate, interstate, local, international, domestic |
timeStartrequireddata.rules[].timeStart | string | null | HH:MM in your timezone |
timeEndrequireddata.rules[].timeEnd | string | null | - |
daysOfWeekrequireddata.rules[].daysOfWeek | integer[] | null | 0 = Sunday; null = every day |
stripDigitsrequireddata.rules[].stripDigits | integer | - |
prependDigitsrequireddata.rules[].prependDigits | string | - |
cliModerequireddata.rules[].cliMode | string | -One of passthrough, set, strip, prepend, anonymous, did |
cliValuerequireddata.rules[].cliValue | string | null | - |
actionrequireddata.rules[].action | string | -One of route_group, block |
routeGroupIdrequireddata.rules[].routeGroupId | string (uuid) | null | - |
blockCauserequireddata.rules[].blockCause | integer | SIP code sent when action = block |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Rename, describe, enable or disable a dialplan
PATCH/
- 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
name | string | -max 120 chars |
description | string | null | -max 2000 chars |
enabled | boolean | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchDialplan, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Delete a dialplan
DELETE/
- 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
deletedrequireddata.deleted | boolean | -One of true |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Clone a dialplan with all its rules
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Cloned rules keep their route-group targets.
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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
namerequireddata.name | string | - |
rulesClonedrequireddata.rulesCloned | integer | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Replace the rules in a dialplan
PUT/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Up to 200 rules, evaluated in position order. A route_group action must name one of your route groups; regular expressions that risk catastrophic backtracking are refused.
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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
rulesrequired | object[] | - |
positionrules[].position | integer | - |
labelrules[].label | string | null | -max 120 chars |
enabledrules[].enabled | boolean | - |
matchPrefixrules[].matchPrefix | string | -max 24 chars |
matchRegexrules[].matchRegex | string | null | -max 400 chars |
minLenrules[].minLen | integer | null | -0 to 24 |
maxLenrules[].maxLen | integer | null | -0 to 24 |
matchClirules[].matchCli | string | null | -max 48 chars |
jurisdictionrules[].jurisdiction | string | -One of any, intrastate, interstate, local, international, domestic |
timeStartrules[].timeStart | string | null | - |
timeEndrules[].timeEnd | string | null | - |
daysOfWeekrules[].daysOfWeek | integer[] | null | - |
stripDigitsrules[].stripDigits | integer | -0 to 20 |
prependDigitsrules[].prependDigits | string | -max 24 chars |
cliModerules[].cliMode | string | -One of passthrough, set, strip, prepend, anonymous, did |
cliValuerules[].cliValue | string | null | -max 32 chars |
actionrules[].action | string | -One of route_group, block |
routeGroupIdrules[].routeGroupId | string (uuid) | null | - |
blockCauserules[].blockCause | integer | -400 to 699 |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
operatorIdrequireddata.operatorId | string (uuid) | - |
namerequireddata.name | string | - |
descriptionrequireddata.description | string | null | - |
enabledrequireddata.enabled | boolean | - |
createdAtrequireddata.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
rulesrequireddata.rules | object[] | - |
idrequireddata.rules[].id | string (uuid) | - |
dialplanIdrequireddata.rules[].dialplanId | string (uuid) | - |
positionrequireddata.rules[].position | integer | - |
labelrequireddata.rules[].label | string | null | - |
enabledrequireddata.rules[].enabled | boolean | - |
matchPrefixrequireddata.rules[].matchPrefix | string | "" = any dialled number |
matchRegexrequireddata.rules[].matchRegex | string | null | - |
minLenrequireddata.rules[].minLen | integer | null | - |
maxLenrequireddata.rules[].maxLen | integer | null | - |
matchClirequireddata.rules[].matchCli | string | null | - |
jurisdictionrequireddata.rules[].jurisdiction | string | -One of any, intrastate, interstate, local, international, domestic |
timeStartrequireddata.rules[].timeStart | string | null | HH:MM in your timezone |
timeEndrequireddata.rules[].timeEnd | string | null | - |
daysOfWeekrequireddata.rules[].daysOfWeek | integer[] | null | 0 = Sunday; null = every day |
stripDigitsrequireddata.rules[].stripDigits | integer | - |
prependDigitsrequireddata.rules[].prependDigits | string | - |
cliModerequireddata.rules[].cliMode | string | -One of passthrough, set, strip, prepend, anonymous, did |
cliValuerequireddata.rules[].cliValue | string | null | - |
actionrequireddata.rules[].action | string | -One of route_group, block |
routeGroupIdrequireddata.rules[].routeGroupId | string (uuid) | null | - |
blockCauserequireddata.rules[].blockCause | integer | SIP code sent when action = block |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Preview how a number would route
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Read-only: the dialplan rule matched, number and caller-ID rewrites, the route group, the ordered supplier chain, any customer or trunk restriction that would refuse the call, and candidates that were skipped. Failover is always sequential. For the full reasoning use POST /routing/trace.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
torequired | query | string | Dialled number |
cli | query | string | - |
type | query | string | -One of voice, sms |
subAccountId | query | string (uuid) | The customer |
customerTrunkId | query | string (uuid) | Name the trunk for an exact restriction check |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
dialplanIdrequireddata.dialplanId | string (uuid) | null | - |
dialplanNamerequireddata.dialplanName | string | null | - |
matchedrequireddata.matched | boolean | - |
ruleIdrequireddata.ruleId | string (uuid) | null | - |
ruleLabelrequireddata.ruleLabel | string | null | - |
blockedrequireddata.blocked | boolean | - |
blockCauserequireddata.blockCause | integer | null | - |
translatedNumberrequireddata.translatedNumber | string | - |
outClirequireddata.outCli | string | null | - |
routeGroupIdrequireddata.routeGroupId | string (uuid) | null | - |
routeGroupNamerequireddata.routeGroupName | string | null | - |
kindrequireddata.kind | string | fixed route or route group |
selectionModerequireddata.selectionMode | string | null | - |
failoverModerequireddata.failoverMode | string | -One of sequential |
failoverSipCodesrequireddata.failoverSipCodes | integer[] | - |
maxAttemptsrequireddata.maxAttempts | integer | - |
setupBudgetSecondsrequireddata.setupBudgetSeconds | number | null | - |
refusalrequireddata.refusal | object | null | Why the chain is empty on purpose |
restrictionrequireddata.restriction | object | null | A customer or trunk restriction that would refuse this call |
skippedrequireddata.skipped | object[] | - |
supplierrequireddata.skipped[].supplier | string | - |
reasonrequireddata.skipped[].reason | string | - |
detailrequireddata.skipped[].detail | string | null | - |
vendorTrunkIdrequireddata.skipped[].vendorTrunkId | string (uuid) | null | - |
candidatesrequireddata.candidates | object[] | - |
attemptrequireddata.candidates[].attempt | integer | - |
routeIdrequireddata.candidates[].routeId | string | - |
destinationrequireddata.candidates[].destination | string | null | - |
countryrequireddata.candidates[].country | string | null | - |
pricePerUnitrequireddata.candidates[].pricePerUnit | string | Cost per minute of this supplier, 6-decimal string |
matchedPrefixrequireddata.candidates[].matchedPrefix | string | null | - |
priorityrequireddata.candidates[].priority | integer | null | - |
externalrequireddata.candidates[].external | boolean | - |
supplierrequireddata.candidates[].supplier | string | -One of external trunk, marketplace |
endpointrequireddata.candidates[].endpoint | string | null | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Run a route trace for a number
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Explains the routing decision end to end: normalisation, the policy matched, the sell price, every eligible supplier with its buy rate, capacity and margin, and why each excluded supplier was excluded. Uses the same resolvers as live calls but is NOT a call: no call record, balance movement or capacity use. The result is kept for an hour so it can be saved.
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)
| Field | Type | Description |
|---|---|---|
torequired | string | -max 32 chars |
cli | string | null | -max 32 chars |
type | string | -One of voice, sms |
subAccountId | string (uuid) | null | The customer |
customerTrunkId | string (uuid) | null | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
traceIdrequireddata.traceId | string (uuid) | - |
atrequireddata.at | string (date-time) | ISO-8601 timestamp (UTC) |
savedrequireddata.saved | boolean | - |
savedNoterequireddata.savedNote | string | null | - |
inputrequireddata.input | object | - |
torequireddata.input.to | string | - |
clirequireddata.input.cli | string | null | - |
typerequireddata.input.type | string | -One of voice, sms |
subAccountIdrequireddata.input.subAccountId | string (uuid) | null | - |
subAccountLabelrequireddata.input.subAccountLabel | string | null | - |
customerTrunkIdrequireddata.input.customerTrunkId | string (uuid) | null | - |
customerTrunkLabelrequireddata.input.customerTrunkLabel | string | null | - |
verdictrequireddata.verdict | object | - |
routesrequireddata.verdict.routes | boolean | Would the call be carried? |
sipCoderequireddata.verdict.sipCode | integer | null | What the customer's switch would receive |
reasonrequireddata.verdict.reason | string | null | - |
summaryrequireddata.verdict.summary | string | - |
stepsrequireddata.steps | object[] | Each decision stage with its result |
numberrequireddata.number | object | - |
dialledrequireddata.number.dialled | string | - |
digitsrequireddata.number.digits | string | - |
afterTechPrefixrequireddata.number.afterTechPrefix | string | - |
translatedrequireddata.number.translated | string | - |
countryrequireddata.number.country | string | null | - |
outClirequireddata.outCli | string | null | - |
sellrequireddata.sell | object | null | A price, or the reason there is none. Only kind = rated carries a rate. |
kindrequireddata.sell.kind | string | -One of rated, no_matching_rate, not_yet_effective, expired, forbidden, rating_failed, not_billable |
ratedata.sell.rate | number | Present when kind = rated. May legitimately be 0. |
matchedPrefixdata.sell.matchedPrefix | string | - |
deckVersiondata.sell.deckVersion | integer | null | - |
sourcedata.sell.source | string | - |
destinationdata.sell.destination | string | - |
effectiveFromdata.sell.effectiveFrom | string | - |
expiredAtdata.sell.expiredAt | string | - |
reasondata.sell.reason | string | Why it is forbidden or failed |
sellBillingRaterequireddata.sellBillingRate | number | null | USD as a JSON number (engine output, up to 6 decimal places) |
candidatesrequireddata.candidates | object[] | Suppliers in the chain, in attempt order, with buy rate, capacity and margin |
excludedrequireddata.excluded | object[] | Suppliers considered and not used, each with the reason |
selectedrequireddata.selected | object | null | - |
durationrequireddata.duration | object | null | - |
secondsrequireddata.duration.seconds | integer | - |
boundByrequireddata.duration.boundBy | string | -One of balance, platform, trunk |
sideEffectsrequireddata.sideEffects | object | - |
createdCdrrequireddata.sideEffects.createdCdr | boolean | -One of false |
movedBalancerequireddata.sideEffects.movedBalance | boolean | -One of false |
consumedCapacityrequireddata.sideEffects.consumedCapacity | boolean | -One of false |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List saved route traces
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Default 25 |
offset | query | integer | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
itemsrequireddata.items | object[] | - |
idrequireddata.items[].id | string (uuid) | - |
traceIdrequireddata.items[].traceId | string (uuid) | - |
noterequireddata.items[].note | string | null | - |
destinationrequireddata.items[].destination | string | - |
clirequireddata.items[].cli | string | null | - |
callTyperequireddata.items[].callType | string | - |
subAccountIdrequireddata.items[].subAccountId | string (uuid) | null | - |
customerTrunkIdrequireddata.items[].customerTrunkId | string (uuid) | null | - |
routesrequireddata.items[].routes | boolean | - |
sipCoderequireddata.items[].sipCode | integer | null | - |
reasonrequireddata.items[].reason | string | null | - |
summaryrequireddata.items[].summary | string | - |
selectedLabelrequireddata.items[].selectedLabel | string | null | - |
buyRaterequireddata.items[].buyRate | string | null | Decimal string |
sellRaterequireddata.items[].sellRate | string | null | Decimal string |
savedByrequireddata.items[].savedBy | string | null | - |
ranAtrequireddata.items[].ranAt | string (date-time) | ISO-8601 timestamp (UTC) |
createdAtrequireddata.items[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
totalrequireddata.total | integer | - |
limitrequireddata.limit | integer | - |
offsetrequireddata.offset | integer | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Save a route trace
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Keeps a trace run within the last hour, by its traceId, with an optional note. The stored copy is the server's own result. Saving the same trace twice returns alreadySaved: true.
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)
| Field | Type | Description |
|---|---|---|
traceIdrequired | string (uuid) | - |
note | string | null | -max 2000 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
traceIdrequireddata.traceId | string (uuid) | - |
alreadySavedrequireddata.alreadySaved | boolean | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Get a saved route trace
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The snapshot as it was saved. It is never re-run; running again produces a new trace.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchRouteTrace, shown earlier on this page. |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Delete a saved route trace
DELETE/
- 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List inbound IP ACLs for a customer or trunk
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
entityType | query | string | -One of customer, trunk |
entityIdrequired | query | string (uuid) | The customer or trunk id |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string (uuid) | - |
entityTyperequireddata[].entityType | string | -One of customer, trunk |
entityIdrequireddata[].entityId | string (uuid) | - |
cidrrequireddata[].cidr | string | - |
descriptionrequireddata[].description | string | null | - |
createdAtrequireddata[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Add an inbound IP ACL entry
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Authorises an address or CIDR for a customer (IP authentication) or a trunk (identity).
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)
| Field | Type | Description |
|---|---|---|
entityTyperequired | string | -One of customer, trunk |
entityIdrequired | string (uuid) | - |
cidrrequired | string | -max 64 chars |
description | string | null | -max 160 chars |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchIpAcl, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Remove an inbound IP ACL entry
DELETE/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Removing a customer address stops calls from that address immediately.
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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
deletedrequireddata.deleted | boolean | -One of true |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.