app.integration_connections
TableRow level security on
An org's connection to one provider account (Section 17). Holds non-secret metadata only: the credential itself lives in Supabase Vault (Section 9) and is read only by the service role. One live connection per org, provider and provider account.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Org that owns the connection.References app.organizations.id |
| provider_code | text | No | Connector from the provider catalog. Fixed after insert.References private.integration_providers.provider_code |
| display_name | text | No | Name the org gives the connection. |
| external_account_id | text | Yes | Provider tenant, company, workspace or account identifier. |
| external_account_name | text | Yes | Provider account name, as the provider reports it. |
| provider_settings | jsonb | No | Provider configuration payload (calendar ids, default accounts, channel routing defaults), validated by the connector. Never holds secrets. |
| connection_state | app.integration_connection_state | No | Connection state. Changes only through app.transition_integration_connection and the runner RPCs. |
| credential_kind | app.integration_credential_kind | Yes | Kind of the stored Vault credential, or NULL when none is stored. Set only by app.store_integration_credential. |
| credential_stored_at | timestamp with time zone | Yes | When the current credential was stored. Set only by app.store_integration_credential. |
| credential_expires_at | timestamp with time zone | Yes | When the stored credential expires, when the provider says. |
| last_synced_at | timestamp with time zone | Yes | When a sync run last succeeded. |
| last_error_code | text | Yes | Rule code of the last connection error, cleared on success. |
| last_error_message | text | Yes | Provider message of the last connection error, cleared on success. |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| 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 |