curl --request POST \
--url https://api.royalti.io/asset/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assets": [
{
"title": "Midnight City",
"mainArtist": [
"M83",
"M47"
],
"displayArtist": "M83",
"type": "Audio",
"version": "Album Version",
"isrc": "USRC17607839",
"iswc": "T1234567890",
"mainGenre": [
"Electronic",
"Mental"
],
"subGenre": [
"Synthwave"
],
"explicit": false,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artists": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "primary"
}
],
"split": [
{
"user": "550e8400-e29b-41d4-a716-446655440002",
"share": 100
}
],
"externalId": "<string>",
"contributors": {
"producers": [
"<string>"
],
"mixers": [
"<string>"
]
}
}
]
}
'{
"success": true,
"message": "<string>",
"data": {}
}Create multiple assets in a single request. This is more efficient than making multiple individual requests.
curl --request POST \
--url https://api.royalti.io/asset/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assets": [
{
"title": "Midnight City",
"mainArtist": [
"M83",
"M47"
],
"displayArtist": "M83",
"type": "Audio",
"version": "Album Version",
"isrc": "USRC17607839",
"iswc": "T1234567890",
"mainGenre": [
"Electronic",
"Mental"
],
"subGenre": [
"Synthwave"
],
"explicit": false,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artists": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "primary"
}
],
"split": [
{
"user": "550e8400-e29b-41d4-a716-446655440002",
"share": 100
}
],
"externalId": "<string>",
"contributors": {
"producers": [
"<string>"
],
"mixers": [
"<string>"
]
}
}
]
}
'{
"success": true,
"message": "<string>",
"data": {}
}const response = await fetch('https://api.royalti.io/asset/bulk', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"assets": [
{
"ref": "#/components/schemas/Asset"
}
]
})
});
const data = await response.json();
console.log(data);