List API keys
GET
/api-keys
const url = 'https://api.vaartix.com/api-keys';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.vaartix.com/api-keys \ --header 'Authorization: Bearer <token>'Active keys. The key itself is never returned again after creation.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Your team’s API keys.
Media typeapplication/json
object
data
required
Array<object>
object
id
string
name
string
prefix
The first characters of the key, to recognise it., example: vx_live_pt7m
string
scope
string
domainId
string | null
lastUsedAt
string | null format: date-time
revokedAt
string | null format: date-time
createdAt
string format: date-time
Example
{ "data": [ { "scope": "send" } ]}unauthorized: the API key is missing, invalid or revoked.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}forbidden: the key cannot do this, for example a send-only key on a management endpoint.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}