Skip to main content
POST
Create API key

Authorizations

Authorization
string
header
required

JWT bearer token obtained via the OAuth2 client-credentials grant from the platform Authentication API. The token's scopes gate the endpoints it may call, and its audience names the Guardian instance. This is the standard way to authenticate to Guardian.

Body

application/json
scopes
enum<string>[]
required

A list of scopes that the API key will have access to.

Minimum array length: 1
Available options:
pci:tokens:create,
pci:tokens:read,
pci:tokens:update,
pci:tokens:delete,
pci:tokens:forward,
generic:tokens:create,
generic:tokens:read,
generic:tokens:delete,
network:tokens:create,
network:tokens:read,
network:tokens:delete,
network:tokens:use,
network:tokens:forward,
wallet:tokens:create,
wallet:tokens:read,
wallet:tokens:delete,
wallet:tokens:forward,
wallet:apple-pay:sessions:create,
wallet:apple-pay:settings:read,
wallet:apple-pay:settings:update,
wallet:apple-pay:trust-anchors:read,
wallet:apple-pay:trust-anchors:update,
wallet:apple-pay:certificates:create,
wallet:apple-pay:certificates:read,
wallet:apple-pay:certificates:update,
wallet:apple-pay:certificates:delete,
wallet:apple-pay:domains:create,
wallet:apple-pay:domains:read,
wallet:apple-pay:domains:update,
wallet:apple-pay:domains:delete,
metadata:inquiries:create,
admin:api-keys:create,
admin:api-keys:read,
admin:api-keys:update,
admin:api-keys:delete,
admin:webhooks:create,
admin:webhooks:read,
admin:webhooks:delete,
admin:types:create,
admin:types:read,
admin:types:delete,
admin:imports:create,
admin:imports:read,
admin:imports:cancel
expires_in
integer

How many seconds after creation the API key expires automatically.

Required range: 1 <= x <= 7776000

Response

Success response

id
string<uuid>
required
Example:

"123e4567-e89b-12d3-a456-426614174000"

created_at
string<date-time>
required
Example:

"2023-10-01T10:00:00Z"

key_value
string
required

The generated API key value. It will only be returned once with this response.

Example:

"key_1a2b3c4d5e6f7g8h"

scopes
enum<string>[]
required

A list of scopes that the API key will have access to.

Minimum array length: 1
Available options:
pci:tokens:create,
pci:tokens:read,
pci:tokens:update,
pci:tokens:delete,
pci:tokens:forward,
generic:tokens:create,
generic:tokens:read,
generic:tokens:delete,
network:tokens:create,
network:tokens:read,
network:tokens:delete,
network:tokens:use,
network:tokens:forward,
wallet:tokens:create,
wallet:tokens:read,
wallet:tokens:delete,
wallet:tokens:forward,
wallet:apple-pay:sessions:create,
wallet:apple-pay:settings:read,
wallet:apple-pay:settings:update,
wallet:apple-pay:trust-anchors:read,
wallet:apple-pay:trust-anchors:update,
wallet:apple-pay:certificates:create,
wallet:apple-pay:certificates:read,
wallet:apple-pay:certificates:update,
wallet:apple-pay:certificates:delete,
wallet:apple-pay:domains:create,
wallet:apple-pay:domains:read,
wallet:apple-pay:domains:update,
wallet:apple-pay:domains:delete,
metadata:inquiries:create,
admin:api-keys:create,
admin:api-keys:read,
admin:api-keys:update,
admin:api-keys:delete,
admin:webhooks:create,
admin:webhooks:read,
admin:webhooks:delete,
admin:types:create,
admin:types:read,
admin:types:delete,
admin:imports:create,
admin:imports:read,
admin:imports:cancel
expires_at
string<date-time>
Example:

"2023-10-01T11:00:00Z"