Create an API key
The secret is returned once and never again: data.api_key.key is the only place it ever appears.
Accepts name and, optionally, scopes; any other field is a 400 rather than silently ignored. A new key is refused with a 400 (Maximum of 10 API keys allowed per account) while the account already has 10 active keys, on every plan (dashboard sign-in sessions and connected apps do not count); revoke one first. The cap is checked only here: keys suspended when a subscription ended are not counted, and resubscribing restores them, so an account can hold more than 10 that way and then cannot create another until it is under 10. GET /v1/usage/limits publishes the cap as limits.api_keys. Omitting scopes creates an unrestricted key. Sending scopes creates a key limited to exactly those scopes: an empty array is refused (a key that can do nothing is never what was meant) and so is null (omitted and null are not the same thing, and this route will not guess which was meant). A scope a key does not hold answers 403 INSUFFICIENT_SCOPE on use, naming what it needed.
Creating a key with a dashboard session needs a sign-in within the last 15 minutes; an older session answers 403 REAUTHENTICATION_REQUIRED. Creating one with an API key has no such limit, but the key used must itself be unrestricted: no scope grants minting.
Request
- Base URL: https://api.kawaa.com
- URL: https://api.kawaa.com/v1/api-keys
- Auth: one of:
- API key in header X-Api-Key
- HTTP bearer
Request body
Response
The new key. Save it now.
Example response
{
"data": {
"api_key": {
"key_id": "key_a1b2c3d4",
"warning": "Save this API key now. You will not be able to see it again."
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.