Skip to main content

CreateApiKeyResponse

API key creation response (includes plaintext key only on creation)

createdAtstring<date-time>required

When the key was created

Example: 2024-01-01T00:00:00Z
expiresAtstring,null<date-time>nullable

When the key expires (if set)

Example: 2025-12-31T23:59:59Z
idstring<uuid>required

Unique API key identifier

Example: 550e8400-e29b-41d4-a716-446655440000
isActivebooleanrequired

Whether the key is currently active

Example: true
keyPrefixstringrequired

Prefix of the key for identification

Example: cdx_a1b2c3
lastUsedAtstring,null<date-time>nullable

When the key was last used

Example: 2024-01-15T10:30:00Z
namestringrequired

Human-readable name for the key

Example: Mobile App Key
permissionsrequired

Permissions granted to this key

updatedAtstring<date-time>required

When the key was last updated

Example: 2024-01-15T10:30:00Z
userIdstring<uuid>required

Owner user ID

Example: 550e8400-e29b-41d4-a716-446655440001
keystringrequired

The plaintext API key (only shown once on creation)

Example: cdx_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
CreateApiKeyResponse
{
"createdAt": "2024-01-01T00:00:00Z",
"expiresAt": "2025-12-31T23:59:59Z",
"id": "550e8400-e29b-41d4-a716-446655440000",
"isActive": true,
"keyPrefix": "cdx_a1b2c3",
"lastUsedAt": "2024-01-15T10:30:00Z",
"name": "Mobile App Key",
"updatedAt": "2024-01-15T10:30:00Z",
"userId": "550e8400-e29b-41d4-a716-446655440001",
"key": "cdx_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
}