API Key
Organization-scoped API keys for programmatic access.
Source: packages/db/src/schema/api-key.ts
apikey
| Column | Type | Notes |
|---|---|---|
id | text | PK |
name | text | |
start | text | |
prefix | text | |
key | text | NOT NULL, indexed (hashed) |
organization_id | text | FK → organization.id, CASCADE |
user_id | text | FK → user.id, CASCADE |
refill_interval | integer | |
refill_amount | integer | |
last_refill_at | timestamp | |
enabled | boolean | default true |
rate_limit_enabled | boolean | default true |
rate_limit_time_window | integer | default 86400000 |
rate_limit_max | integer | default 10 |
request_count | integer | default 0 |
remaining | integer | |
last_request | timestamp | |
expires_at | timestamp | |
created_at | timestamp | NOT NULL |
updated_at | timestamp | NOT NULL |
permissions | text | |
metadata | text |
Was this page helpful?