Skip to main content
GET
/
sources
/
admin
List All Royalty Sources (Admin)
curl --request GET \
  --url https://api.royalti.io/sources/admin \
  --header 'Authorization: Bearer <token>'
{
  "count": 2,
  "rows": [
    {
      "id": "src-1",
      "name": "Spotify",
      "label": "Spotify",
      "type": "DSP",
      "format": "csv",
      "public": true
    },
    {
      "id": "src-2",
      "name": "Apple Music",
      "label": "Apple Music",
      "type": "DSP",
      "format": "csv",
      "public": true
    }
  ]
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Required Permissions

  • sources:admin:read

Query Parameters Behavior

distinct=false (default): Returns paginated response with full source details
  • Response format: { count: number, rows: RoyaltySource[] }
  • Includes tenant associations
  • Respects pagination parameters
distinct=true: Returns array of distinct public sources grouped by name/label
  • Response format: RoyaltySource[] (direct array, not paginated)
  • Only includes sources where isActive=true and public=true
  • Grouped by lowercase name and label
  • Pagination parameters are ignored

Business Rules

  • All sources are filtered by isActive=true
  • Name field is automatically normalized to lowercase on creation

Code Examples

const response = await fetch('https://api.royalti.io/sources/admin', {
  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 distinct public sources (non-paginated). If 'false', returns paginated response with all active sources.

Available options:
true,
false

Response

List of royalty sources

count
integer
Example:

2

rows
object[]