Create split
curl --request POST \
--url https://api.royalti.io/split/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": "d1c5b49e-95fa-4aed-930e-cf314c16a53d",
"product": "b53230c5-2110-40ce-abe5-2112724ffb53",
"type": "Publishing",
"startDate": "2022-01-01",
"endDate": "2022-01-31",
"name": "Nigerian split train",
"split": [
{
"user": "cf960b5a-37cd-484a-b461-0b191b09bed1",
"share": 60
},
{
"user": "4e39b347-7db0-417d-a5bc-3d8493c9ce19",
"share": 40
}
]
}
'import requests
url = "https://api.royalti.io/split/"
payload = {
"asset": "d1c5b49e-95fa-4aed-930e-cf314c16a53d",
"product": "b53230c5-2110-40ce-abe5-2112724ffb53",
"type": "Publishing",
"startDate": "2022-01-01",
"endDate": "2022-01-31",
"name": "Nigerian split train",
"split": [
{
"user": "cf960b5a-37cd-484a-b461-0b191b09bed1",
"share": 60
},
{
"user": "4e39b347-7db0-417d-a5bc-3d8493c9ce19",
"share": 40
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset: 'd1c5b49e-95fa-4aed-930e-cf314c16a53d',
product: 'b53230c5-2110-40ce-abe5-2112724ffb53',
type: 'Publishing',
startDate: '2022-01-01',
endDate: '2022-01-31',
name: 'Nigerian split train',
split: [
{user: 'cf960b5a-37cd-484a-b461-0b191b09bed1', share: 60},
{user: '4e39b347-7db0-417d-a5bc-3d8493c9ce19', share: 40}
]
})
};
fetch('https://api.royalti.io/split/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.royalti.io/split/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'asset' => 'd1c5b49e-95fa-4aed-930e-cf314c16a53d',
'product' => 'b53230c5-2110-40ce-abe5-2112724ffb53',
'type' => 'Publishing',
'startDate' => '2022-01-01',
'endDate' => '2022-01-31',
'name' => 'Nigerian split train',
'split' => [
[
'user' => 'cf960b5a-37cd-484a-b461-0b191b09bed1',
'share' => 60
],
[
'user' => '4e39b347-7db0-417d-a5bc-3d8493c9ce19',
'share' => 40
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.royalti.io/split/"
payload := strings.NewReader("{\n \"asset\": \"d1c5b49e-95fa-4aed-930e-cf314c16a53d\",\n \"product\": \"b53230c5-2110-40ce-abe5-2112724ffb53\",\n \"type\": \"Publishing\",\n \"startDate\": \"2022-01-01\",\n \"endDate\": \"2022-01-31\",\n \"name\": \"Nigerian split train\",\n \"split\": [\n {\n \"user\": \"cf960b5a-37cd-484a-b461-0b191b09bed1\",\n \"share\": 60\n },\n {\n \"user\": \"4e39b347-7db0-417d-a5bc-3d8493c9ce19\",\n \"share\": 40\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.royalti.io/split/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"asset\": \"d1c5b49e-95fa-4aed-930e-cf314c16a53d\",\n \"product\": \"b53230c5-2110-40ce-abe5-2112724ffb53\",\n \"type\": \"Publishing\",\n \"startDate\": \"2022-01-01\",\n \"endDate\": \"2022-01-31\",\n \"name\": \"Nigerian split train\",\n \"split\": [\n {\n \"user\": \"cf960b5a-37cd-484a-b461-0b191b09bed1\",\n \"share\": 60\n },\n {\n \"user\": \"4e39b347-7db0-417d-a5bc-3d8493c9ce19\",\n \"share\": 40\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/split/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"asset\": \"d1c5b49e-95fa-4aed-930e-cf314c16a53d\",\n \"product\": \"b53230c5-2110-40ce-abe5-2112724ffb53\",\n \"type\": \"Publishing\",\n \"startDate\": \"2022-01-01\",\n \"endDate\": \"2022-01-31\",\n \"name\": \"Nigerian split train\",\n \"split\": [\n {\n \"user\": \"cf960b5a-37cd-484a-b461-0b191b09bed1\",\n \"share\": 60\n },\n {\n \"user\": \"4e39b347-7db0-417d-a5bc-3d8493c9ce19\",\n \"share\": 40\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "8a8f3ee8-8855-4749-9649-897f9e0e6c6b",
"AssetId": "2e0d9f94-59eb-4ef8-adc6-9f3ddebf49fc",
"ProductId": "76293a6e-6c0a-4842-84b5-6bffbe1ea538",
"type": "Publishing",
"startDate": "2022-01-01T00:00:00.000Z",
"endDate": "2022-01-31T00:00:00.000Z",
"name": "Nigerian split train",
"contract": null,
"ContractId": null,
"conditions": null,
"TenantId": 2
}{
"msg": "operator does not exist: text = text[]"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}Splits
Create split
Create Revenue Split
POST
/
split
/
Create split
curl --request POST \
--url https://api.royalti.io/split/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": "d1c5b49e-95fa-4aed-930e-cf314c16a53d",
"product": "b53230c5-2110-40ce-abe5-2112724ffb53",
"type": "Publishing",
"startDate": "2022-01-01",
"endDate": "2022-01-31",
"name": "Nigerian split train",
"split": [
{
"user": "cf960b5a-37cd-484a-b461-0b191b09bed1",
"share": 60
},
{
"user": "4e39b347-7db0-417d-a5bc-3d8493c9ce19",
"share": 40
}
]
}
'import requests
url = "https://api.royalti.io/split/"
payload = {
"asset": "d1c5b49e-95fa-4aed-930e-cf314c16a53d",
"product": "b53230c5-2110-40ce-abe5-2112724ffb53",
"type": "Publishing",
"startDate": "2022-01-01",
"endDate": "2022-01-31",
"name": "Nigerian split train",
"split": [
{
"user": "cf960b5a-37cd-484a-b461-0b191b09bed1",
"share": 60
},
{
"user": "4e39b347-7db0-417d-a5bc-3d8493c9ce19",
"share": 40
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset: 'd1c5b49e-95fa-4aed-930e-cf314c16a53d',
product: 'b53230c5-2110-40ce-abe5-2112724ffb53',
type: 'Publishing',
startDate: '2022-01-01',
endDate: '2022-01-31',
name: 'Nigerian split train',
split: [
{user: 'cf960b5a-37cd-484a-b461-0b191b09bed1', share: 60},
{user: '4e39b347-7db0-417d-a5bc-3d8493c9ce19', share: 40}
]
})
};
fetch('https://api.royalti.io/split/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.royalti.io/split/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'asset' => 'd1c5b49e-95fa-4aed-930e-cf314c16a53d',
'product' => 'b53230c5-2110-40ce-abe5-2112724ffb53',
'type' => 'Publishing',
'startDate' => '2022-01-01',
'endDate' => '2022-01-31',
'name' => 'Nigerian split train',
'split' => [
[
'user' => 'cf960b5a-37cd-484a-b461-0b191b09bed1',
'share' => 60
],
[
'user' => '4e39b347-7db0-417d-a5bc-3d8493c9ce19',
'share' => 40
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.royalti.io/split/"
payload := strings.NewReader("{\n \"asset\": \"d1c5b49e-95fa-4aed-930e-cf314c16a53d\",\n \"product\": \"b53230c5-2110-40ce-abe5-2112724ffb53\",\n \"type\": \"Publishing\",\n \"startDate\": \"2022-01-01\",\n \"endDate\": \"2022-01-31\",\n \"name\": \"Nigerian split train\",\n \"split\": [\n {\n \"user\": \"cf960b5a-37cd-484a-b461-0b191b09bed1\",\n \"share\": 60\n },\n {\n \"user\": \"4e39b347-7db0-417d-a5bc-3d8493c9ce19\",\n \"share\": 40\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.royalti.io/split/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"asset\": \"d1c5b49e-95fa-4aed-930e-cf314c16a53d\",\n \"product\": \"b53230c5-2110-40ce-abe5-2112724ffb53\",\n \"type\": \"Publishing\",\n \"startDate\": \"2022-01-01\",\n \"endDate\": \"2022-01-31\",\n \"name\": \"Nigerian split train\",\n \"split\": [\n {\n \"user\": \"cf960b5a-37cd-484a-b461-0b191b09bed1\",\n \"share\": 60\n },\n {\n \"user\": \"4e39b347-7db0-417d-a5bc-3d8493c9ce19\",\n \"share\": 40\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/split/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"asset\": \"d1c5b49e-95fa-4aed-930e-cf314c16a53d\",\n \"product\": \"b53230c5-2110-40ce-abe5-2112724ffb53\",\n \"type\": \"Publishing\",\n \"startDate\": \"2022-01-01\",\n \"endDate\": \"2022-01-31\",\n \"name\": \"Nigerian split train\",\n \"split\": [\n {\n \"user\": \"cf960b5a-37cd-484a-b461-0b191b09bed1\",\n \"share\": 60\n },\n {\n \"user\": \"4e39b347-7db0-417d-a5bc-3d8493c9ce19\",\n \"share\": 40\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "8a8f3ee8-8855-4749-9649-897f9e0e6c6b",
"AssetId": "2e0d9f94-59eb-4ef8-adc6-9f3ddebf49fc",
"ProductId": "76293a6e-6c0a-4842-84b5-6bffbe1ea538",
"type": "Publishing",
"startDate": "2022-01-01T00:00:00.000Z",
"endDate": "2022-01-31T00:00:00.000Z",
"name": "Nigerian split train",
"contract": null,
"ContractId": null,
"conditions": null,
"TenantId": 2
}{
"msg": "operator does not exist: text = text[]"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
Create Revenue Split The Split Revenue endpoint allows you to split revenue generated from a specific asset and product among multiple users. This endpoint calculates the revenue shares based on the provided split percentages for each user. Authorization:- Required role:
adminor higher
- Splits support temporal periods with
startDateandendDate - startDate is INCLUSIVE - the split becomes active on this date
- endDate is EXCLUSIVE - the split ends before this date (not included)
- Example:
startDate: "2025-01-01", endDate: "2025-04-01"covers Jan 1 through Mar 31 - Adjacent splits: Next split can start on the previous split’s endDate (no gap)
- Permanent splits: Omit both dates for indefinite coverage
- Q1 Split:
startDate: "2025-01-01", endDate: "2025-04-01"(covers Jan-Mar) - Q2 Split:
startDate: "2025-04-01", endDate: "2025-07-01"(starts Apr 1, covers Apr-Jun) - Q3 Split:
startDate: "2025-07-01", endDate: "2025-10-01"(starts Jul 1, covers Jul-Sep)
- Split shares must total exactly 100%
- Overlapping temporal splits are prevented (same asset/product/type)
- At least one of
assetorproductmust be provided
| Parameter | Type | Required | Description |
|---|---|---|---|
| asset | string | Conditional | The UUID of the asset related to the revenue (required if product not provided) |
| product | string | Conditional | The UUID of the product related to the revenue (required if asset not provided) |
| type | string | No | The type of revenue (e.g., Publishing, YouTube, Live) |
| startDate | string | No | The start date of the split period (INCLUSIVE - period begins on this date) |
| endDate | string | No | The end date of the split period (EXCLUSIVE - period ends before this date) |
| name | string | No | The name or description of the revenue split |
| conditions | array | No | Array of condition objects for split matching (territory, DSP, usage type filters) |
| contract | string | No | Contract details |
| ContractId | string | No | Contract ID |
| memo | string | No | Additional notes |
| split | array | Yes | An array of objects containing user shares (must total 100%) |
Code Examples
const response = await fetch('https://api.royalti.io/split/', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"asset": "sample-asset",
"product": "sample-product",
"type": "sample-type",
"startDate": "2024-01-21",
"endDate": "2024-01-21",
"name": "sample-name",
"split": [
{
"ref": "#/components/schemas/SplitShare"
}
],
"conditions": [
{
"mode": "sample-mode",
"memo": "sample-memo",
"territories": [
{}
],
"dsps": [
{}
],
"usageTypes": [
{}
],
"customDimension": "sample-customDimension",
"customValues": [
{}
]
}
],
"contract": "sample-contract",
"ContractId": "sample-ContractId",
"memo": "sample-memo"
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://api.royalti.io/split/',
headers={
'Authorization': f'Bearer {token}'
},
json={"asset":"sample-asset","product":"sample-product","type":"sample-type","startDate":"2024-01-21","endDate":"2024-01-21","name":"sample-name","split":[{"ref":"#/components/schemas/SplitShare"}],"conditions":[{"mode":"sample-mode","memo":"sample-memo","territories":[{}],"dsps":[{}],"usageTypes":[{}],"customDimension":"sample-customDimension","customValues":[{}]}],"contract":"sample-contract","ContractId":"sample-ContractId","memo":"sample-memo"}
)
data = response.json()
print(data)
curl -X POST https://api.royalti.io/split/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"asset":"sample-asset","product":"sample-product","type":"sample-type","startDate":"2024-01-21","endDate":"2024-01-21","name":"sample-name","split":[{"ref":"#/components/schemas/SplitShare"}],"conditions":[{"mode":"sample-mode","memo":"sample-memo","territories":[{}],"dsps":[{}],"usageTypes":[{}],"customDimension":"sample-customDimension","customValues":[{}]}],"contract":"sample-contract","ContractId":"sample-ContractId","memo":"sample-memo"}'
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Body
application/json
An array of objects containing user shares
Show child attributes
Show child attributes
The UUID of the asset related to the revenue
The UUID of the product related to the revenue
The type of revenue (e.g., Publishing, YouTube, Live)
The start date of the split period (inclusive)
The end date of the split period (exclusive)
The name or description of the revenue split
Conditions for split matching
Show child attributes
Show child attributes
⌘I