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

# Managing sources

> Adding, enabling, prioritising and testing data providers from the admin UI.

The Data Sources page at `/data-sources` (admin-only) is the operational surface for every external provider.

## Metric cards

The four cards across the top are clickable filters into the table:

| Card              | Action                                                                                                   |
| ----------------- | -------------------------------------------------------------------------------------------------------- |
| **Total Sources** | Filters to All.                                                                                          |
| **Connected**     | Filters to providers with `status: connected`.                                                           |
| **Issues**        | Filters to `degraded` + `disconnected`.                                                                  |
| **Cost Today**    | Read-only — sum of `requestsToday * costPerRequest` across enabled providers. Also surfaces avg latency. |

## The integration table

Columns:

* **Priority** — drag-handle + up/down buttons. Lower number is queried first when multiple providers cover the same signal.
* **Provider** — name + category.
* **Status** — `connected` / `degraded` / `disconnected` (driven by the last health probe).
* **Response Time** — last health probe.
* **Requests today** — counter from the audit log.
* **Cost / req** — set at provider creation, used by the cost-today card.
* **Success Rate** — last 24h, colour-banded.
* **Enabled** — switch. Disabled providers are skipped by workflows.
* **Actions** — `Test connection` and `Settings`.

## Adding a provider

<Steps>
  <Step title="Click + Add Source">
    Opens the dialog.
  </Step>

  <Step title="Pick from catalogue or go custom">
    The dropdown groups providers by category. Select **+ Custom Provider** if your vendor isn't listed.
  </Step>

  <Step title="Inspect the preview card">
    Shows region tags, features, website and average cost from the catalogue entry.
  </Step>

  <Step title="Resold? Skip credentials.">
    If `resold: true`, the dialog shows the reselling notice and no API key field. Frayme manages the credential.
  </Step>

  <Step title="Otherwise, fill API key + endpoint + cost">
    Standard form. The endpoint placeholder pre-fills from the catalogue website.
  </Step>

  <Step title="Save">
    The provider appears in the table with `status: degraded` until the first successful health probe lands.
  </Step>
</Steps>

## Provider settings

Open the gear icon in the **Actions** column. Resold and BYO providers show different fields:

<Tabs>
  <Tab title="Resold (Sumsub, LSEG, BigDataCorp, Crystal)">
    * Status row (latency, uptime, last sync).
    * **Reselling notice** explaining that credentials and billing are Frayme-managed.
    * Enable / disable toggle.
    * Read-only metrics.
    * No endpoint, no API key, no cost fields.
  </Tab>

  <Tab title="BYO (ThreatMetrix, Plaid, Jumio, …)">
    * Status row.
    * **API endpoint** (mutable).
    * **API key** — masked password input with `Reveal` and rotate-on-save semantics.
    * **Cost per request** (\$).
    * Enable / disable toggle.
    * Read-only metrics.
  </Tab>
</Tabs>

## Test connection

The `Test connection` button (lightning icon in the **Actions** column or inside the Settings dialog) performs a synthetic round-trip against the configured endpoint. Used after rotating credentials or after the provider reports a health change.

## Priority and fallbacks

When two providers cover the same category (e.g. two open-banking providers, two device-fingerprint providers), the lower-priority number is queried first. The [Fallback Rules](/data-sources/fallback-rules) panel below the table lets you bind a fallback provider to fire when the primary degrades.
