Skip to main content
The ApiKey entity represents API keys in the Well system. It enables authentication and authorization for programmatic data access, with different scope levels (organization, workspace, or person).

Table structure

Table name: api_keys

Main fields

NameTypeRequiredConstraintsAllowed ValuesDescriptionExample
idstring, UUID, πŸ”’ systemβœ… YesUnique identifier (read-only)–Unique identifier for the API key resource”c6f6f4d8-3a7d-4c51-8b7c-1b6e7c66c9f1”
valuestring, πŸ”’ systemβœ… YesUnique, read-only–The secret API key string used for authentication”well_key_xxxxxxxxxxxx”
namestringβœ… Yes1–100 chars–Human label for the key”Production API Key”
expiration_atstring (ISO 8601)βšͺ Nonullable ISO 8601–Optional expiration time”2024-02-15T10:30:00Z”
created_atstring (ISO 8601) πŸ”’ system–auto timestamp–Creation timestamp”2025-08-01T09:00:00Z”
updated_atstring (ISO 8601) πŸ”’ system–auto timestamp–Last update timestamp”2025-08-15T12:00:00Z”

Relations

The ApiKey entity can be associated with different scope levels:

Many-to-One relations (optional)

  • Organisation: Organization-level scope (access to all organization data)
  • Workspace: Workspace-level scope (access to workspace data)
  • People: Personal-level scope (access to personal data)

Relationship schema

ApiKey (N) ←→ (1) Organisation [OPTIONAL]
ApiKey (N) ←→ (1) Workspace [OPTIONAL]  
ApiKey (N) ←→ (1) People [OPTIONAL]

# An API key can only be associated with ONE scope at a time
⌘I