Create API key
Create a new API key for the authenticated user.
The full key value is returned only once in the creation response and cannot be retrieved again afterwards.
expires_at is required:
- A future datetime expires the key at that time.
nullcreates a key that never expires.
Workspace scoping (optional): include scopes — a list of {workspace_id, permission} entries — to restrict the key to those workspaces. Each entry’s permission is one of viewer, editor, or owner, and cannot exceed the role you currently hold on that workspace; a 400 is returned otherwise. Different scopes on the same key can carry different permissions.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Reject any request fields not declared on the serializer.
250Expiration datetime for the API key. Set to a future datetime to expire the key at that time, or null to create a key that never expires.
Optional list of {workspace_id, role} entries. Providing this field marks the key as workspace-scoped: it can only access the listed workspaces, with the per-workspace role shown. The requested role on each workspace is capped at the role you currently hold there.