app.idempotency_keys
TableRow level security on
Idempotency-Key ledger per tenant (ADR 0003, Section 5 rule 4): two devices or tabs draining one queue never file a record twice. A key lives 24 hours; a replay returns the stored response.
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 |
| idempotency_key | text | No | Idempotency-Key header value, unique per org. |
| person_id | uuid | Yes | Person whose request first used the key.References app.people.id |
| request_hash | bytea | No | SHA-256 of method, path and body of the first request; a different request under the same key is refused. |
| response_status | smallint | Yes | HTTP status of the original response, once it completed. |
| response_body | jsonb | Yes | Original response body (an API provider payload, ADR 0002), returned verbatim on replay. |
| completed_at | timestamp with time zone | Yes | When the original request completed. |
| 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. |