Skip to main content
POST
/
artist
/
{id}
/
splits
Create new default splits for an artist
curl --request POST \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/artist/{id}/splits \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "splits": [
    {
      "TenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "share": 50,
      "type": "<string>"
    }
  ]
}'
{
  "message": "Splits created successfully",
  "result": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "artistId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "type": "master",
      "splits": [
        {
          "recipientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "recipientType": "user",
          "percentage": 50,
          "role": "<string>"
        }
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ]
}
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/artist/example-id/splits', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "splits": [
      {
        "TenantUserId": "sample-TenantUserId",
        "share": 1,
        "type": "sample-type"
      }
    ]
  })
});

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

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Artist ID

Body

application/json
splits
object[]
Minimum length: 1

Response

Splits created successfully

message
string
Example:

"Splits created successfully"

result
object[]