201 Created
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
object |
models.CreateAPIKeyObject | ✔️ | N/A | |
id |
str | ✔️ | N/A | ak_3beecc9c60adb5f9b850e91a8ee1e992 |
type |
str | ✔️ | N/A | api_key |
subject |
str | ✔️ | N/A | user_2xhFjEI5X2qWRvtV13BzSj8H6Dk |
name |
str | ✔️ | N/A | MY_SERVICE_API_KEY |
description |
OptionalNullable[str] | ➖ | N/A | This is my API Key |
claims |
Nullable[Any] | ✔️ | N/A | { "foo": "bar" } |
scopes |
List[str] | ✔️ | N/A | [ "read", "write" ] |
secret |
str | ✔️ | N/A | ak_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
revoked |
bool | ✔️ | N/A | false |
revocation_reason |
Nullable[str] | ✔️ | N/A | Revoked by user |
expired |
bool | ✔️ | N/A | false |
expiration |
Nullable[float] | ✔️ | The timestamp for when the API key will expire, in milliseconds | 1716883200 |
created_by |
Nullable[str] | ✔️ | N/A | user_2xhFjEI5X2qWRvtV13BzSj8H6Dk |
last_used_at |
Nullable[float] | ✔️ | The timestamp for when the API key was last used, in milliseconds | 1716883200 |
created_at |
float | ✔️ | The timestamp for when the API key was created, in milliseconds | 1716883200 |
updated_at |
float | ✔️ | The timestamp for when the API key was last updated, in milliseconds | 1716883200 |