Skip to content
Product Docs

API Keys

List Api Keys
ApiKeyListPage apiKeys().list(ApiKeyListParamsparams = ApiKeyListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/beta/api-keys
Create Api Key
ApiKey apiKeys().create(ApiKeyCreateParamsparams = ApiKeyCreateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/beta/api-keys
Delete Api Key
ApiKeyDeleteResponse apiKeys().delete(ApiKeyDeleteParamsparams = ApiKeyDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/api/v1/beta/api-keys/{api_key_id}
ModelsExpand Collapse
class ApiKey:

Schema for an API Key.

String id

Unique identifier

formatuuid
String redactedApiKey

The key with its middle masked, except on the create response, which returns the full secret once and never again.

String userId
Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<LocalDateTime> expiresAt

When the API key expires. Null if the key never expires.

formatdate-time
Optional<KeyType> keyType
One of the following:
AGENT("agent")
USER("user")
Optional<Metadata> metadata
Optional<String> name
Optional<String> projectId
Optional<Role> role

Role capping what this key may do. Null if the key authorizes as its owner.

One of the following:
ADMIN("admin")
AGENT_VIEWER("agent_viewer")
VIEWER("viewer")
VIEWER_V2("viewer_v2")
Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time