Skip to main content
GET
/
sources
List Tenant Sources
curl --request GET \
  --url https://api.royalti.io/sources \
  --header 'Authorization: Bearer <token>'
{
  "count": 1,
  "rows": [
    {
      "id": "ts-1",
      "settings": {},
      "replacements": {},
      "royaltySource": {
        "id": "src-1",
        "name": "Spotify",
        "label": "Spotify",
        "type": "DSP",
        "format": "csv",
        "public": true
      }
    }
  ]
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Required Permissions

  • sources:read

Query Parameters Behavior

distinct=false (default): Returns paginated tenant source associations
  • Response format: { count: number, rows: TenantSource[] }
  • Shows tenant’s configured sources with settings and replacements
  • Respects pagination parameters
distinct=true: Returns array of all available public sources
  • Response format: RoyaltySource[] (direct array, not paginated)
  • Shows all public sources available to add (not just tenant’s sources)
  • Only includes sources where isActive=true and public=true
  • Pagination parameters are ignored

Business Rules

  • Only shows active sources (isActive=true)
  • Tenant context automatically determined from authentication

Code Examples

const response = await fetch('https://api.royalti.io/sources', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${token}`,
  },
});

const data = await response.json();
console.log(data);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Query Parameters

page
integer
default:1

Page number for pagination (ignored when distinct=true)

Example:

1

size
integer
default:100

Page size for pagination (ignored when distinct=true)

Example:

100

distinct
enum<string>
default:false

If 'true', returns array of all available public sources (non-paginated). If 'false', returns paginated tenant source associations.

Available options:
true,
false

Response

List of tenant sources

count
integer
Example:

1

rows
object[]