API reference
API keys
Create, scope and revoke API keys. Dashboard session only: a key can never mint or list keys.
4 operationsBase URL https://packetexchange.io/api/v1Postman collection
BrowseAPI keys
List your API keys
GET/
- Access
- Dashboard session. API keys are refused with 403. Use a login access token.
- Rate limit
- 100 requests per second (the default)
Active (non-revoked) keys with their prefix, scopes and last use. Never includes a secret.
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string (uuid) | - |
keyPrefixrequireddata[].keyPrefix | string | The first characters of the key, for recognising it. The full key is never shown again. |
labelrequireddata[].label | string | - |
scopesrequireddata[].scopes | string[] | null | null = full access; otherwise the only scopes this key may useOne of voice:send, sms:send, dialer:write, routes:read, account:read, purchases:write, offers:write, billing:write, numbers:read, numbers:write, account:write, routes:write and 5 more |
environmentrequireddata[].environment | string | -One of live, test |
lastUsedAtrequireddata[].lastUsedAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
createdAtrequireddata[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
expiresAtrequireddata[].expiresAt | 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. - 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 an API key
POST/
- Access
- Dashboard session. API keys are refused with 403. Use a login access token.
- Rate limit
- 100 requests per second (the default)
Returns the full key ONCE in key. Omit scopes for a full-access key; a scoped key can reach only the operations whose scope it holds. Scopes can be narrowed later but never broadened, so include everything the integration needs. A security email is sent to the account owner.
Request body (application/json)
| Field | Type | Description |
|---|---|---|
labelrequired | string | -max 100 chars |
scopes | string[] | -One of voice:send, sms:send, dialer:write, routes:read, account:read, purchases:write, offers:write, billing:write, numbers:read, numbers:write, account:write, routes:write and 5 more |
environment | string | -One of live, test |
expiresAt | string (date-time) | null | - |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
keyrequireddata.key | string | The full secret key. Returned ONCE, here; store it now. |
keyPrefixrequireddata.keyPrefix | string | Same value as prefix; the name the list and update responses use. |
prefixrequireddata.prefix | string | Deprecated alias of keyPrefix, kept for existing clients. |
labelrequireddata.label | string | - |
scopesrequireddata.scopes | string[] | null | -One of voice:send, sms:send, dialer:write, routes:read, account:read, purchases:write, offers:write, billing:write, numbers:read, numbers:write, account:write, routes:write and 5 more |
environmentrequireddata.environment | string | -One of live, test |
expiresAtrequireddata.expiresAt | 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. - 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.
Rename an API key or narrow its scopes
PATCH/
- Access
- Dashboard session. API keys are refused with 403. Use a login access token.
- Rate limit
- 100 requests per second (the default)
Scopes may only be tightened: any scope not already on the key is rejected with VALIDATION_ERROR.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
label | string | -max 100 chars |
scopes | string[] | -One of voice:send, sms:send, dialer:write, routes:read, account:read, purchases:write, offers:write, billing:write, numbers:read, numbers:write, account:write, routes:write and 5 more |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as ApiKey, 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. - 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.
Revoke an API key
DELETE/
- Access
- Dashboard session. API keys are refused with 403. Use a login access token.
- Rate limit
- 100 requests per second (the default)
Takes effect immediately; requests with the key then get 401.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
messagerequireddata.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. - 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.