Skip to main content
POST
/
sources
Add Tenant Source
curl --request POST \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/sources \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "royaltySourceId": "src-1",
  "settings": {},
  "replacements": {}
}'
{
  "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.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/sources', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "royaltySourceId": "src-1",
    "settings": {},
    "replacements": {}
  })
});

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

Authorizations

Authorization
string
header
required

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

Body

application/json
royaltySourceId
string
required
Example:

"src-1"

settings
object
Example:
{}
replacements
object
Example:
{}

Response

Tenant source association created

id
string
Example:

"ts-1"

settings
object
Example:
{}
replacements
object
Example:
{}
royaltySource
object