Skip to main content
POST

Overview

Creates a new API key for the authenticated user. The plaintext key is returned only once in this response — store it securely. Optionally restrict the key to specific services, tools, or spending limits using the permissions field. Auth: Requires JWT token (Authorization: Bearer <token>).

Body Parameters

string
required
Display name for the API key (e.g., “Production”, “Agent Key”)
object
Optional resource-based permissions. If omitted or null, the key has unrestricted access.

Response

string
API key UUID
string
The plaintext API key (shown once only — store securely)
string
First 8 characters of the key (for identification)
string
Display name
string
ISO 8601 creation timestamp
string
Last usage timestamp (null on creation)
object
Resource permissions (null = unrestricted)

Example