Skip to main content
A user key belongs to the account that created it, an organization key to an organization. Both are printed once, when they are created. Every command below also takes -h, --help.

user

Manage API keys for the current user

user list

List all API keys of the current user
string
The profile to use
boolean
Print where each resolved value came from
boolean
Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.
Aliases: xata keys user ls

user create

Create a new API key Creates a key for the account you are logged in with. It is printed once, when it is created, and cannot be read again.
string
API key name
string
Expiry, as a date or a phrase such as ‘in 1 week’, or ‘never’
string
The profile to use
boolean
Print where each resolved value came from
boolean
Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.
Examples:

user delete

Delete one or more API keys
string
The profile to use
boolean
Print where each resolved value came from
boolean
Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.
string
IDs of the keys to delete

organization

Manage API keys for an organization Aliases: xata keys org

organization list

List all API keys for an organization
string
Organization ID
string
The profile to use
boolean
Print where each resolved value came from
boolean
Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.
Aliases: xata keys organization ls

organization create

Create a new API key Creates a key for an organization rather than for an account. It is printed once, when it is created, and cannot be read again.
string
Organization ID
string
API key name
string
Expiry, as a date or a phrase such as ‘in 1 week’, or ‘never’
string
The profile to use
boolean
Print where each resolved value came from
boolean
Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.
Examples:

organization delete

Delete one or more API keys
string
Organization ID
string
The profile to use
boolean
Print where each resolved value came from
boolean
Output in JSON format when the command supports it. Defaults to on when an AI agent runs the command.
string
IDs of the keys to delete