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:00ZexpiresAtstring,null<date-time>nullable
When the key expires (if set)
Example:
2025-12-31T23:59:59Zidstring<uuid>required
Unique API key identifier
Example:
550e8400-e29b-41d4-a716-446655440000isActivebooleanrequired
Whether the key is currently active
Example:
truekeyPrefixstringrequired
Prefix of the key for identification
Example:
cdx_a1b2c3lastUsedAtstring,null<date-time>nullable
When the key was last used
Example:
2024-01-15T10:30:00Znamestringrequired
Human-readable name for the key
Example:
Mobile App Keypermissionsrequired
Permissions granted to this key
updatedAtstring<date-time>required
When the key was last updated
Example:
2024-01-15T10:30:00ZuserIdstring<uuid>required
Owner user ID
Example:
550e8400-e29b-41d4-a716-446655440001keystringrequired
The plaintext API key (only shown once on creation)
Example:
cdx_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6CreateApiKeyResponse
{
"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"
}