Skip to main content
PATCH
Update API key

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Path Parameters

id
string<uuid>
required

The unique identifier of the API key.

Body

application/json

The fields of the API key to change. The API key keeps each field that the body leaves out.

friendlyName
string

The name that tells the API key apart from the other API keys of the tenant, such as the name of the system that uses it.

Example:

"ERP da Padaria Central"

roles
enum<string>[]

The roles of the API key, each a resource and a permission, such as invoices:read, which set what the API key can do. A write role does not cover read.

Available options:
contracts:admin,
contracts:read,
contracts:write,
customers:read,
customers:write,
dunning:read,
dunning:write,
emails:read,
events:read,
events:write,
integrations:read,
integrations:write,
invoices:read,
invoices:write,
items:read,
items:write,
legal_entities:read,
licenses:read,
licenses:write,
payment_accounts:read,
payment_accounts:write,
payments:read,
plan_instance_versions:read,
plan_instance_versions:write,
plan_instances:read,
plan_instances:write,
plans:read,
products:read,
products:write,
resources:read,
resources:write,
tenants:read,
watchtower:write
Example:
expireAt
string<date-time>

The instant, in UTC, when the API key stops working.

Example:

"2027-01-01T00:00:00.000Z"

status
enum<string>

The status of the API key. Only an active API key can call the public API.

Available options:
active,
deactivated,
revoked

Response

An API key of the tenant: a key that a system of the tenant sends in the X-API-KEY header to call the public API, with the roles that set what the system can do. Aira shows the key itself only in the reply that creates the API key.

id
string<uuid>
required

The unique identifier of the API key.

friendlyName
string
required

The name that tells the API key apart from the other API keys of the tenant, such as the name of the system that uses it.

Example:

"ERP da Padaria Central"

roles
string[]
required

The roles of the API key, each a resource and a permission, such as invoices:read, which set what the API key can do. A write role does not cover read.

Example:
status
enum<string>
required

The status of the API key. Only an active API key can call the public API.

Available options:
active,
deactivated,
revoked
expireAt
string<date-time>
required

The instant, in UTC, when the API key stops working.

Example:

"2027-01-01T00:00:00.000Z"