latestOpenAPI 3.0.32026-08-10234358.4 KB

3d5d69795558

ApiKeys

Create an API key

Generate a new API key

post/user-service/api-keys

Request body

type'TEAM' | 'USER' required

Type of API key (scope)

user_idstring uuid nullable

User ID (required when type is USER)

team_idstring uuid nullable

Team ID (required when type is TEAM)

aliasstring nullable

Human-readable alias for the API key

descriptionstring nullable

Description of the API key's purpose

expires_atstring date-time nullable

When the API key should expire (must be in the future, RFC3339 format)

created_bystring email nullable

Email address of the person creating this API key (will be looked up in the database)

system_generatedboolean nullable

If true, creates an SA type user with admin role and attaches the API key to it (similar to migration logic)

Response

Created API key

idstring uuid required

Unique identifier for the API key

keystring required

The key identifier (defaults to id for legacy keys, can be updated to any string value)

is_legacyboolean required

Whether this is a legacy API key

account_idstring required

Account identifier this API key belongs to

type'TEAM' | 'USER' required

Type of API key (scope)

user_idstring uuid nullable

User ID if this is a user-scoped API key

user_namestring nullable

Name of the user if this is a user-scoped API key

team_idstring uuid nullable

Team ID if this is a team-scoped API key

team_namestring nullable

Name of the team if this is a team-scoped API key

aliasstring nullable

Human-readable alias for the API key

descriptionstring nullable

Description of the API key's purpose

expires_atstring date-time nullable

When the API key expires

last_usedstring date-time nullable

When the API key was last used for authentication

created_bystring uuid nullable

User ID of the person who created this API key

created_by_namestring nullable

Name of the user who created this API key

created_atstring date-time required

When the API key was created

updated_atstring date-time

When the API key was last updated

secretstring required

The API key secret (only returned on creation, plaintext with ffl_live_ prefix)