Switch API reference
Switch: CDRs and analytics
Call records, exports, saved views, margin, cost and quality analysis.
26 operationsBase URL https://packetexchange.io/api/v1Postman collection
BrowseSwitch: CDRs and analytics
Get margin and quality totals for all traffic
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Revenue, cost, margin, ASR and minutes across every customer and supplier over the window, plus how much billed traffic carries no supplier cost yet.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | ISO-8601 start (default: 30 days before to) |
to | query | string | ISO-8601 end (default: now) |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
revenuerequireddata.revenue | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
costrequireddata.cost | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
marginrequireddata.margin | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
marginPctrequireddata.marginPct | number | null | null when there was no revenue |
callsrequireddata.calls | integer | - |
answeredrequireddata.answered | integer | - |
minutesrequireddata.minutes | number | - |
asrrequireddata.asr | number | null | Answer rate in percent; null when there were no calls |
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 | - |
freshnessrequireddata.freshness | object | - |
ratingrequireddata.rating | object | - |
unratedBilledrequireddata.rating.unratedBilled | integer | - |
billedCallsrequireddata.rating.billedCalls | integer | - |
unratedPctrequireddata.rating.unratedPct | number | - |
unratedRevenuerequireddata.rating.unratedRevenue | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
unratedMinutesrequireddata.rating.unratedMinutes | number | - |
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.
Get daily margin and quality figures
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | ISO-8601 start (default: 30 days before to) |
to | query | string | ISO-8601 end (default: now) |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
revenuerequireddata[].revenue | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
costrequireddata[].cost | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
marginrequireddata[].margin | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
marginPctrequireddata[].marginPct | number | null | null when there was no revenue |
callsrequireddata[].calls | integer | - |
answeredrequireddata[].answered | integer | - |
minutesrequireddata[].minutes | number | - |
asrrequireddata[].asr | number | null | Answer rate in percent; null when there were no calls |
dayrequireddata[].day | 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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Break down margin and quality by customer, supplier or destination
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | ISO-8601 start (default: 30 days before to) |
to | query | string | ISO-8601 end (default: now) |
by | query | string | Default customerOne of customer, supplier, destination |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
revenuerequireddata[].revenue | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
costrequireddata[].cost | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
marginrequireddata[].margin | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
marginPctrequireddata[].marginPct | number | null | null when there was no revenue |
callsrequireddata[].calls | integer | - |
answeredrequireddata[].answered | integer | - |
minutesrequireddata[].minutes | number | - |
asrrequireddata[].asr | number | null | Answer rate in percent; null when there were no calls |
keyrequireddata[].key | string | - |
labelrequireddata[].label | string | - |
externaldata[].external | 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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List your recent call-record exports
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The latest 25 Switch exports.
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string (uuid) | - |
phaserequireddata[].phase | string | queued, running, completed or failed |
statusrequireddata[].status | string | - |
requestedScoperequireddata[].requestedScope | string | null | - |
requestedAtrequireddata[].requestedAt | string | - |
recordCountrequireddata[].recordCount | integer | null | Only set once completed |
numbersMaskedrequireddata[].numbersMasked | boolean | - |
addressesMaskedrequireddata[].addressesMasked | boolean | - |
truncateddata[].truncated | boolean | - |
errordata[].error | string | null | - |
completedAtdata[].completedAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
downloadabledata[].downloadable | boolean | - |
downloadUrldata[].downloadUrl | string | null | GET /billing/exports/{id}/download once completed. No server path is ever returned. |
rowCountdata[].rowCount | integer | null | - |
createdAtdata[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
queryIddata[].queryId | string | null | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Start a background call-record export
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Queues an export of the filtered records (body takes the same filters as GET /switch/cdrs). At most 3 exports may run at once. Numbers: a scoped API key without the cdr:numbers scope receives masked calling and dialled numbers (numbersMasked says so). Full-access keys and dashboard sessions see them in full.
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 |
|---|---|---|
from | string | ISO-8601 start of the window |
to | string | ISO-8601 end of the window |
kind | string | -One of voice, sms |
direction | string | -One of inbound, outbound |
status | string | - |
subAccountId | string (uuid) | Customer |
customerTrunkId | string (uuid) | - |
vendorTrunkId | string (uuid) | Supplier trunk |
supplierTrunkMatch | string | How vendorTrunkId matches failover attempts (default selected)One of selected, attempted, either |
routeGroupId | string (uuid) | - |
countryPrefix | string | - |
destination | string | - |
destinationName | string | - |
answeredOnly | string | -One of true, false |
answeredState | string | -One of answered, unanswered |
mediaMode | string | -One of direct, proxy |
sipCode | integer | - |
sipCodes | string | Comma-separated SIP codes (max 20) |
q850Cause | integer | - |
q850Causes | string | Comma-separated Q.850 causes (max 20) |
hangupCause | string | - |
durationMin | number | - |
durationMax | number | - |
pddMinMs | number | - |
pddMaxMs | number | - |
codec | string | - |
releaseParty | string | - |
ip | string | - |
ratingState | string | -One of rated, unrated |
negativeMarginOnly | string | -One of true, false |
riskMin | number | - |
attestation | string | -One of A, B, C |
search | string | Up to 20 values separated by comma, semicolon or newline |
searchField | string | - |
searchMatch | string | -One of any, all |
sortBy | string | - |
sortDir | string | -One of asc, desc |
includeProbes | string | Include the platform's synthetic reachability probes (hidden by default)One of true, false |
limit | integer | -1 to 500 |
offset | integer | -min 0 |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchCdrExport, 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. - 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
TOO_MANY_EXPORTS
Get the status of a call-record export
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchCdrExport, 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.
Get traffic usage for one customer
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Totals, per-day figures, live concurrent calls and (optionally) per-destination usage for a customer (sub-account) over a window of up to 92 days (default: the last 24 hours). A longer window is clamped and says so in window.clamped. live.concurrentCalls is null when the live monitor cannot be reached.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
subAccountIdrequired | query | string (uuid) | The customer to report on (required) |
since | query | string | ISO-8601 start (default: 24 hours before until) |
until | query | string | ISO-8601 end (default: now) |
destinations | query | string | Include the per-destination breakdownOne of true, false, 1, 0 |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
windowrequireddata.window | object | - |
subAccountIdrequireddata.window.subAccountId | string (uuid) | - |
sincerequireddata.window.since | string (date-time) | ISO-8601 timestamp (UTC) |
untilrequireddata.window.until | string (date-time) | ISO-8601 timestamp (UTC) |
nextSincerequireddata.window.nextSince | string (date-time) | ISO-8601 timestamp (UTC) |
clampedrequireddata.window.clamped | boolean | - |
maxWindowDaysrequireddata.window.maxWindowDays | integer | - |
totalsrequireddata.totals | object | Calls, answered, minutes, revenue, cost and rejectedAtCapacity over the window |
dailyrequireddata.daily | object[] | - |
liverequireddata.live | object | - |
concurrentCallsrequireddata.live.concurrentCalls | integer | null | - |
byDestinationdata.byDestination | 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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Record that call-record details were copied
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Writes an access entry to your account activity (for example when diagnostics are copied to the clipboard). Answers 202 with { success: true } and no data.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
what | string | What was copied (default "diagnostics")max 64 chars |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | any | enum | null | Not sent by this endpoint |
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.
Get the values available to filter call records by
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
ingressTrunksrequireddata.ingressTrunks | object[] | - |
idrequireddata.ingressTrunks[].id | string (uuid) | - |
labelrequireddata.ingressTrunks[].label | string | - |
ownerrequireddata.ingressTrunks[].owner | string | null | - |
techPrefixrequireddata.ingressTrunks[].techPrefix | string | null | - |
egressTrunksrequireddata.egressTrunks | object[] | - |
idrequireddata.egressTrunks[].id | string (uuid) | - |
labelrequireddata.egressTrunks[].label | string | - |
ownerrequireddata.egressTrunks[].owner | string | null | - |
techPrefixrequireddata.egressTrunks[].techPrefix | string | null | - |
routeGroupsrequireddata.routeGroups | object[] | - |
idrequireddata.routeGroups[].id | string (uuid) | - |
labelrequireddata.routeGroups[].label | string | - |
countryrequireddata.routeGroups[].country | string | null | - |
hasRiskScoresrequireddata.hasRiskScores | boolean | - |
hasAttestationrequireddata.hasAttestation | 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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Get your saved call-records layout
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | null | null until a layout has been saved |
orderdata.order | string[] | - |
colsdata.cols | string[] | - |
compactdata.compact | boolean | - |
pageSizedata.pageSize | number | - |
widthsdata.widths | 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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Save your call-records layout
PUT/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Column order, visible columns, density, page size (50, 100 or 200) and column widths (48-600 px). Invalid values are dropped, not rejected.
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 |
|---|---|---|
order | string[] | - |
cols | string[] | - |
compact | boolean | - |
pageSize | number | - |
widths | object | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
orderdata.order | string[] | - |
colsdata.cols | string[] | - |
compactdata.compact | boolean | - |
pageSizedata.pageSize | number | - |
widthsdata.widths | 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. - 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.
Search call records
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Paged call records (one row per attempt) with a summary over the whole filtered window: calls, ASR and ACD (per call, failover collapsed), PDD median and p95, revenue, cost and margin. Long windows are clamped (see window). Numbers: a scoped API key without the cdr:numbers scope receives masked calling and dialled numbers (numbersMasked says so). Full-access keys and dashboard sessions see them in full.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | ISO-8601 start of the window |
to | query | string | ISO-8601 end of the window |
kind | query | string | -One of voice, sms |
direction | query | string | -One of inbound, outbound |
status | query | string | - |
subAccountId | query | string (uuid) | Customer |
customerTrunkId | query | string (uuid) | - |
vendorTrunkId | query | string (uuid) | Supplier trunk |
supplierTrunkMatch | query | string | How vendorTrunkId matches failover attempts (default selected)One of selected, attempted, either |
routeGroupId | query | string (uuid) | - |
countryPrefix | query | string | - |
destination | query | string | - |
destinationName | query | string | - |
answeredOnly | query | string | -One of true, false |
answeredState | query | string | -One of answered, unanswered |
mediaMode | query | string | -One of direct, proxy |
sipCode | query | integer | - |
sipCodes | query | string | Comma-separated SIP codes (max 20) |
q850Cause | query | integer | - |
q850Causes | query | string | Comma-separated Q.850 causes (max 20) |
hangupCause | query | string | - |
durationMin | query | number | - |
durationMax | query | number | - |
pddMinMs | query | number | - |
pddMaxMs | query | number | - |
codec | query | string | - |
releaseParty | query | string | - |
ip | query | string | - |
ratingState | query | string | -One of rated, unrated |
negativeMarginOnly | query | string | -One of true, false |
riskMin | query | number | - |
attestation | query | string | -One of A, B, C |
search | query | string | Up to 20 values separated by comma, semicolon or newline |
searchField | query | string | - |
searchMatch | query | string | -One of any, all |
sortBy | query | string | - |
sortDir | query | string | -One of asc, desc |
includeProbes | query | string | Include the platform's synthetic reachability probes (hidden by default)One of true, false |
limit | query | integer | - |
offset | query | integer | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
rowsrequireddata.rows | object[] | - |
idrequireddata.rows[].id | string (uuid) | - |
createdAtrequireddata.rows[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
kindrequireddata.rows[].kind | string | -One of voice, sms |
directionrequireddata.rows[].direction | string | - |
fromrequireddata.rows[].from | string | null | - |
torequireddata.rows[].to | string | null | - |
clirequireddata.rows[].cli | string | null | - |
statusrequireddata.rows[].status | string | - |
sipCoderequireddata.rows[].sipCode | integer | null | - |
hangupCauserequireddata.rows[].hangupCause | string | null | - |
durationSecondsrequireddata.rows[].durationSeconds | integer | null | - |
billedSecondsrequireddata.rows[].billedSeconds | integer | null | - |
segmentsrequireddata.rows[].segments | integer | null | - |
pddMsrequireddata.rows[].pddMs | integer | null | - |
callGroupIdrequireddata.rows[].callGroupId | string | null | Shared by every failover attempt of one call |
customerrequireddata.rows[].customer | string | null | - |
supplierrequireddata.rows[].supplier | string | null | - |
revenuerequireddata.rows[].revenue | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
costrequireddata.rows[].cost | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
marginrequireddata.rows[].margin | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
sellRatePerUnitrequireddata.rows[].sellRatePerUnit | number | null | null when the call could not be rated (distinct from a real 0) |
buyRatePerUnitrequireddata.rows[].buyRatePerUnit | number | null | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
ratingStaterequireddata.rows[].ratingState | string | null | - |
mosrequireddata.rows[].mos | number | null | - |
jitterMsrequireddata.rows[].jitterMs | number | null | - |
packetLossPctrequireddata.rows[].packetLossPct | number | null | - |
mediaModerequireddata.rows[].mediaMode | string | null | - |
codecrequireddata.rows[].codec | string | null | - |
q850Causerequireddata.rows[].q850Cause | integer | null | - |
destinationNamerequireddata.rows[].destinationName | string | null | - |
riskScoredata.rows[].riskScore | number | null | - |
attestationdata.rows[].attestation | string | null | - |
customerTrunkIddata.rows[].customerTrunkId | string (uuid) | null | - |
attemptCountdata.rows[].attemptCount | integer | - |
invoiceIddata.rows[].invoiceId | string (uuid) | null | - |
totalrequireddata.total | integer | - |
limitrequireddata.limit | integer | - |
offsetrequireddata.offset | integer | - |
summaryrequireddata.summary | object | Window totals: calls, answeredCalls, asrPercent, acdSeconds, talkSeconds, billableSeconds, pddMedianMs, pddP95Ms, revenue, cost, margin, ingestionLagSeconds... |
numbersMaskedrequireddata.numbersMasked | boolean | - |
addressesMaskedrequireddata.addressesMasked | boolean | - |
fieldVisibilityrequireddata.fieldVisibility | object | - |
generatedAtrequireddata.generatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
windowrequireddata.window | object | - |
fromrequireddata.window.from | string (date-time) | null | ISO-8601 timestamp (UTC) |
torequireddata.window.to | string (date-time) | null | ISO-8601 timestamp (UTC) |
clampedrequireddata.window.clamped | boolean | - |
maxWindowDaysrequireddata.window.maxWindowDays | integer | - |
queryIdrequireddata.queryId | string | Stable id of the question asked, shared with exports of the same filters |
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.
Count call records by filter value
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
For the filtered window, how many records carry each status, SIP code, customer, supplier and so on.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | ISO-8601 start of the window |
to | query | string | ISO-8601 end of the window |
kind | query | string | -One of voice, sms |
direction | query | string | -One of inbound, outbound |
status | query | string | - |
subAccountId | query | string (uuid) | Customer |
customerTrunkId | query | string (uuid) | - |
vendorTrunkId | query | string (uuid) | Supplier trunk |
supplierTrunkMatch | query | string | How vendorTrunkId matches failover attempts (default selected)One of selected, attempted, either |
routeGroupId | query | string (uuid) | - |
countryPrefix | query | string | - |
destination | query | string | - |
destinationName | query | string | - |
answeredOnly | query | string | -One of true, false |
answeredState | query | string | -One of answered, unanswered |
mediaMode | query | string | -One of direct, proxy |
sipCode | query | integer | - |
sipCodes | query | string | Comma-separated SIP codes (max 20) |
q850Cause | query | integer | - |
q850Causes | query | string | Comma-separated Q.850 causes (max 20) |
hangupCause | query | string | - |
durationMin | query | number | - |
durationMax | query | number | - |
pddMinMs | query | number | - |
pddMaxMs | query | number | - |
codec | query | string | - |
releaseParty | query | string | - |
ip | query | string | - |
ratingState | query | string | -One of rated, unrated |
negativeMarginOnly | query | string | -One of true, false |
riskMin | query | number | - |
attestation | query | string | -One of A, B, C |
search | query | string | Up to 20 values separated by comma, semicolon or newline |
searchField | query | string | - |
searchMatch | query | string | -One of any, all |
sortBy | query | string | - |
sortDir | query | string | -One of asc, desc |
includeProbes | query | string | Include the platform's synthetic reachability probes (hidden by default)One of true, false |
limit | query | integer | - |
offset | query | integer | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
queryIdrequireddata.queryId | string | Stable id of the question asked, shared with exports of the same filters |
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.
Get charts for the filtered call records
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | ISO-8601 start of the window |
to | query | string | ISO-8601 end of the window |
kind | query | string | -One of voice, sms |
direction | query | string | -One of inbound, outbound |
status | query | string | - |
subAccountId | query | string (uuid) | Customer |
customerTrunkId | query | string (uuid) | - |
vendorTrunkId | query | string (uuid) | Supplier trunk |
supplierTrunkMatch | query | string | How vendorTrunkId matches failover attempts (default selected)One of selected, attempted, either |
routeGroupId | query | string (uuid) | - |
countryPrefix | query | string | - |
destination | query | string | - |
destinationName | query | string | - |
answeredOnly | query | string | -One of true, false |
answeredState | query | string | -One of answered, unanswered |
mediaMode | query | string | -One of direct, proxy |
sipCode | query | integer | - |
sipCodes | query | string | Comma-separated SIP codes (max 20) |
q850Cause | query | integer | - |
q850Causes | query | string | Comma-separated Q.850 causes (max 20) |
hangupCause | query | string | - |
durationMin | query | number | - |
durationMax | query | number | - |
pddMinMs | query | number | - |
pddMaxMs | query | number | - |
codec | query | string | - |
releaseParty | query | string | - |
ip | query | string | - |
ratingState | query | string | -One of rated, unrated |
negativeMarginOnly | query | string | -One of true, false |
riskMin | query | number | - |
attestation | query | string | -One of A, B, C |
search | query | string | Up to 20 values separated by comma, semicolon or newline |
searchField | query | string | - |
searchMatch | query | string | -One of any, all |
sortBy | query | string | - |
sortDir | query | string | -One of asc, desc |
includeProbes | query | string | Include the platform's synthetic reachability probes (hidden by default)One of true, false |
limit | query | integer | - |
offset | query | integer | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
queryIdrequireddata.queryId | string | Stable id of the question asked, shared with exports of the same filters |
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.
Break down failed calls by stage and reason
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | ISO-8601 start of the window |
to | query | string | ISO-8601 end of the window |
kind | query | string | -One of voice, sms |
direction | query | string | -One of inbound, outbound |
status | query | string | - |
subAccountId | query | string (uuid) | Customer |
customerTrunkId | query | string (uuid) | - |
vendorTrunkId | query | string (uuid) | Supplier trunk |
supplierTrunkMatch | query | string | How vendorTrunkId matches failover attempts (default selected)One of selected, attempted, either |
routeGroupId | query | string (uuid) | - |
countryPrefix | query | string | - |
destination | query | string | - |
destinationName | query | string | - |
answeredOnly | query | string | -One of true, false |
answeredState | query | string | -One of answered, unanswered |
mediaMode | query | string | -One of direct, proxy |
sipCode | query | integer | - |
sipCodes | query | string | Comma-separated SIP codes (max 20) |
q850Cause | query | integer | - |
q850Causes | query | string | Comma-separated Q.850 causes (max 20) |
hangupCause | query | string | - |
durationMin | query | number | - |
durationMax | query | number | - |
pddMinMs | query | number | - |
pddMaxMs | query | number | - |
codec | query | string | - |
releaseParty | query | string | - |
ip | query | string | - |
ratingState | query | string | -One of rated, unrated |
negativeMarginOnly | query | string | -One of true, false |
riskMin | query | number | - |
attestation | query | string | -One of A, B, C |
search | query | string | Up to 20 values separated by comma, semicolon or newline |
searchField | query | string | - |
searchMatch | query | string | -One of any, all |
sortBy | query | string | - |
sortDir | query | string | -One of asc, desc |
includeProbes | query | string | Include the platform's synthetic reachability probes (hidden by default)One of true, false |
limit | query | integer | - |
offset | query | integer | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
queryIdrequireddata.queryId | string | Stable id of the question asked, shared with exports of the same filters |
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.
Group failed calls by the dimensions they share
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Clusters failures (for example one supplier, one destination, one SIP code) so a pattern reads as one problem.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | ISO-8601 start of the window |
to | query | string | ISO-8601 end of the window |
kind | query | string | -One of voice, sms |
direction | query | string | -One of inbound, outbound |
status | query | string | - |
subAccountId | query | string (uuid) | Customer |
customerTrunkId | query | string (uuid) | - |
vendorTrunkId | query | string (uuid) | Supplier trunk |
supplierTrunkMatch | query | string | How vendorTrunkId matches failover attempts (default selected)One of selected, attempted, either |
routeGroupId | query | string (uuid) | - |
countryPrefix | query | string | - |
destination | query | string | - |
destinationName | query | string | - |
answeredOnly | query | string | -One of true, false |
answeredState | query | string | -One of answered, unanswered |
mediaMode | query | string | -One of direct, proxy |
sipCode | query | integer | - |
sipCodes | query | string | Comma-separated SIP codes (max 20) |
q850Cause | query | integer | - |
q850Causes | query | string | Comma-separated Q.850 causes (max 20) |
hangupCause | query | string | - |
durationMin | query | number | - |
durationMax | query | number | - |
pddMinMs | query | number | - |
pddMaxMs | query | number | - |
codec | query | string | - |
releaseParty | query | string | - |
ip | query | string | - |
ratingState | query | string | -One of rated, unrated |
negativeMarginOnly | query | string | -One of true, false |
riskMin | query | number | - |
attestation | query | string | -One of A, B, C |
search | query | string | Up to 20 values separated by comma, semicolon or newline |
searchField | query | string | - |
searchMatch | query | string | -One of any, all |
sortBy | query | string | - |
sortDir | query | string | -One of asc, desc |
includeProbes | query | string | Include the platform's synthetic reachability probes (hidden by default)One of true, false |
limit | query | integer | - |
offset | query | integer | - |
dims | query | string | Comma-separated grouping dimensions |
destinationDigits | query | integer | - |
bucket | query | string | -One of day, hour |
minSessions | query | integer | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
queryIdrequireddata.queryId | string | Stable id of the question asked, shared with exports of the same filters |
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.
Get the call-filter vocabulary
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The shared filter names and closed value sets used by call records, quality and live calls.
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | 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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Get the list-filter vocabulary
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Filter names and value sets for the customer, supplier and trunk lists.
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | 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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Get one call record with attempts, SIP trace and timeline
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Numbers: a scoped API key without the cdr:numbers scope receives masked calling and dialled numbers (numbersMasked says so). Full-access keys and dashboard sessions see them in full. A record that is not yours answers 404 NOT_FOUND.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
createdAtrequireddata.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
kindrequireddata.kind | string | -One of voice, sms |
directionrequireddata.direction | string | - |
fromrequireddata.from | string | null | - |
torequireddata.to | string | null | - |
clirequireddata.cli | string | null | - |
statusrequireddata.status | string | - |
sipCoderequireddata.sipCode | integer | null | - |
hangupCauserequireddata.hangupCause | string | null | - |
durationSecondsrequireddata.durationSeconds | integer | null | - |
billedSecondsrequireddata.billedSeconds | integer | null | - |
segmentsrequireddata.segments | integer | null | - |
pddMsrequireddata.pddMs | integer | null | - |
callGroupIdrequireddata.callGroupId | string | null | Shared by every failover attempt of one call |
customerrequireddata.customer | string | null | - |
supplierrequireddata.supplier | string | null | - |
revenuerequireddata.revenue | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
costrequireddata.cost | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
marginrequireddata.margin | number | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
sellRatePerUnitrequireddata.sellRatePerUnit | number | null | null when the call could not be rated (distinct from a real 0) |
buyRatePerUnitrequireddata.buyRatePerUnit | number | null | US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string) |
ratingStaterequireddata.ratingState | string | null | - |
mosrequireddata.mos | number | null | - |
jitterMsrequireddata.jitterMs | number | null | - |
packetLossPctrequireddata.packetLossPct | number | null | - |
mediaModerequireddata.mediaMode | string | null | - |
codecrequireddata.codec | string | null | - |
q850Causerequireddata.q850Cause | integer | null | - |
destinationNamerequireddata.destinationName | string | null | - |
riskScoredata.riskScore | number | null | - |
attestationdata.attestation | string | null | - |
customerTrunkIddata.customerTrunkId | string (uuid) | null | - |
attemptCountdata.attemptCount | integer | - |
invoiceIddata.invoiceId | string (uuid) | null | - |
attemptsrequireddata.attempts | object[] | Every supplier attempt of this call, including skipped candidates |
tracerequireddata.trace | object | null | The captured SIP messages, when available |
timelinerequireddata.timeline | object | - |
startedAtrequireddata.timeline.startedAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
startedFromrequireddata.timeline.startedFrom | string | null | -One of first_sip_message, first_supplier_attempt |
answeredAtrequireddata.timeline.answeredAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
endedAtrequireddata.timeline.endedAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
recordedAtrequireddata.timeline.recordedAt | 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.
List the supplier attempts of a call
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
A record that is not yours answers 404 NOT_FOUND.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | 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.
List saved call-record views
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string (uuid) | - |
namerequireddata[].name | string | - |
servicerequireddata[].service | string | -One of voice, sms |
filtersrequireddata[].filters | object | - |
columnsrequireddata[].columns | string[] | - |
sortrequireddata[].sort | object[] | - |
fieldrequireddata[].sort[].field | string | - |
directionrequireddata[].sort[].direction | string | -One of asc, desc |
isDefaultrequireddata[].isDefault | boolean | - |
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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Save a call-record view
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Creates the view, or replaces the one with the same name.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Request body (application/json)
| Field | Type | Description |
|---|---|---|
namerequired | string | -max 120 chars |
service | string | -One of voice, sms |
filters | object | - |
columns | string[] | - |
sort | object[] | - |
fieldrequiredsort[].field | string | -max 64 chars |
directionrequiredsort[].direction | string | -One of asc, desc |
isDefault | boolean | - |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchCdrView, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Delete a saved call-record view
DELETE/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Answers { success: true } with no data, whether or not the view existed.
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 |
|---|---|---|---|
viewIdrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | any | enum | null | Not sent by this endpoint |
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.
Get the SIP trace of a call
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The signalling ladder for the call. Access is recorded in your account activity. A record that is not yours answers 404 NOT_FOUND.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | 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.
Re-run routing for a call record
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 10 requests per minute
Resolves the route this call would take now, without placing a call, so a fix can be checked against the original failure.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
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.
Download filtered call records as CSV
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Synchronous export, capped at a row ceiling; X-PKX-Row-Count, X-PKX-Truncated and X-PKX-Query-Id headers describe the file. For large windows use POST /switch/cdr-exports. Numbers: a scoped API key without the cdr:numbers scope receives masked calling and dialled numbers (numbersMasked says so). Full-access keys and dashboard sessions see them in full.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | ISO-8601 start of the window |
to | query | string | ISO-8601 end of the window |
kind | query | string | -One of voice, sms |
direction | query | string | -One of inbound, outbound |
status | query | string | - |
subAccountId | query | string (uuid) | Customer |
customerTrunkId | query | string (uuid) | - |
vendorTrunkId | query | string (uuid) | Supplier trunk |
supplierTrunkMatch | query | string | How vendorTrunkId matches failover attempts (default selected)One of selected, attempted, either |
routeGroupId | query | string (uuid) | - |
countryPrefix | query | string | - |
destination | query | string | - |
destinationName | query | string | - |
answeredOnly | query | string | -One of true, false |
answeredState | query | string | -One of answered, unanswered |
mediaMode | query | string | -One of direct, proxy |
sipCode | query | integer | - |
sipCodes | query | string | Comma-separated SIP codes (max 20) |
q850Cause | query | integer | - |
q850Causes | query | string | Comma-separated Q.850 causes (max 20) |
hangupCause | query | string | - |
durationMin | query | number | - |
durationMax | query | number | - |
pddMinMs | query | number | - |
pddMaxMs | query | number | - |
codec | query | string | - |
releaseParty | query | string | - |
ip | query | string | - |
ratingState | query | string | -One of rated, unrated |
negativeMarginOnly | query | string | -One of true, false |
riskMin | query | number | - |
attestation | query | string | -One of A, B, C |
search | query | string | Up to 20 values separated by comma, semicolon or newline |
searchField | query | string | - |
searchMatch | query | string | -One of any, all |
sortBy | query | string | - |
sortDir | query | string | -One of asc, desc |
includeProbes | query | string | Include the platform's synthetic reachability probes (hidden by default)One of true, false |
limit | query | integer | - |
offset | query | integer | - |
Response 200 (text/csv)
CSV of the filtered call records, as an 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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.