Switch API reference
Switch: customers
Customers you sell to: accounts, balances, credit, contacts and lifecycle.
61 operationsBase URL https://packetexchange.io/api/v1Postman collection
BrowseSwitch: customers
Get a Switch customer routing assignment
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 (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
subAccountIdrequireddata.subAccountId | string (uuid) | - |
customerTrunkIddata.customerTrunkId | string (uuid) | null | - |
dialplanIdrequireddata.dialplanId | string (uuid) | null | - |
routePlanIdrequireddata.routePlanId | string (uuid) | null | - |
failoverRoutePlanIdrequireddata.failoverRoutePlanId | string (uuid) | null | - |
strategyOverriderequireddata.strategyOverride | string | null | - |
directRouteIdrequireddata.directRouteId | string (uuid) | null | - |
directVendorTrunkIdrequireddata.directVendorTrunkId | string (uuid) | 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.
Assign routing to a Switch customer
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Sets the dialplan, route group, failover group, strategy or a direct supplier on the customer's first trunk. Use the per-trunk routing endpoint for a specific 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
dialplanId | string (uuid) | null | - |
routePlanId | string (uuid) | null | - |
failoverRoutePlanId | string (uuid) | null | - |
strategyOverride | string | null | -One of cheapest, best_quality, balanced |
directRouteId | string (uuid) | null | - |
directVendorTrunkId | string (uuid) | null | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchCustomerRoutingAssignment, 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
List a Switch customer trunks with traffic
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Each trunk with its authentication readiness, identification, addresses, routing, inherited limits and traffic over the chosen period.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
scope | query | string | Default operational (excludes archived)One of operational, archived, all |
periodHours | query | integer | Window for the traffic figures; unrecognised values fall back to 24 |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string (uuid) | - |
subAccountIdrequireddata[].subAccountId | string (uuid) | The customer this trunk belongs to |
labelrequireddata[].label | string | - |
statusrequireddata[].status | string | -One of active, disabled, archived |
authModedata[].authMode | string | -One of ip, credentials, ip_and_credentials, registration, certificate |
sipUsernamerequireddata[].sipUsername | string | null | - |
sipPasswordSetrequireddata[].sipPasswordSet | boolean | - |
maxConcurrentCallsrequireddata[].maxConcurrentCalls | integer | null | Null inherits the customer ceiling |
maxCpsrequireddata[].maxCps | integer | null | - |
markupPctrequireddata[].markupPct | string | null | - |
billingIncrementrequireddata[].billingIncrement | string | null | - |
techPrefixrequireddata[].techPrefix | string | null | - |
mediaModedata[].mediaMode | string | -One of proxy, direct |
cliRewriterequireddata[].cliRewrite | object | null | - |
allowedPrefixesrequireddata[].allowedPrefixes | string[] | null | - |
allowedCountriesrequireddata[].allowedCountries | string[] | null | - |
blockedCountriesrequireddata[].blockedCountries | string[] | null | - |
createdAtrequireddata[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata[].updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
authenticationrequireddata[].authentication | object | - |
moderequireddata[].authentication.mode | string | -One of ip, credentials, ip_and_credentials, registration, certificate |
titlerequireddata[].authentication.title | string | - |
summaryrequireddata[].authentication.summary | string | - |
sendsrequireddata[].authentication.sends | string[] | - |
checksrequireddata[].authentication.checks | string[] | - |
gapsrequireddata[].authentication.gaps | string[] | Empty when the trunk is configured for its declared mode |
enforcedrequireddata[].authentication.enforced | boolean | - |
identificationrequireddata[].identification | object | - |
namedByrequireddata[].identification.namedBy | string[] | - |
uniquerequireddata[].identification.unique | boolean | - |
noterequireddata[].identification.note | string | null | - |
allowedIpsrequireddata[].allowedIps | string[] | - |
allowedAddressesrequireddata[].allowedAddresses | object[] | - |
idrequireddata[].allowedAddresses[].id | string (uuid) | - |
cidrrequireddata[].allowedAddresses[].cidr | string | - |
routingrequireddata[].routing | object | null | - |
inheritedrequireddata[].inherited | object | - |
fromrequireddata[].inherited.from | string | -One of customer |
maxConcurrentCallsrequireddata[].inherited.maxConcurrentCalls | integer | null | - |
maxCpsrequireddata[].inherited.maxCps | integer | null | - |
billingIncrementrequireddata[].inherited.billingIncrement | string | null | - |
last24hrequireddata[].last24h | object | - |
callsrequireddata[].last24h.calls | integer | - |
minutesrequireddata[].last24h.minutes | number | - |
revenuerequireddata[].last24h.revenue | number | US dollars as a JSON number (computed figure) |
perioddata[].period | any | The window the traffic figures cover |
trafficrequireddata[].traffic | object | - |
callsrequireddata[].traffic.calls | integer | - |
answeredrequireddata[].traffic.answered | integer | - |
minutesrequireddata[].traffic.minutes | number | - |
revenuerequireddata[].traffic.revenue | number | US dollars as a JSON number (computed figure) |
marginrequireddata[].traffic.margin | number | US dollars as a JSON number (computed figure) |
asrrequireddata[].traffic.asr | number | null | - |
pddMsrequireddata[].traffic.pddMs | number | null | - |
refusedrequireddata[].refused | object | - |
forbiddenrequireddata[].refused.forbidden | integer | - |
capacityrequireddata[].refused.capacity | integer | - |
capacityChannelsrequireddata[].refused.capacityChannels | integer | - |
capacityCpsrequireddata[].refused.capacityCps | 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. - 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.
Add a trunk to a Switch customer
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
If sipPassword is set it is echoed back ONCE in the response.
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 (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
label | string | -max 120 chars |
authMode | string | What the customer must present; the service refuses a mode the trunk is not configured forOne of ip, credentials, ip_and_credentials, registration, certificate |
sipUsername | string | null | -max 64 chars |
sipPassword | string | null | -max 64 chars |
maxConcurrentCalls | integer | null | -0 to 100000 |
maxCps | integer | null | -0 to 10000 |
markupPct | number | null | -0 to 10000 |
billingIncrement | string | null | -max 10 chars |
blockedPrefixes | string | null | -max 8000 chars |
status | string | -One of active, disabled |
mediaMode | string | -One of proxy, direct |
techPrefix | string | null | -max 24 chars |
cliRewrite | object | null | - |
modecliRewrite.mode | string | -One of pattern |
valuecliRewrite.value | string | -max 24 chars |
stripcliRewrite.strip | integer | -0 to 15 |
addcliRewrite.add | string | -max 12 chars |
matchcliRewrite.match | string | -max 200 chars |
replacecliRewrite.replace | string | -max 200 chars |
allowedPrefixes | string[] | null | - |
allowedCountries | string[] | null | - |
blockedCountries | string[] | null | - |
maxCallDurationSeconds | integer | null | -1 to 21600 |
requireCli | boolean | - |
allowedClis | string[] | null | - |
marginProtectionMode | string | -One of off, monitor, enforce |
minMarginPct | number | null | -0 to 99.999 |
minMarginAbs | number | null | -0 to 1000 |
maxLossPerMinute | number | null | -0 to 1000 |
dailyLossLimit | number | null | Warns only; never blocks0 to 10000000 |
dailyLossLimitPct | number | null | -0 to 100000 |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
subAccountIdrequireddata.subAccountId | string (uuid) | The customer this trunk belongs to |
labelrequireddata.label | string | - |
statusrequireddata.status | string | -One of active, disabled, archived |
authModedata.authMode | string | -One of ip, credentials, ip_and_credentials, registration, certificate |
sipUsernamerequireddata.sipUsername | string | null | - |
maxConcurrentCallsrequireddata.maxConcurrentCalls | integer | null | Null inherits the customer ceiling |
maxCpsrequireddata.maxCps | integer | null | - |
markupPctrequireddata.markupPct | string | null | - |
billingIncrementrequireddata.billingIncrement | string | null | - |
techPrefixrequireddata.techPrefix | string | null | - |
mediaModedata.mediaMode | string | -One of proxy, direct |
cliRewriterequireddata.cliRewrite | object | null | - |
allowedPrefixesrequireddata.allowedPrefixes | string[] | null | - |
allowedCountriesrequireddata.allowedCountries | string[] | null | - |
blockedCountriesrequireddata.blockedCountries | string[] | null | - |
createdAtrequireddata.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
sipPasswordrequireddata.sipPassword | 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 your Switch customers with live and 24-hour figures
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Every customer with trunk health, live calls, 24-hour traffic, credit used, primary contact and problem flags.
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string (uuid) | - |
labelrequireddata[].label | string | - |
sourcerequireddata[].source | string | -One of marketplace, external |
statusrequireddata[].status | string | -One of draft, active, suspended, closed |
externalRefrequireddata[].externalRef | string | null | - |
balancerequireddata[].balance | money | USD as a decimal string with exactly 6 places, e.g. "0.012500". |
creditLimitrequireddata[].creditLimit | string | USD decimal string as stored (2 decimal places), e.g. "5000.00" |
currencyrequireddata[].currency | string | null | - |
sipUsernamerequireddata[].sipUsername | string | null | - |
portalEmailrequireddata[].portalEmail | string | null | - |
createdAtrequireddata[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
trunkCountrequireddata[].trunkCount | integer | Trunks excluding archived ones |
trunksUprequireddata[].trunksUp | integer | - |
trunksDownrequireddata[].trunksDown | integer | - |
liveCallsrequireddata[].liveCalls | integer | - |
calls24hrequireddata[].calls24h | integer | - |
answered24hrequireddata[].answered24h | integer | - |
asr24hrequireddata[].asr24h | number | null | Percent; null when no calls ran (not 0) |
revenue24hrequireddata[].revenue24h | number | US dollars as a JSON number (computed figure) |
margin24hrequireddata[].margin24h | number | US dollars as a JSON number (computed figure) |
marginPct24hrequireddata[].marginPct24h | number | null | - |
pddMs24hrequireddata[].pddMs24h | number | null | - |
creditUsedPctrequireddata[].creditUsedPct | number | null | - |
contactrequireddata[].contact | object | null | - |
namerequireddata[].contact.name | string | - |
emailrequireddata[].contact.email | string | null | - |
phonerequireddata[].contact.phone | string | null | - |
attentionrequireddata[].attention | object | null | Open operational issues. Null means the check could not run, not that nothing is wrong. |
highestrequireddata[].attention.highest | string | null | - |
openrequireddata[].attention.open | integer | - |
unacknowledgedrequireddata[].attention.unacknowledged | integer | - |
refsrequireddata[].attention.refs | string[] | - |
setuprequireddata[].setup | object | - |
trunksrequireddata[].setup.trunks | integer | - |
enabledrequireddata[].setup.enabled | integer | - |
identifiedrequireddata[].setup.identified | integer | - |
routedrequireddata[].setup.routed | integer | - |
unroutedrequireddata[].setup.unrouted | integer | - |
refused24hrequireddata[].refused24h | object | - |
forbiddenrequireddata[].refused24h.forbidden | integer | - |
capacityrequireddata[].refused24h.capacity | integer | - |
flagsrequireddata[].flags | string[] | Filterable problem and state flags, e.g. "problem:no_traffic" |
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 Switch customer
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Creates the customer, a "Default" trunk carrying the same credentials and limits, an empty routing row, and the customer's first API key. The SIP password and API key are returned ONCE in this response.
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 |
|---|---|---|
labelrequired | string | -max 160 chars |
source | string | -One of marketplace, external |
status | string | -One of draft, active |
externalRef | string | null | -max 255 chars |
creditLimit | number | null | -min 0 |
markupPct | number | null | -0 to 100000 |
billingIncrement | string | null | -max 10 chars |
currency | string | null | -max 3 chars |
minMarginPct | number | null | -0 to 100000 |
marginFloorAction | string | null | -One of block, alert |
dailySpendCap | number | null | -min 0 |
maxConcurrentCalls | integer | null | -min 0 |
maxCps | integer | null | -min 0 |
blockedPrefixes | string[] | - |
portalEmail | string (email) | null | -max 255 chars |
taxCountry | string | null | -max 2 chars |
taxId | string | null | -max 64 chars |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
labelrequireddata.label | string | - |
sourcerequireddata.source | string | -One of marketplace, external |
statusrequireddata.status | string | -One of draft, active, suspended, closed |
externalRefrequireddata.externalRef | string | null | - |
balancerequireddata.balance | money | Prepaid wallet balance (negative = owed), 6-decimal USD string USD as a decimal string with exactly 6 places, e.g. "0.012500". |
creditLimitrequireddata.creditLimit | string | USD decimal string as stored (2 decimal places), e.g. "5000.00" |
currencyrequireddata.currency | string | null | - |
markupPctrequireddata.markupPct | string | null | Default markup over cost, percent as a decimal string |
billingIncrementrequireddata.billingIncrement | string | null | e.g. "60/60" or "6/6" |
minMarginPctrequireddata.minMarginPct | string | null | - |
marginFloorActionrequireddata.marginFloorAction | string | null | -One of block, alert |
dailySpendCaprequireddata.dailySpendCap | string | null | USD decimal string as stored (2 decimal places), e.g. "5000.00" |
maxConcurrentCallsrequireddata.maxConcurrentCalls | integer | null | - |
maxCpsrequireddata.maxCps | integer | null | - |
blockedPrefixesrequireddata.blockedPrefixes | string[] | null | - |
sipUsernamerequireddata.sipUsername | string | null | - |
portalEmailrequireddata.portalEmail | string | null | - |
taxCountryrequireddata.taxCountry | string | null | - |
taxIdrequireddata.taxId | string | null | - |
createdAtrequireddata.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
sipPasswordrequireddata.sipPassword | string | The inbound SIP password in plain text. Returned ONCE, here. |
defaultTrunkIdrequireddata.defaultTrunkId | string (uuid) | The "Default" trunk created with every customer |
apiKeyrequireddata.apiKey | string | The customer's first API key. Returned ONCE, here. |
apiKeyPrefixrequireddata.apiKeyPrefix | string | - |
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 Switch customer command-centre overview
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
KPIs, live traffic, quality, activity, setup state and data freshness in one read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
customerrequireddata.customer | object | - |
idrequireddata.customer.id | string (uuid) | - |
labelrequireddata.customer.label | string | - |
statusrequireddata.customer.status | string | -One of draft, active, suspended, closed |
sourcerequireddata.customer.source | string | - |
kpisrequireddata.kpis | object | Balance owed, wallet, credit used and today's traffic figures (numbers) |
commercialrequireddata.commercial | object | - |
activityrequireddata.activity | object[] | - |
topDestinationsTodayrequireddata.topDestinationsToday | object[] | - |
healthdata.health | any | - |
setupdata.setup | any | - |
reconciliationdata.reconciliation | any | - |
freshnessdata.freshness | any | - |
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.
Get a Switch customer
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Includes customer-level IP allow-list entries in ipAcls. The SIP password is never returned here; see the credentials endpoint.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
labelrequireddata.label | string | - |
sourcerequireddata.source | string | -One of marketplace, external |
statusrequireddata.status | string | -One of draft, active, suspended, closed |
externalRefrequireddata.externalRef | string | null | - |
balancerequireddata.balance | money | Prepaid wallet balance (negative = owed), 6-decimal USD string USD as a decimal string with exactly 6 places, e.g. "0.012500". |
creditLimitrequireddata.creditLimit | string | USD decimal string as stored (2 decimal places), e.g. "5000.00" |
currencyrequireddata.currency | string | null | - |
markupPctrequireddata.markupPct | string | null | Default markup over cost, percent as a decimal string |
billingIncrementrequireddata.billingIncrement | string | null | e.g. "60/60" or "6/6" |
minMarginPctrequireddata.minMarginPct | string | null | - |
marginFloorActionrequireddata.marginFloorAction | string | null | -One of block, alert |
dailySpendCaprequireddata.dailySpendCap | string | null | USD decimal string as stored (2 decimal places), e.g. "5000.00" |
maxConcurrentCallsrequireddata.maxConcurrentCalls | integer | null | - |
maxCpsrequireddata.maxCps | integer | null | - |
blockedPrefixesrequireddata.blockedPrefixes | string[] | null | - |
sipUsernamerequireddata.sipUsername | string | null | - |
sipPasswordSetrequireddata.sipPasswordSet | boolean | Whether an inbound SIP password is set. The value itself is only ever returned by the audited credentials endpoint. |
portalEmailrequireddata.portalEmail | string | null | - |
taxCountryrequireddata.taxCountry | string | null | - |
taxIdrequireddata.taxId | string | null | - |
createdAtrequireddata.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
ipAclsrequireddata.ipAcls | object[] | - |
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 Switch customer
PATCH/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Any field from create, all optional. A status change is applied as the matching lifecycle action, with the same guards and history entry as POST /lifecycle. 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
label | string | -max 160 chars |
source | string | -One of marketplace, external |
status | string | -One of draft, active, suspended, closed |
externalRef | string | null | -max 255 chars |
creditLimit | number | null | -min 0 |
markupPct | number | null | -0 to 100000 |
billingIncrement | string | null | -max 10 chars |
currency | string | null | -max 3 chars |
minMarginPct | number | null | -0 to 100000 |
marginFloorAction | string | null | -One of block, alert |
dailySpendCap | number | null | -min 0 |
maxConcurrentCalls | integer | null | -min 0 |
maxCps | integer | null | -min 0 |
blockedPrefixes | string[] | - |
portalEmail | string (email) | null | -max 255 chars |
taxCountry | string | null | -max 2 chars |
taxId | string | null | -max 64 chars |
statusReason | string | null | -max 2000 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
labelrequireddata.label | string | - |
sourcerequireddata.source | string | -One of marketplace, external |
statusrequireddata.status | string | -One of draft, active, suspended, closed |
externalRefrequireddata.externalRef | string | null | - |
balancerequireddata.balance | money | Prepaid wallet balance (negative = owed), 6-decimal USD string USD as a decimal string with exactly 6 places, e.g. "0.012500". |
creditLimitrequireddata.creditLimit | string | USD decimal string as stored (2 decimal places), e.g. "5000.00" |
currencyrequireddata.currency | string | null | - |
markupPctrequireddata.markupPct | string | null | Default markup over cost, percent as a decimal string |
billingIncrementrequireddata.billingIncrement | string | null | e.g. "60/60" or "6/6" |
minMarginPctrequireddata.minMarginPct | string | null | - |
marginFloorActionrequireddata.marginFloorAction | string | null | -One of block, alert |
dailySpendCaprequireddata.dailySpendCap | string | null | USD decimal string as stored (2 decimal places), e.g. "5000.00" |
maxConcurrentCallsrequireddata.maxConcurrentCalls | integer | null | - |
maxCpsrequireddata.maxCps | integer | null | - |
blockedPrefixesrequireddata.blockedPrefixes | string[] | null | - |
sipUsernamerequireddata.sipUsername | string | null | - |
sipPasswordSetrequireddata.sipPasswordSet | boolean | Whether an inbound SIP password is set. The value itself is only ever returned by the audited credentials endpoint. |
portalEmailrequireddata.portalEmail | string | null | - |
taxCountryrequireddata.taxCountry | string | null | - |
taxIdrequireddata.taxId | string | null | - |
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. - 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 draft Switch customer
DELETE/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Only for a customer that never carried traffic or held financial records. Offboard a real customer with the close lifecycle action instead.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
deletedrequireddata.deleted | boolean | -One of true |
idrequireddata.id | string (uuid) | - |
labelrequireddata.label | string | - |
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
Get a Switch customer lifecycle state and financial position
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Which lifecycle actions are available now, live calls, trunk counts, recent history and the money position a close or suspend would leave.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
customerrequireddata.customer | object | - |
idrequireddata.customer.id | string (uuid) | - |
labelrequireddata.customer.label | string | - |
statusrequireddata.customer.status | string | -One of draft, active, suspended, closed |
sourcerequireddata.customer.source | string | - |
createdAtrequireddata.customer.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
availablerequireddata.available | string[] | Actions allowed from the current stateOne of activate, suspend, reactivate, close, reopen |
liveCallsrequireddata.liveCalls | integer | - |
trunksrequireddata.trunks | object | - |
totalrequireddata.trunks.total | integer | - |
activerequireddata.trunks.active | integer | - |
historyrequireddata.history | object[] | - |
idrequireddata.history[].id | string | - |
atrequireddata.history[].at | string (date-time) | ISO-8601 timestamp (UTC) |
actionrequireddata.history[].action | string | - |
fromrequireddata.history[].from | string | null | - |
torequireddata.history[].to | string | null | - |
reasonrequireddata.history[].reason | string | null | - |
actorrequireddata.history[].actor | string | null | Email of whoever did it |
detailrequireddata.history[].detail | object | - |
financialsrequireddata.financials | object | - |
currencyrequireddata.financials.currency | string | - |
prepaidBalancerequireddata.financials.prepaidBalance | number | US dollars as a JSON number (computed figure) |
invoicesOutstandingrequireddata.financials.invoicesOutstanding | number | US dollars as a JSON number (computed figure) |
invoicesOverduerequireddata.financials.invoicesOverdue | number | US dollars as a JSON number (computed figure) |
creditNotesOpenrequireddata.financials.creditNotesOpen | number | US dollars as a JSON number (computed figure) |
unbilledUsagerequireddata.financials.unbilledUsage | number | US dollars as a JSON number (computed figure) |
creditLimitrequireddata.financials.creditLimit | number | US dollars as a JSON number (computed figure) |
openInvoiceCountrequireddata.financials.openInvoiceCount | integer | - |
paidInvoiceCountrequireddata.financials.paidInvoiceCount | integer | - |
paymentCountrequireddata.financials.paymentCount | integer | - |
hasOpenPositionrequireddata.financials.hasOpenPosition | boolean | - |
canDeleterequireddata.canDelete | boolean | - |
deleteBlockersrequireddata.deleteBlockers | 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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Activate, suspend, reactivate, close or reopen a Switch customer
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The one write path for a customer's state. Live calls keep talking unless disconnectLiveCalls is true. 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
actionrequired | string | -One of activate, suspend, reactivate, close, reopen |
reason | string | null | -max 2000 chars |
disconnectLiveCalls | boolean | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
labelrequireddata.label | string | - |
statusrequireddata.status | string | -One of draft, active, suspended, closed |
previousStatusrequireddata.previousStatus | string | -One of draft, active, suspended, closed |
actionrequireddata.action | string | - |
liveCallsAtChangerequireddata.liveCallsAtChange | integer | - |
disconnectedLiveCallsrequireddata.disconnectedLiveCalls | boolean | - |
disconnectIncompletedata.disconnectIncomplete | boolean | - |
apiKeysRevokeddata.apiKeysRevoked | integer | - |
financialsUnchangedrequireddata.financialsUnchanged | 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
List a Switch customer lifecycle history
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 (uuid) | - |
limit | query | integer | Default 50 |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | Same fields as SwitchCustomerLifecycleEntry, 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.
Rotate a Switch customer inbound SIP password
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Generates a new password and returns it ONCE. The old password stops working 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 (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
sipUsernamerequireddata.sipUsername | string | null | - |
sipPasswordrequireddata.sipPassword | 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
Reveal a Switch customer inbound SIP credentials
GET/
- 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchCustomerSipCredentials, 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.
List what needs attention on a Switch customer
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
A compact projection of the customer's open operational issues: quality, margin, credit and setup problems.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
kindrequireddata[].kind | string | -One of quality, commercial, credit, config, setup |
titlerequireddata[].title | string | - |
detailrequireddata[].detail | string | - |
atrequireddata[].at | string | - |
actionablerequireddata[].actionable | boolean | - |
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.
List operational issues on a Switch customer
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The full issue records behind the attention feed, with trigger, recovery rule, evidence and ownership.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
refrequireddata[].ref | string | Issue reference, e.g. OPS-1042 |
detectorrequireddata[].detector | string | - |
severityrequireddata[].severity | string | - |
statusrequireddata[].status | string | - |
titlerequireddata[].title | string | - |
summaryrequireddata[].summary | string | - |
triggerrequireddata[].trigger | string | - |
recoveryrequireddata[].recovery | string | - |
sampleSizerequireddata[].sampleSize | number | - |
evidencerequireddata[].evidence | object[] | - |
labelrequireddata[].evidence[].label | string | - |
valuerequireddata[].evidence[].value | string | - |
firstDetectedAtrequireddata[].firstDetectedAt | string | - |
lastDetectedAtrequireddata[].lastDetectedAt | string | - |
acknowledgedAtrequireddata[].acknowledgedAt | string | null | - |
resolvedAtrequireddata[].resolvedAt | 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.
List a Switch customer contacts
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Ordered by role, then priority. A contact is a person to reach, never a login.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string (uuid) | - |
subAccountIdrequireddata[].subAccountId | string (uuid) | - |
namerequireddata[].name | string | - |
rolerequireddata[].role | string | -One of technical, noc, billing, escalation, commercial |
emailrequireddata[].email | string | null | - |
phonerequireddata[].phone | string | null | - |
priorityrequireddata[].priority | integer | 1 = try first within this role |
isPrimaryrequireddata[].isPrimary | boolean | - |
preferredMethodrequireddata[].preferredMethod | string | -One of email, phone, either |
availabilityrequireddata[].availability | string | null | -One of 24x7, business_hours, on_call |
timezonerequireddata[].timezone | string | null | - |
notesrequireddata[].notes | string | null | - |
createdAtrequireddata[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata[].updatedAt | 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. - 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.
Add a Switch customer contact
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 (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
namerequired | string | -max 200 chars |
rolerequired | string | -One of technical, noc, billing, escalation, commercial |
email | string (email) | null | -max 255 chars |
phone | string | null | -max 48 chars |
priority | integer | -1 to 99 |
isPrimary | boolean | - |
preferredMethod | string | -One of email, phone, either |
availability | string | null | -One of 24x7, business_hours, on_call |
timezone | string | null | -max 64 chars |
notes | string | null | -max 2000 chars |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchCustomerContact, 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
Update a Switch customer contact
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 (uuid) | - |
contactIdrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
name | string | -max 200 chars |
role | string | -One of technical, noc, billing, escalation, commercial |
email | string (email) | null | -max 255 chars |
phone | string | null | -max 48 chars |
priority | integer | -1 to 99 |
isPrimary | boolean | - |
preferredMethod | string | -One of email, phone, either |
availability | string | null | -One of 24x7, business_hours, on_call |
timezone | string | null | -max 64 chars |
notes | string | null | -max 2000 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchCustomerContact, 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 Switch customer contact
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 (uuid) | - |
contactIdrequired | path | string (uuid) | - |
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
List internal notes on a Switch customer
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Operator-private notes with the author name. Never visible to the customer.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string (uuid) | - |
subAccountIdrequireddata[].subAccountId | string (uuid) | - |
bodyrequireddata[].body | string | - |
typerequireddata[].type | string | -One of general, technical, billing, warning |
pinnedrequireddata[].pinned | boolean | - |
followUpAtrequireddata[].followUpAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
createdByrequireddata[].createdBy | string (uuid) | null | - |
createdAtrequireddata[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata[].updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
authorNamerequireddata[].authorName | 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.
Add an internal note to a Switch customer
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 (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
bodyrequired | string | -max 4000 chars |
type | string | -One of general, technical, billing, warning |
pinned | boolean | - |
followUpAt | string (date-time) | null | - |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
subAccountIdrequireddata.subAccountId | string (uuid) | - |
bodyrequireddata.body | string | - |
typerequireddata.type | string | -One of general, technical, billing, warning |
pinnedrequireddata.pinned | boolean | - |
followUpAtrequireddata.followUpAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
createdByrequireddata.createdBy | string (uuid) | null | - |
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. - 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
Edit, pin or flag a Switch customer note
PATCH/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The author and creation time never change.
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 (uuid) | - |
noteIdrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
body | string | -max 4000 chars |
type | string | -One of general, technical, billing, warning |
pinned | boolean | - |
followUpAt | string (date-time) | null | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchCustomerNote, 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 Switch customer note
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 (uuid) | - |
noteIdrequired | path | string (uuid) | - |
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
Get per-destination quality for a Switch customer
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
ASR, NER and PDD per destination over a window, with verdicts. The KPI row and the table are both computed from the same filtered set.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
window | query | integer | Hours: 1, 24 or 168. Default 24 |
from | query | string | Explicit window start (ISO-8601); overrides window |
to | query | string | Explicit window end (ISO-8601) |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
windowHoursrequireddata.windowHours | number | - |
windowrequireddata.window | object | - |
fromrequireddata.window.from | string (date-time) | ISO-8601 timestamp (UTC) |
torequireddata.window.to | string (date-time) | ISO-8601 timestamp (UTC) |
labelrequireddata.window.label | string | - |
destinationDigitsrequireddata.destinationDigits | integer | - |
kpisrequireddata.kpis | object | - |
callsrequireddata.kpis.calls | integer | - |
answeredrequireddata.kpis.answered | integer | - |
asrrequireddata.kpis.asr | number | null | - |
nerrequireddata.kpis.ner | number | null | - |
destinationsrequireddata.destinations | object[] | - |
prefixrequireddata.destinations[].prefix | string | - |
callsrequireddata.destinations[].calls | integer | - |
answeredrequireddata.destinations[].answered | integer | - |
asrrequireddata.destinations[].asr | number | null | - |
nerrequireddata.destinations[].ner | number | null | - |
healthrequireddata.destinations[].health | string | - |
thresholdsdata.thresholds | any | - |
minJudgeableSessionsrequireddata.minJudgeableSessions | integer | - |
supportsrequireddata.supports | string[] | Call Records filter ids this view honours |
unsupportedrequireddata.unsupported | any[] | Filters you sent that this view could not apply |
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.
Drill into one destination for a Switch customer
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Which customer trunks sent it, which supplier trunks carried it, which route groups send it there, and how far the sessions got. Uses the same window and filters as the quality table.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
window | query | integer | Hours: 1, 24 or 168. Default 24 |
from | query | string | Explicit window start (ISO-8601); overrides window |
to | query | string | Explicit window end (ISO-8601) |
prefixrequired | query | string | The destination prefix to open |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
windowHoursrequireddata.windowHours | number | - |
windowrequireddata.window | object | - |
fromrequireddata.window.from | string (date-time) | ISO-8601 timestamp (UTC) |
torequireddata.window.to | string (date-time) | ISO-8601 timestamp (UTC) |
labelrequireddata.window.label | string | - |
destinationDigitsrequireddata.destinationDigits | 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. - 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.
Get a Switch customer receivables summary
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
What is owed, unbilled and unrated, payments recorded and ageing. Credit headroom is a separate endpoint (credit-position).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
balanceOwedrequireddata.balanceOwed | number | Open invoices less open credit notes |
grossBalanceOwedrequireddata.grossBalanceOwed | number | US dollars as a JSON number (computed figure) |
creditNotesOpenrequireddata.creditNotesOpen | number | US dollars as a JSON number (computed figure) |
paymentsRecordedrequireddata.paymentsRecorded | number | US dollars as a JSON number (computed figure) |
creditLimitrequireddata.creditLimit | number | US dollars as a JSON number (computed figure) |
unbilledRatedrequireddata.unbilledRated | number | US dollars as a JSON number (computed figure) |
unbilledSinceLastInvoicerequireddata.unbilledSinceLastInvoice | number | US dollars as a JSON number (computed figure) |
unratedUsagerequireddata.unratedUsage | object | - |
callsrequireddata.unratedUsage.calls | integer | - |
minutesrequireddata.unratedUsage.minutes | number | null | - |
noterequireddata.unratedUsage.note | string | - |
overdueIsSubsetOfOpenInvoicesrequireddata.overdueIsSubsetOfOpenInvoices | boolean | -One of true |
disputedrequireddata.disputed | enum | null | Customer-side disputes are not recorded, so always nullOne of null |
avgDaysToPayrequireddata.avgDaysToPay | number | null | - |
lastInvoicePeriodEndrequireddata.lastInvoicePeriodEnd | string (date-time) | null | ISO-8601 timestamp (UTC) |
currencyrequireddata.currency | string | - |
agingrequireddata.aging | object | - |
currentrequireddata.aging.current | number | US dollars as a JSON number (computed figure) |
d1_30requireddata.aging.d1_30 | number | US dollars as a JSON number (computed figure) |
d31_60requireddata.aging.d31_60 | number | US dollars as a JSON number (computed figure) |
d61_90requireddata.aging.d61_90 | number | US dollars as a JSON number (computed figure) |
d90_plusrequireddata.aging.d90_plus | number | US dollars as a JSON number (computed figure) |
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.
Get a Switch customer credit position
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Credit limit, exposure, funds reserved by live calls, available credit and whether the next call would be admitted. Read-only; it reports the admission arithmetic without performing it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
customerIdrequireddata.customerId | string (uuid) | - |
labelrequireddata.label | string | - |
currencyrequireddata.currency | string | - |
moderequireddata.mode | string | prepaid or postpaid, derived from the credit limit |
creditLimitrequireddata.creditLimit | object | - |
valuerequireddata.creditLimit.value | number | US dollars as a JSON number (computed figure) |
ambiguousrequireddata.creditLimit.ambiguous | string | null | - |
exposurerequireddata.exposure | number | US dollars as a JSON number (computed figure) |
balancerequireddata.balance | number | US dollars as a JSON number (computed figure) |
reservationsrequireddata.reservations | object | - |
amountrequireddata.reservations.amount | number | US dollars as a JSON number (computed figure) |
callsrequireddata.reservations.calls | integer | - |
enforcedrequireddata.reservations.enforced | boolean | - |
basisrequireddata.reservations.basis | string | - |
availableCreditrequireddata.availableCredit | number | US dollars as a JSON number (computed figure) |
availableAfterReservationsrequireddata.availableAfterReservations | number | US dollars as a JSON number (computed figure) |
admitsNextCallrequireddata.admitsNextCall | boolean | - |
usedPctrequireddata.usedPct | number | null | - |
overCommittedrequireddata.overCommitted | boolean | - |
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.
Preview how a payment would be allocated to invoices
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 (uuid) | - |
amount | query | number | USD amount to preview |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
billingModerequireddata.billingMode | string | - |
currencyrequireddata.currency | string | - |
wouldAllocaterequireddata.wouldAllocate | object[] | - |
invoiceIdrequireddata.wouldAllocate[].invoiceId | string (uuid) | - |
invoiceNumberrequireddata.wouldAllocate[].invoiceNumber | string | - |
appliedrequireddata.wouldAllocate[].applied | number | US dollars as a JSON number (computed figure) |
clearsInvoicerequireddata.wouldAllocate[].clearsInvoice | boolean | - |
wouldLeaveUnappliedrequireddata.wouldLeaveUnapplied | number | US dollars as a JSON number (computed figure) |
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.
Record a payment received from a Switch customer
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Safe retries
- Send
X-Idempotency-Key; a replay within 24 hours returns the first response. - Moves money
- Records or reverses a payment on a Switch customer ledger.
Records money the customer already paid you (nothing is collected). It credits the wallet and pays open invoices oldest-due first in one transaction; anything left is held unapplied.
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 (uuid) | - |
X-Idempotency-Key | header | string | Any unique string (a UUID is ideal). Replays within 24 hours return the first response instead of acting twice. |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
amountrequired | number | USDmin 0 |
reference | string | null | Bank or remittance reference, for matching latermax 160 chars |
method | string | null | -max 32 chars |
paidAt | string | null | When the money was received (ISO-8601); default now |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
kindrequireddata.kind | string | -One of payment |
transactionIdrequireddata.transactionId | string (uuid) | - |
amountrequireddata.amount | number | US dollars as a JSON number (computed figure) |
currencyrequireddata.currency | string | - |
postedAtrequireddata.postedAt | string (date-time) | ISO-8601 timestamp (UTC) |
externalReferencerequireddata.externalReference | string | null | - |
methodrequireddata.method | string | null | - |
operatorLabelrequireddata.operatorLabel | string | null | - |
billingModerequireddata.billingMode | string | - |
allocationsrequireddata.allocations | object[] | Oldest-due invoices first |
invoiceIdrequireddata.allocations[].invoiceId | string (uuid) | - |
invoiceNumberrequireddata.allocations[].invoiceNumber | string | - |
appliedrequireddata.allocations[].applied | number | US dollars as a JSON number (computed figure) |
outstandingAfterrequireddata.allocations[].outstandingAfter | number | US dollars as a JSON number (computed figure) |
statusrequireddata.allocations[].status | string | - |
unappliedrequireddata.unapplied | number | Left on account after paying every open invoice |
positionAfterrequireddata.positionAfter | object | - |
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
Reverse a recorded Switch customer payment
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Moves money
- Records or reverses a payment on a Switch customer ledger.
A posted payment is never edited or deleted. This posts a linked reversal and unwinds its invoice allocations; both entries stay on the record.
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 (uuid) | - |
transactionIdrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
reasonrequired | string | -max 500 chars |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
kindrequireddata.kind | string | -One of reversal |
reversesTransactionIdrequireddata.reversesTransactionId | string (uuid) | - |
transactionIdrequireddata.transactionId | string (uuid) | - |
amountrequireddata.amount | number | US dollars as a JSON number (computed figure) |
currencyrequireddata.currency | string | - |
reasonrequireddata.reason | string | - |
unwoundrequireddata.unwound | object[] | - |
positionAfterrequireddata.positionAfter | object | - |
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 an invoice for a Switch customer unbilled period
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The period runs from the last invoice's end (or the customer's creation) to now. Issues nothing; returns a reviewToken for generate-invoice.
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 (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
notes | string | null | -max 2000 chars |
includeBroughtForward | boolean | - |
applyCredits | boolean | - |
excludeUnrated | object | null | Issue despite unrated usage in the period, with the reason recorded on the invoice |
reasonrequiredexcludeUnrated.reason | string | -max 2000 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
customerrequireddata.customer | object | - |
idrequireddata.customer.id | string (uuid) | - |
labelrequireddata.customer.label | string | - |
legalNamerequireddata.customer.legalName | string | - |
currencyrequireddata.customer.currency | string | - |
periodrequireddata.period | object | - |
dueDaterequireddata.dueDate | string | - |
paymentTermsDaysrequireddata.paymentTermsDays | integer | - |
currencyrequireddata.currency | string | - |
usagerequireddata.usage | object | - |
unratedrequireddata.unrated | object | Usage that has no price yet; blocks issue unless excluded |
reviewTokenrequireddata.reviewToken | string | Pass to generate-invoice to issue exactly what was reviewed |
reviewDigestrequireddata.reviewDigest | string | - |
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
Issue the reviewed invoice for a Switch customer
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Requires the reviewToken from invoice-preview; refused with 409 INVOICE_REVIEW_STALE if the data changed since, or INVOICE_UNRATED_USAGE if unrated usage remains and was not excluded.
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 (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
notes | string | null | -max 2000 chars |
includeBroughtForward | boolean | - |
applyCredits | boolean | - |
excludeUnrated | object | null | Issue despite unrated usage in the period, with the reason recorded on the invoice |
reasonrequiredexcludeUnrated.reason | string | -max 2000 chars |
reviewTokenrequired | string | -max 120 chars |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
invoiceNumberrequireddata.invoiceNumber | string | - |
customerIdrequireddata.customerId | string (uuid) | - |
statusrequireddata.status | string | - |
subtotalrequireddata.subtotal | money | USD as a decimal string with exactly 6 places, e.g. "0.012500". |
totalrequireddata.total | money | USD as a decimal string with exactly 6 places, e.g. "0.012500". |
currencyrequireddata.currency | string | - |
periodStartrequireddata.periodStart | string (date-time) | ISO-8601 timestamp (UTC) |
periodEndrequireddata.periodEnd | string (date-time) | ISO-8601 timestamp (UTC) |
issueDaterequireddata.issueDate | string (date-time) | null | ISO-8601 timestamp (UTC) |
dueDaterequireddata.dueDate | string (date-time) | null | ISO-8601 timestamp (UTC) |
linesrequireddata.lines | object[] | - |
reviewDigestrequireddata.reviewDigest | 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
INVOICE_REVIEW_STALE,INVOICE_UNRATED_USAGE,STALE_WRITE
Get a Switch customer billing profile
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
profile is what was entered (null if none); resolved is what an invoice issued now would freeze, including fallbacks.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
profilerequireddata.profile | object | null | - |
idrequireddata.profile.id | string (uuid) | - |
legalNamerequireddata.profile.legalName | string | - |
versionrequireddata.profile.version | integer | Bumped on every save; frozen onto invoices issued afterwards |
updatedAtrequireddata.profile.updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
resolvedrequireddata.resolved | object | - |
sourcerequireddata.resolved.source | string | -One of profile, fallback |
profileIdrequireddata.resolved.profileId | string (uuid) | null | - |
profileVersionrequireddata.resolved.profileVersion | integer | null | - |
customerrequireddata.resolved.customer | object | - |
billingAddressrequireddata.resolved.billingAddress | object | null | - |
issuerrequireddata.resolved.issuer | object | - |
termsrequireddata.resolved.terms | object | - |
currencyrequireddata.resolved.terms.currency | string | - |
billingCyclerequireddata.resolved.terms.billingCycle | string | null | - |
billingTimezonerequireddata.resolved.terms.billingTimezone | string | - |
paymentTermsDaysrequireddata.resolved.terms.paymentTermsDays | integer | - |
purchaseOrderRefrequireddata.resolved.terms.purchaseOrderRef | string | null | - |
paymentInstructionsrequireddata.resolved.terms.paymentInstructions | string | null | - |
recipientsdata.resolved.recipients | any | - |
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.
Save a Switch customer billing profile
PUT/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The customer's legal and billing identity. Frozen onto invoices issued afterwards; never changes an invoice already issued. 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
legalName | string | -max 200 chars |
tradingName | string | null | -max 200 chars |
registrationNumber | string | null | -max 64 chars |
addressLine1 | string | null | -max 200 chars |
addressLine2 | string | null | -max 200 chars |
city | string | null | -max 120 chars |
region | string | null | -max 120 chars |
postcode | string | null | -max 32 chars |
country | string | null | -max 2 chars |
billingAddressLine1 | string | null | -max 200 chars |
billingAddressLine2 | string | null | -max 200 chars |
billingCity | string | null | -max 120 chars |
billingRegion | string | null | -max 120 chars |
billingPostcode | string | null | -max 32 chars |
billingCountry | string | null | -max 2 chars |
taxCountry | string | null | -max 2 chars |
taxId | string | null | -max 64 chars |
taxTreatment | string | null | -One of standard, reverse_charge, zero_rated, exempt |
invoiceCurrency | string | -max 3 chars |
billingCycle | string | null | -One of weekly, biweekly, monthly, manual |
billingTimezone | string | -max 64 chars |
paymentTermsDays | integer | null | -0 to 365 |
purchaseOrderRef | string | null | -max 64 chars |
invoiceRecipients | string (email)[] | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchCustomerBillingProfile, 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
Get a Switch customer default sell deck and each trunk's deck
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
An unknown customer answers 404 NOT_FOUND.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
customerIdrequireddata.customerId | string (uuid) | - |
customerLabelrequireddata.customerLabel | string | - |
defaultDeckrequireddata.defaultDeck | object | null | - |
idrequireddata.defaultDeck.id | string (uuid) | - |
namerequireddata.defaultDeck.name | string | - |
versionrequireddata.defaultDeck.version | integer | - |
statusrequireddata.defaultDeck.status | string | - |
currencyrequireddata.defaultDeck.currency | string | - |
isSystemDefaultrequireddata.defaultDeck.isSystemDefault | boolean | - |
defaultRatePerUnitrequireddata.defaultDeck.defaultRatePerUnit | number | null | USD per minute for destinations the deck does not list; null = refuse them |
chargingrequireddata.defaultDeck.charging | object | - |
systemDefaultrequireddata.systemDefault | object | null | Same fields as SwitchCustomerSellDeckRef, shown earlier on this page. |
trunksrequireddata.trunks | object[] | - |
effectiverequireddata.trunks[].effective | object | - |
deckrequireddata.trunks[].effective.deck | object | null | Same fields as SwitchCustomerSellDeckRef, shown earlier on this page. |
moderequireddata.trunks[].effective.mode | string | - |
choicerequireddata.trunks[].effective.choice | string | Which rule won: the trunk, the customer default or the system default |
bypassesCustomerDefaultrequireddata.trunks[].effective.bypassesCustomerDefault | boolean | - |
customerDefaultrequireddata.trunks[].effective.customerDefault | object | null | Same fields as SwitchCustomerSellDeckRef, shown earlier on this page. |
systemDefaultrequireddata.trunks[].effective.systemDefault | object | null | Same fields as SwitchCustomerSellDeckRef, shown earlier on this page. |
liveRowCountrequireddata.trunks[].effective.liveRowCount | integer | - |
explanationrequireddata.trunks[].effective.explanation | string | - |
problemrequireddata.trunks[].effective.problem | string | null | - |
trunksDisagreerequireddata.trunksDisagree | boolean | - |
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.
Set a Switch customer default sell deck
PUT/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Without confirm: true nothing changes: the response lists the trunks whose prices would change. With it, the deck is assigned and trunks that follow the customer default reprice 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
deckId | string (uuid) | null | null clears the default |
confirm | boolean | - |
reason | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
changeddata.changed | boolean | -One of true |
wouldChangedata.wouldChange | object | - |
trunksrequireddata.wouldChange.trunks | string[] | - |
messagerequireddata.wouldChange.message | string | - |
trunksdata.trunks | 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. - Also
STALE_WRITE
Email a Switch customer a portal sign-in link
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Sends email
- Sends an email to a third party.
Sends a magic sign-in link to the customer's portal email. With no portal email set it answers 400 VALIDATION_ERROR.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
sentrequireddata.sent | boolean | -One of true |
torequireddata.to | string | - |
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 a Switch customer sell rates with buy cost and margin
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 (uuid) | - |
search | query | string | Prefix or destination text |
limit | query | integer | - |
offset | query | integer | - |
view | query | string | Default currentOne of current, scheduled, discontinued, expiring, all |
origin | query | string | -One of any, origin_only, destination_only |
increment | query | string | -One of any, custom, inherited |
cost | query | string | -One of any, missing |
margin | query | string | -One of any, thin, negative |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
rowsrequireddata.rows | object[] | - |
idrequireddata.rows[].id | string (uuid) | - |
subAccountIdrequireddata.rows[].subAccountId | string (uuid) | - |
customerTrunkIdrequireddata.rows[].customerTrunkId | string (uuid) | null | - |
prefixrequireddata.rows[].prefix | string | - |
originPrefixrequireddata.rows[].originPrefix | string | "" = any origin |
ratePerUnitrequireddata.rows[].ratePerUnit | money | Sell price per minute, 6-decimal USD string USD as a decimal string with exactly 6 places, e.g. "0.012500". |
billingIncrementrequireddata.rows[].billingIncrement | string | null | - |
statusrequireddata.rows[].status | string | active, pending (scheduled) or discontinued |
effectiveFromrequireddata.rows[].effectiveFrom | string (date-time) | ISO-8601 timestamp (UTC) |
endDaterequireddata.rows[].endDate | string (date-time) | null | ISO-8601 timestamp (UTC) |
buyCostrequireddata.rows[].buyCost | number | null | Best eligible buy cost per minute (USD number); null = no supplier prices it |
marginPctrequireddata.rows[].marginPct | number | null | - |
thinrequireddata.rows[].thin | boolean | - |
negativerequireddata.rows[].negative | boolean | - |
costSupplierrequireddata.rows[].costSupplier | string | null | - |
costSourcerequireddata.rows[].costSource | string | - |
costMatchedPrefixrequireddata.rows[].costMatchedPrefix | string | null | - |
costNoterequireddata.rows[].costNote | string | null | - |
totalrequireddata.total | integer | - |
totalIsPageScopedrequireddata.totalIsPageScoped | boolean | True when a cost or margin filter narrowed the page, so total counts this page only |
limitrequireddata.limit | integer | - |
offsetrequireddata.offset | integer | - |
viewrequireddata.view | string | - |
summaryrequireddata.summary | object | - |
prefixesrequireddata.summary.prefixes | integer | - |
blendedMarginPctrequireddata.summary.blendedMarginPct | number | null | - |
thinCountrequireddata.summary.thinCount | integer | - |
negativeCountrequireddata.summary.negativeCount | integer | - |
defaultRateCostCountrequireddata.summary.defaultRateCostCount | integer | - |
unpricedCountrequireddata.summary.unpricedCount | integer | - |
basisdata.basis | any | - |
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.
Add or replace one Switch customer sell rate
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Takes effect now on the customer's default trunk. Use the per-trunk rate endpoints to price a specific trunk.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
prefixrequired | string | -max 24 chars |
raterequired | number | USD per minutemin 0 |
origin | string | -max 24 chars |
billingIncrement | string | -max 10 chars |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
subAccountIdrequireddata.subAccountId | string (uuid) | - |
customerTrunkIdrequireddata.customerTrunkId | string (uuid) | null | - |
prefixrequireddata.prefix | string | - |
originPrefixrequireddata.originPrefix | string | "" = any origin |
ratePerUnitrequireddata.ratePerUnit | money | Sell price per minute, 6-decimal USD string USD as a decimal string with exactly 6 places, e.g. "0.012500". |
billingIncrementrequireddata.billingIncrement | string | null | - |
statusrequireddata.status | string | active, pending (scheduled) or discontinued |
effectiveFromrequireddata.effectiveFrom | string (date-time) | ISO-8601 timestamp (UTC) |
endDaterequireddata.endDate | string (date-time) | null | 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. - 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
Count a Switch customer sell rates by view
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 (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
currentrequireddata.current | integer | - |
scheduledrequireddata.scheduled | integer | - |
expiringrequireddata.expiring | integer | - |
discontinuedrequireddata.discontinued | integer | - |
allrequireddata.all | 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. - 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.
List upcoming sell-rate starts and ends for a Switch customer
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 (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string (uuid) | - |
subAccountIdrequireddata[].subAccountId | string (uuid) | - |
customerTrunkIdrequireddata[].customerTrunkId | string (uuid) | null | - |
prefixrequireddata[].prefix | string | - |
originPrefixrequireddata[].originPrefix | string | "" = any origin |
ratePerUnitrequireddata[].ratePerUnit | money | Sell price per minute, 6-decimal USD string USD as a decimal string with exactly 6 places, e.g. "0.012500". |
billingIncrementrequireddata[].billingIncrement | string | null | - |
statusrequireddata[].status | string | active, pending (scheduled) or discontinued |
effectiveFromrequireddata[].effectiveFrom | string (date-time) | ISO-8601 timestamp (UTC) |
endDaterequireddata[].endDate | string (date-time) | null | ISO-8601 timestamp (UTC) |
kindrequireddata[].kind | string | -One of starts, ends |
atrequireddata[].at | string (date-time) | null | 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. - 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.
Get a Switch customer rate-change notice period and what is queued
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The notice period you give this customer before a sell-rate increase takes effect, how many sell-rate changes are queued behind it, and who a notice email would go to by default (commercial contacts, then billing contacts, then the portal email; at most 5). Needs the rates.view permission. An unknown customer, or one that is not yours, answers 404.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
rateNoticeDaysrequireddata.rateNoticeDays | integer | Days of notice before a sell-rate increase takes effect; 0 = none |
queuedrequireddata.queued | integer | Sell-rate changes queued and not yet in effect |
increasesrequireddata.increases | integer | How many of the queued changes are increases |
nextEffectiveFromrequireddata.nextEffectiveFrom | string (date-time) | null | When the soonest queued change takes effect |
defaultRecipientsrequireddata.defaultRecipients | string[] | Who a notice goes to when you do not name recipients |
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.
Set a Switch customer rate-change notice period
PUT/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
With a notice period, a rise on any of this customer's prices (hand edit, bulk paste, sheet import, markup, sell-deck publish or assignment) is queued and takes effect that many days out, at the next 00:00 UTC; decreases and new destinations still apply at once. 0 = every change applies immediately. The new period applies to rises written from now on; changes already queued keep their dates. Needs the rates.publish permission; the change is audited. 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
rateNoticeDaysrequired | integer | Whole days of notice before an increase takes effect; 0 = none0 to 365 |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
rateNoticeDaysrequireddata.rateNoticeDays | integer | -0 to 365 |
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 a Switch customer queued sell-rate changes
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Every sell-rate change queued for this customer and not yet in effect, with the rate in force today beside it. Soonest first, then by prefix; at most 50,000 rows. The same rows as the CSV the customer receives.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
trunkId | query | string (uuid) | Only this trunk's changes |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
trunkrequireddata[].trunk | string | The customer trunk's label ("" when it has none) |
prefixrequireddata[].prefix | string | - |
originrequireddata[].origin | string | Origin prefix for origin-based pricing; "" when the rate applies from any origin |
currentRaterequireddata[].currentRate | money | null | The rate in force today; null for a new destination USD as a decimal string with exactly 6 places, e.g. "0.012500". |
newRaterequireddata[].newRate | money | USD as a decimal string with exactly 6 places, e.g. "0.012500". |
changePctrequireddata[].changePct | number | null | Percentage move, 2 decimals; null for a new destination |
currentIncrementrequireddata[].currentIncrement | string | null | - |
newIncrementrequireddata[].newIncrement | string | null | - |
effectiveFromrequireddata[].effectiveFrom | 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. - 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.
Download a Switch customer queued sell-rate changes as CSV
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The list from GET /switch/customers/{id}/sell-rates/notice/changes as the CSV the customer receives, for you to check or forward.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
trunkId | query | string (uuid) | Only this trunk's changes |
Response 200 (text/csv)
An attachment named rate-changes-<customer id>.csv. Columns: trunk, prefix, origin, current_rate, new_rate, change_pct, current_increment, new_increment, effective_from_utc. current_rate is empty for a new destination.
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.
Email a Switch customer a rate-change notice
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Sends email
- Sends an email to a third party.
Emails the customer every queued change with its effective date: a table of the first 100 in the message and the full list (up to 5,000 rows) as CSV in the text part. The email is white-label: it is sent under your brand, replies go to your own support address, and it does not mention PacketExchange. Recipients are to when given (up to 10), otherwise the default recipients from GET .../sell-rates/notice. Answers 400 VALIDATION_ERROR when there are no queued changes, when trunkId is not one of this customer's trunks, or when there is no one to send to. A recipient the mail service refused is listed in failed, not raised as an error. Needs the rates.publish permission; the send is audited. 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
trunkId | string (uuid) | null | Only this trunk's changes; omit for every trunk of the customer |
to | string (email)[] | Recipients; omit to use the default recipients |
message | string | A note of your own, added under the introductionmax 2000 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
sentrequireddata.sent | string[] | Addresses the notice was accepted for |
failedrequireddata.failed | string[] | Addresses the mail service refused |
rowsrequireddata.rows | integer | Changes in the notice |
increasesrequireddata.increases | integer | - |
decreasesrequireddata.decreases | integer | - |
addedrequireddata.added | integer | New destinations (no rate today) |
firstEffectiveFromrequireddata.firstEffectiveFrom | string (date-time) | The earliest effective date in the notice |
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 discontinuing a Switch customer whole sell deck
POST/
- 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
effectiveFrom | string | An instant with offset, e.g. "2026-10-01T00:00:00Z". A bare date is refused.max 40 chars |
effectiveLocal | string | A wall-clock time, e.g. "2026-10-01T00:00"; requires timezonemax 30 chars |
timezone | string | null | IANA zone, e.g. Europe/London; always recordedmax 64 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
customerLabelrequireddata.customerLabel | string | - |
activeRatesrequireddata.activeRates | integer | - |
scheduledRatesrequireddata.scheduledRates | integer | - |
alreadyDiscontinuedrequireddata.alreadyDiscontinued | integer | - |
endDaterequireddata.endDate | string (date-time) | ISO-8601 timestamp (UTC) |
immediaterequireddata.immediate | boolean | - |
timezonerequireddata.timezone | string | null | - |
effectOnNewCallsrequireddata.effectOnNewCalls | string | - |
minutes30drequireddata.minutes30d | number | - |
calls30drequireddata.calls30d | integer | - |
revenue30drequireddata.revenue30d | number | US dollars as a JSON number (computed figure) |
impactTruncatedrequireddata.impactTruncated | boolean | - |
samplerequireddata.sample | object[] | - |
prefixrequireddata.sample[].prefix | string | - |
originPrefixrequireddata.sample[].originPrefix | string | - |
ratePerUnitrequireddata.sample[].ratePerUnit | money | USD as a decimal string with exactly 6 places, e.g. "0.012500". |
billingIncrementrequireddata.sample[].billingIncrement | 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
Discontinue a Switch customer whole sell deck
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Closes every rate's period at the effective moment; nothing is deleted and priced calls keep their rate. New calls fall back to your operator deck, then markup over cost. 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
effectiveFrom | string | An instant with offset, e.g. "2026-10-01T00:00:00Z". A bare date is refused.max 40 chars |
effectiveLocal | string | A wall-clock time, e.g. "2026-10-01T00:00"; requires timezonemax 30 chars |
timezone | string | null | IANA zone, e.g. Europe/London; always recordedmax 64 chars |
includeScheduled | boolean | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
endDaterequireddata.endDate | string (date-time) | ISO-8601 timestamp (UTC) |
effectivedata.effective | any | The moment described in words and in the recorded zone |
revisionIddata.revisionId | string (uuid) | null | - |
discontinuedrequireddata.discontinued | integer | - |
deletedrequireddata.deleted | integer | Deprecated alias of discontinued; nothing is deleted |
scheduledLeftrequireddata.scheduledLeft | 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. - Also
STALE_WRITE
Discontinue one Switch customer sell rate
POST/
- 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
rateIdrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
effectiveFrom | string | An instant with offset, e.g. "2026-10-01T00:00:00Z". A bare date is refused.max 40 chars |
effectiveLocal | string | A wall-clock time, e.g. "2026-10-01T00:00"; requires timezonemax 30 chars |
timezone | string | null | IANA zone, e.g. Europe/London; always recordedmax 64 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
endDaterequireddata.endDate | string (date-time) | ISO-8601 timestamp (UTC) |
effectivedata.effective | any | The moment described in words and in the recorded zone |
revisionIddata.revisionId | string (uuid) | null | - |
discontinuedrequireddata.discontinued | boolean | -One of true |
deletedrequireddata.deleted | boolean | Deprecated alias; the rate is discontinued, not deletedOne of true |
immediaterequireddata.immediate | 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. - 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 sell-rate discontinuation events for a Switch customer
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 (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
revisionIdrequireddata[].revisionId | string (uuid) | null | - |
discontinuedAtrequireddata[].discontinuedAt | string (date-time) | ISO-8601 timestamp (UTC) |
rowsrequireddata[].rows | integer | - |
labelrequireddata[].label | string | - |
effectivedata[].effective | any | null | - |
timezonerequireddata[].timezone | string | null | - |
changeModerequireddata[].changeMode | 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.
Reprice a Switch customer deck as a markup over buy cost
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 (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
markupPctrequired | number | -min -100 |
prefixes | string[] | Only these prefixes; omit for the whole deck |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
updatedrequireddata.updated | integer | - |
skippedrequireddata.skipped | integer | - |
basisdata.basis | any | - |
revisionIdrequireddata.revisionId | string (uuid) | 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
Export a Switch customer sell rates as CSV
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Takes the same filters as the list, with buy cost and margin columns.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
search | query | string | Prefix or destination text |
view | query | string | Default currentOne of current, scheduled, discontinued, expiring, all |
origin | query | string | -One of any, origin_only, destination_only |
increment | query | string | -One of any, custom, inherited |
cost | query | string | -One of any, missing |
margin | query | string | -One of any, thin, negative |
Response 200 (text/csv)
The filtered sell deck as a CSV attachment.
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.
Add or replace many Switch customer sell rates
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 (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
rowsrequired | object[] | - |
prefixrequiredrows[].prefix | string | -max 24 chars |
raterequiredrows[].rate | number | -min 0 |
originrows[].origin | string | -max 24 chars |
billingIncrementrows[].billingIncrement | string | -max 10 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
appliedrequireddata.applied | integer | - |
revisionIdrequireddata.revisionId | string (uuid) | 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
Discontinue one Switch customer sell rate now
DELETE/
- 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
rateIdrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
endDaterequireddata.endDate | string (date-time) | ISO-8601 timestamp (UTC) |
effectivedata.effective | any | The moment described in words and in the recorded zone |
revisionIddata.revisionId | string (uuid) | null | - |
discontinuedrequireddata.discontinued | boolean | -One of true |
deletedrequireddata.deleted | boolean | Deprecated alias; the rate is discontinued, not deletedOne of true |
immediaterequireddata.immediate | 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. - 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
Discontinue every Switch customer sell rate now
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 (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
endDaterequireddata.endDate | string (date-time) | ISO-8601 timestamp (UTC) |
effectivedata.effective | any | The moment described in words and in the recorded zone |
revisionIddata.revisionId | string (uuid) | null | - |
discontinuedrequireddata.discontinued | integer | - |
deletedrequireddata.deleted | integer | Deprecated alias of discontinued; nothing is deleted |
scheduledLeftrequireddata.scheduledLeft | 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. - Also
STALE_WRITE
List scheduled (future-dated) sell rates for a Switch customer
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 (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | Same fields as SwitchCustomerSellRate, 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.
Schedule a future Switch customer sell-rate change
POST/
- 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
effectiveFrom | string | An instant with offset, e.g. "2026-10-01T00:00:00Z". A bare date is refused.max 40 chars |
effectiveLocal | string | A wall-clock time, e.g. "2026-10-01T00:00"; requires timezonemax 30 chars |
timezone | string | null | IANA zone, e.g. Europe/London; always recordedmax 64 chars |
prefixrequired | string | -max 24 chars |
raterequired | number | USD per minutemin 0 |
origin | string | -max 24 chars |
billingIncrement | string | -max 10 chars |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchCustomerSellRate, 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
Cancel a scheduled Switch customer sell rate
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 (uuid) | - |
rateIdrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
cancelledrequireddata.cancelled | 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
Set a Switch customer billing cycle and payment terms
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 (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
billingCycle | string | null | -One of weekly, biweekly, monthly, manual |
paymentTermsDays | integer | null | -0 to 365 |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
customerIdrequireddata.customerId | string (uuid) | - |
billingCyclerequireddata.billingCycle | string | null | - |
paymentTermsDaysrequireddata.paymentTermsDays | integer | null | - |
nextInvoiceAtrequireddata.nextInvoiceAt | string (date-time) | null | 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. - 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