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
boolean
default:"false"
Output in JSON format
string
The profile to use
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’
boolean
default:"false"
Output in JSON format
string
The profile to use
Examples:

user delete

Delete one or more API keys
boolean
default:"false"
Output in JSON format
string
The profile to use
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
boolean
default:"false"
Output in JSON format
string
The profile to use
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’
boolean
default:"false"
Output in JSON format
string
The profile to use
Examples:

organization delete

Delete one or more API keys
string
Organization ID
boolean
default:"false"
Output in JSON format
string
The profile to use
string
IDs of the keys to delete