app.personal_access_tokens
TableRow level security on
Personal API tokens (Section 4.5.6 personal settings item 15): one person's token for one org, where the org allows them (developer.personal_tokens). The secret is shown once; only its SHA-256 hash is stored. A token acts as its person, narrowed to its scopes.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org. A row never moves to another org.References app.organizations.id |
| person_id | uuid | No | Person the token acts as.References app.people.id |
| name | text | No | Token name the person chose, for example Laptop scripts. |
| prefix | text | No | Visible start of the secret (xos_pat_ and 8 hex digits), so people can tell tokens apart. |
| secret_hash | bytea | No | SHA-256 of the full secret. Never readable by signed-in callers. |
| expires_at | timestamp with time zone | No | When the token stops working. At most one year after creation. |
| last_used_at | timestamp with time zone | Yes | When the token last authenticated a request, to the minute. |
| revoked_at | timestamp with time zone | Yes | When the token was revoked; a revoked token never works again. |
| revoked_by | uuid | Yes | Person who revoked the token: its owner or an org admin.References app.people.id |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |