API Key

Organization-scoped API keys for programmatic access.

Source: packages/db/src/schema/api-key.ts

apikey

ColumnTypeNotes
idtextPK
nametext
starttext
prefixtext
keytextNOT NULL, indexed (hashed)
organization_idtextFK → organization.id, CASCADE
user_idtextFK → user.id, CASCADE
refill_intervalinteger
refill_amountinteger
last_refill_attimestamp
enabledbooleandefault true
rate_limit_enabledbooleandefault true
rate_limit_time_windowintegerdefault 86400000
rate_limit_maxintegerdefault 10
request_countintegerdefault 0
remaininginteger
last_requesttimestamp
expires_attimestamp
created_attimestampNOT NULL
updated_attimestampNOT NULL
permissionstext
metadatatext

Was this page helpful?

Edit this page