Switch API reference
Switch: team and audit
Roles, team members, approvals and the audit history.
BrowseSwitch: team and audit
Get your role and permissions on the switch
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Response 200
datarequiredobject
operatorIdrequiredstring (uuid) · data.operatorId
isAccountHolderrequiredboolean · data.isAccountHolder
rolerequiredstring | null · data.role
roleLabelrequiredstring | null · data.roleLabel
permissionsrequiredstring[] · data.permissions
sensitivePermissionsrequiredstring[] · data.sensitivePermissions
scoperequiredobject · data.scope
customerIdsrequiredstring (uuid)[] | null · data.scope.customerIds
null = all customerstrunkIdsrequiredstring (uuid)[] | null · data.scope.trunkIds
null = all trunks
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 team members and the available roles
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Response 200
datarequiredobject
membersrequiredobject[] · data.members
idrequiredstring (uuid) · data.members[].id
userIdrequiredstring (uuid) · data.members[].userId
emailrequiredstring · data.members[].email
contactNamerequiredstring | null · data.members[].contactName
rolerequiredstring · data.members[].role
roleLabelrequiredstring · data.members[].roleLabel
statusrequiredstring · data.members[].status
customerIdsrequiredstring (uuid)[] | null · data.members[].customerIds
trunkIdsrequiredstring (uuid)[] | null · data.members[].trunkIds
noterequiredstring | null · data.members[].note
permissionsrequiredstring[] · data.members[].permissions
scopeSummaryrequiredobject · data.members[].scopeSummary
customersrequiredstring · data.members[].scopeSummary.customers
trunksrequiredstring · data.members[].scopeSummary.trunks
createdAtrequiredstring (date-time) · data.members[].createdAt
ISO-8601 timestamp (UTC)updatedAtrequiredstring (date-time) · data.members[].updatedAt
ISO-8601 timestamp (UTC)rolesrequiredobject[] · data.roles
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Add a team member
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Gives an email address a role on your switch, optionally limited to some customers and trunks (null = all).
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)
emailrequiredstring (email)
max 255 charsrolerequiredstring
One ofviewer,noc,routing,billing,account_manager,administratorcustomerIdsstring (uuid)[] | null
trunkIdsstring (uuid)[] | null
notestring | null
max 500 chars
Response 201
datarequiredobject
Same fields as SwitchTeamMember, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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.
Change a team member's role, scope or status
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
memberIdrequiredpath · string
Request body (application/json)
rolestring
One ofviewer,noc,routing,billing,account_manager,administratorstatusstring
One ofactive,suspendedcustomerIdsstring (uuid)[] | null
trunkIdsstring (uuid)[] | null
notestring | null
max 500 chars
Response 200
datarequiredobject
Same fields as SwitchTeamMember, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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.
Suspend a team member
DELETE/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Suspends rather than deletes, so their history stays attributed.
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
memberIdrequiredpath · string
Response 200
datarequiredobject
Same fields as SwitchTeamMember, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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.
Search the switch audit history
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Who changed what, when, and under which permission. Cursor-paginated with nextCursor.
Parameters
customerIdquery · string (uuid)
trunkIdquery · string (uuid)
actorUserIdquery · string (uuid)
actionquery · string
permissionquery · string
sensitiveOnlyquery · boolean
outcomequery · string
One of success, failure, deniedfromquery · string (date-time)
toquery · string (date-time)
searchquery · string
limitquery · integer
cursorquery · string (uuid)
Response 200
datarequiredobject
entriesrequiredobject[] · data.entries
nextCursorrequiredstring | null · data.nextCursor
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 values available to filter the audit history by
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Response 200
datarequiredobject
actorsrequiredobject[] · data.actors
permissionsrequiredstring[] · data.permissions
sensitivePermissionsrequiredstring[] · data.sensitivePermissions
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 approval requests
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Actions waiting for (or decided by) a second person. Defaults to pending and approved.
Parameters
statusquery · string
Comma-separated statuseslimitquery · integer
Response 200
datarequiredobject[]
idrequiredstring (uuid) · data[].id
statusrequiredstring · data[].status
pending, approved, rejected, expired...permissionstring · data[].permission
requestedAtrequiredstring (date-time) · data[].requestedAt
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.
Approve or reject an approval request
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
idrequiredpath · string
Request body (application/json)
decisionrequiredstring
One ofapprove,rejectnotestring | null
max 2000 chars
Response 200
datarequiredobject
Same fields as SwitchApproval, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List approval policies
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Response 200
datarequiredobject
policiesrequiredobject[] · data.policies
eligiblerequiredstring[] · data.eligible
Permissions that can be put behind an approvalpendingrequiredinteger · data.pending
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.
Set the approval policy for a permission
PUT/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Require a second person to approve actions under this permission, optionally only above an amount.
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)
permissionrequiredstring
One ofcustomers.view,trunks.view,routing.view,rates.view,billing.view,noc.view,audit.view,team.view,customers.edit,trunks.edit,rates.edit,billing.editand 12 moreenabledrequiredboolean
minAmountUsdnumber | null
min 0requireDifferentPersonboolean
expiresAfterHoursinteger
1 to 2160requireReasonboolean
Response 200
datarequiredobject
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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.