---
title: "List sources"
method: GET
path: "/sites/{site}/sources"
tags: ["Sources"]
---

# List sources

`GET /sites/{site}/sources`

## Request

- Base URL: `https://api.onelence.com/v1`
- URL: `https://api.onelence.com/v1/sites/{site}/sources`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://api.onelence.com/oauth/authorize`, token URL `https://api.onelence.com/oauth/token`, scopes: `decisions:read`)
  - HTTP bearer

The traffic sources on a site with visitors, conversions and, for sources on the decision board, their posture. Context sources (owned, utility) have no Decision. A visitor who arrived from several sources counts under each. Without start and end, counts cover the last 30 completed UTC days (see window).

## Path parameters

- `site` string, required

## Query parameters

- `start` string
- `end` string
- `group` 'decision' | 'acquisition' | 'owned' | 'utility'
- `type` 'source' | 'affiliate'
- `limit` integer
- `cursor` string

## Response `200`

Success.

- object
  - `object` 'list', required
  - `data` object[], required
    - `object` 'source', required
    - `id` string, required
    - `name` string, required
    - `type` 'source' | 'affiliate', required
    - `channel` string, nullable, required
    - `role` string, nullable, required
    - `group` 'decision' | 'acquisition' | 'owned' | 'utility', required
    - `posture` 'scale' | 'hold' | 'stop', nullable, required
    - `metrics` object, required
      - `visitors` number, nullable, required
      - `conversions` number, nullable, required
      - `conversion_rate` number, nullable, required
      - `traffic_share` number, nullable, required
  - `has_more` boolean, required
  - `next_cursor` string, nullable, required
  - `window` object, required
    - `start` string, nullable, required
    - `end` string, nullable, required

## Other responses

- `400`: Invalid input; `error.param` names the field.
- `401`: Missing, expired or revoked token. WWW-Authenticate points to the resource metadata.
- `402`: subscription_required or upgrade_required; the error carries billing_url.
- `403`: insufficient_scope or admin_required.
- `404`: Unknown endpoint, site, source or record.
- `429`: Rate limited. Retry after Retry-After seconds.
- `500`: OneLence could not complete the request.

---

[API](https://skmtc.dev/onelence/apis/onelence-api.md) · [All operations](https://skmtc.dev/onelence/apis/onelence-api/llms.txt) · [OpenAPI document](https://skmtc.dev/onelence/apis/onelence-api/revisions/971c72fe9a42?raw)
