curl --request POST \
--url https://api.royalti.io/split/default \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assetId": "d1c5b49e-95fa-4aed-930e-cf314c16a53d",
"type": "Publishing",
"split": [
{
"user": "cf960b5a-37cd-484a-b461-0b191b09bed1",
"share": 60
},
{
"user": "4e39b347-7db0-417d-a5bc-3d8493c9ce19",
"share": 40
}
]
}
'{
"message": "Split created successfully",
"split": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Default Split - Song Title (ISRC12345678)",
"type": "Publishing",
"AssetId": "d1c5b49e-95fa-4aed-930e-cf314c16a53d",
"ProductId": null,
"createdAt": "2023-06-01T12:00:00.000Z",
"updatedAt": "2023-06-01T12:00:00.000Z"
},
"source": "manual"
}/split/default
curl --request POST \
--url https://api.royalti.io/split/default \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assetId": "d1c5b49e-95fa-4aed-930e-cf314c16a53d",
"type": "Publishing",
"split": [
{
"user": "cf960b5a-37cd-484a-b461-0b191b09bed1",
"share": 60
},
{
"user": "4e39b347-7db0-417d-a5bc-3d8493c9ce19",
"share": 40
}
]
}
'{
"message": "Split created successfully",
"split": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Default Split - Song Title (ISRC12345678)",
"type": "Publishing",
"AssetId": "d1c5b49e-95fa-4aed-930e-cf314c16a53d",
"ProductId": null,
"createdAt": "2023-06-01T12:00:00.000Z",
"updatedAt": "2023-06-01T12:00:00.000Z"
},
"source": "manual"
}/split/default endpoint creates splits using either provided shares or an artist’s default splits. It automatically associates the split with an asset or product and validates that the total share equals 100%.
Method:POST
Request Body:
The request body should be a JSON object with the following properties. Either assetId or productId is required.
| Parameter | Type | Required | Description |
|---|---|---|---|
| split | array | No | Array of split share objects (if not provided, uses artist’s default splits) |
| assetId | string | Conditional | UUID of the asset to create splits for (required if productId not provided) |
| productId | string | Conditional | UUID of the product to create splits for (required if assetId not provided) |
| type | string | No | Type of split (defaults to ‘default’ if not provided) |
| Parameter | Type | Required | Description |
|---|---|---|---|
| user | string | Yes | UUID of the user |
| share | number | Yes | Percentage share (must total 100% across all shares) |
const response = await fetch('https://api.royalti.io/split/default', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"split": [
{
"user": "sample-user",
"share": 1
}
],
"assetId": "sample-assetId",
"productId": "sample-productId",
"type": "sample-type"
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
UUID of the asset to create splits for (required if productId not provided)
Array of split share objects
Show child attributes
UUID of the product to create splits for (required if assetId not provided)
Type of split (defaults to 'default' if not provided)