> ## Documentation Index
> Fetch the complete documentation index at: https://docs.userepo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sources

> List connectors and their health. Modify Slack channel allowlists.

A "source" in the API is the same thing as a "connector" in the console UI — one OAuth integration with one provider account.

***

## List sources

```http theme={null}
GET https://api.userepo.com/v1/sources
```

Requires `sources:read`.

```json theme={null}
{
  "sources": [
    {
      "id": "uuid",
      "provider": "slack",
      "status": "active",
      "displayName": "Slack workspace T0B2W2YR44R",
      "externalAccountId": "T0B2W2YR44R",
      "lastSyncedAt": "2026-05-30T20:00:00Z",
      "errorMessage": null,
      "channelAllowlist": ["C0123456", "C0789ABC"],
      "sourceItemCount": 142,
      "policyHealth": null,
      "createdAt": "2026-05-22T14:00:00Z",
      "updatedAt": "2026-05-30T20:00:00Z"
    }
  ]
}
```

<ResponseField name="status" type="string">`pending` (just connected, first sync hasn't finished) → `active` (syncing healthy) → `error` (last sync failed) → `disabled` (manually paused).</ResponseField>

<ResponseField name="channelAllowlist" type="string[] | null">Slack only. If non-null, only listed channel IDs are ingested.</ResponseField>

<ResponseField name="policyHealth" type="object | null">Drive only. Surfaces "X files need a full resync to preserve access policies" warnings.</ResponseField>

***

## Get Slack channels for a connector

```http theme={null}
GET https://api.userepo.com/v1/sources/{id}/channels
```

Requires `sources:read`. Slack connectors only — returns `400` for other providers.

```json theme={null}
{
  "channels": [
    { "id": "C0123456", "name": "brand", "isPrivate": false, "memberCount": 12 },
    { "id": "C0789ABC", "name": "dev-updates", "isPrivate": false, "memberCount": 8 }
  ],
  "channelAllowlist": ["C0123456"]
}
```

Use this to populate a UI before calling `PATCH /v1/sources/:id` with an updated allowlist.

***

## Update a source

```http theme={null}
PATCH https://api.userepo.com/v1/sources/{id}
```

Requires `sources:write`. Currently only the Slack channel allowlist is editable.

<ParamField body="channelAllowlist" type="string[] | null" required>
  Pass an array of channel IDs to restrict ingestion to those channels. Pass `null` to disable the allowlist (ingest all channels the bot is a member of).
</ParamField>

```json theme={null}
{
  "id": "uuid",
  "provider": "slack",
  "displayName": "Slack workspace T0B2W2YR44R",
  "channelAllowlist": ["C0123456", "C0789ABC"]
}
```

Changing the allowlist takes effect on the next sync run. To force an immediate refresh, queue a sync via [`/v1/sync-runs`](/api-reference/sync-runs) with `fullResync: true`.
