Skip to main content
POST

Request

Requires manage team permission on the workspace (Owner / Admin). Members and Viewers get 403.
string
required
The API key name. Maximum 255 characters.
string
Optional expiration. Any date string the server can parse (e.g. 2026-12-31, 2026-12-31T15:00:00Z), must be today or later (after_or_equal:today). Date-only values are stored as end of that day. Omit for a non-expiring key.

Response

Returns 201 with the new key plus the plain token. The plain token is shown only here — store it immediately.
object
Same shape as one entry in GET /api-keysid, name, last_used_at, expires_at, created_at (all timestamps ISO 8601).
string
The opaque bearer token to send in Authorization: Bearer …. Never returned again.
Copy the plain_token immediately after creation. TryPost stores a hash of your API key, not the key itself. If you lose it, you’ll need to create a new one.