Create Template
curl --request POST \
--url https://api.royalti.io/defaultsettings/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Hip-Hop Album Defaults",
"description": "Standard settings for hip-hop album releases",
"category": "content",
"entityType": "release",
"settings": {
"content": {
"type": "Audio",
"format": "Album",
"mainGenre": [
"Hip-Hop",
"Rap"
],
"explicit": "explicit",
"language": "en"
}
},
"isPublic": true,
"tags": [
"hip-hop",
"album",
"explicit"
]
}
'import requests
url = "https://api.royalti.io/defaultsettings/templates"
payload = {
"name": "Hip-Hop Album Defaults",
"description": "Standard settings for hip-hop album releases",
"category": "content",
"entityType": "release",
"settings": { "content": {
"type": "Audio",
"format": "Album",
"mainGenre": ["Hip-Hop", "Rap"],
"explicit": "explicit",
"language": "en"
} },
"isPublic": True,
"tags": ["hip-hop", "album", "explicit"]
}
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({
name: 'Hip-Hop Album Defaults',
description: 'Standard settings for hip-hop album releases',
category: 'content',
entityType: 'release',
settings: {
content: {
type: 'Audio',
format: 'Album',
mainGenre: ['Hip-Hop', 'Rap'],
explicit: 'explicit',
language: 'en'
}
},
isPublic: true,
tags: ['hip-hop', 'album', 'explicit']
})
};
fetch('https://api.royalti.io/defaultsettings/templates', 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/defaultsettings/templates",
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([
'name' => 'Hip-Hop Album Defaults',
'description' => 'Standard settings for hip-hop album releases',
'category' => 'content',
'entityType' => 'release',
'settings' => [
'content' => [
'type' => 'Audio',
'format' => 'Album',
'mainGenre' => [
'Hip-Hop',
'Rap'
],
'explicit' => 'explicit',
'language' => 'en'
]
],
'isPublic' => true,
'tags' => [
'hip-hop',
'album',
'explicit'
]
]),
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/defaultsettings/templates"
payload := strings.NewReader("{\n \"name\": \"Hip-Hop Album Defaults\",\n \"description\": \"Standard settings for hip-hop album releases\",\n \"category\": \"content\",\n \"entityType\": \"release\",\n \"settings\": {\n \"content\": {\n \"type\": \"Audio\",\n \"format\": \"Album\",\n \"mainGenre\": [\n \"Hip-Hop\",\n \"Rap\"\n ],\n \"explicit\": \"explicit\",\n \"language\": \"en\"\n }\n },\n \"isPublic\": true,\n \"tags\": [\n \"hip-hop\",\n \"album\",\n \"explicit\"\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/defaultsettings/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Hip-Hop Album Defaults\",\n \"description\": \"Standard settings for hip-hop album releases\",\n \"category\": \"content\",\n \"entityType\": \"release\",\n \"settings\": {\n \"content\": {\n \"type\": \"Audio\",\n \"format\": \"Album\",\n \"mainGenre\": [\n \"Hip-Hop\",\n \"Rap\"\n ],\n \"explicit\": \"explicit\",\n \"language\": \"en\"\n }\n },\n \"isPublic\": true,\n \"tags\": [\n \"hip-hop\",\n \"album\",\n \"explicit\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/defaultsettings/templates")
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 \"name\": \"Hip-Hop Album Defaults\",\n \"description\": \"Standard settings for hip-hop album releases\",\n \"category\": \"content\",\n \"entityType\": \"release\",\n \"settings\": {\n \"content\": {\n \"type\": \"Audio\",\n \"format\": \"Album\",\n \"mainGenre\": [\n \"Hip-Hop\",\n \"Rap\"\n ],\n \"explicit\": \"explicit\",\n \"language\": \"en\"\n }\n },\n \"isPublic\": true,\n \"tags\": [\n \"hip-hop\",\n \"album\",\n \"explicit\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Template created successfully",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"settings": {
"content": {
"version": "<string>",
"language": "<string>",
"mainGenre": [
"<string>"
],
"subGenre": [
"<string>"
],
"contributors": {}
},
"business": {
"label": "<string>",
"copyright": "<string>",
"publisher": "<string>",
"copyrightOwner": "<string>",
"distribution": "<string>"
},
"ddex": {
"enableDDEX": true,
"labelName": "<string>",
"resourceReference": "<string>",
"grid": "<string>",
"icpn": "<string>"
},
"validation": {
"requireGenre": true,
"requireLyrics": true,
"requireDescription": true,
"minimumTrackCount": 1,
"maximumTrackCount": 2
}
},
"description": "<string>",
"isPublic": true,
"isSystem": false,
"usageCount": 0,
"tags": [
"<string>"
],
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"message": "Invalid request parameters"
}{
"status": "error",
"message": "Unauthorized"
}{
"success": false,
"error": {
"code": "CONFLICT",
"message": "A default setting for this entity and category already exists"
}
}{
"status": "error",
"message": "Internal server error"
}Default Settings
Create Template
POST /defaultsettings/templates
POST
/
defaultsettings
/
templates
Create Template
curl --request POST \
--url https://api.royalti.io/defaultsettings/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Hip-Hop Album Defaults",
"description": "Standard settings for hip-hop album releases",
"category": "content",
"entityType": "release",
"settings": {
"content": {
"type": "Audio",
"format": "Album",
"mainGenre": [
"Hip-Hop",
"Rap"
],
"explicit": "explicit",
"language": "en"
}
},
"isPublic": true,
"tags": [
"hip-hop",
"album",
"explicit"
]
}
'import requests
url = "https://api.royalti.io/defaultsettings/templates"
payload = {
"name": "Hip-Hop Album Defaults",
"description": "Standard settings for hip-hop album releases",
"category": "content",
"entityType": "release",
"settings": { "content": {
"type": "Audio",
"format": "Album",
"mainGenre": ["Hip-Hop", "Rap"],
"explicit": "explicit",
"language": "en"
} },
"isPublic": True,
"tags": ["hip-hop", "album", "explicit"]
}
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({
name: 'Hip-Hop Album Defaults',
description: 'Standard settings for hip-hop album releases',
category: 'content',
entityType: 'release',
settings: {
content: {
type: 'Audio',
format: 'Album',
mainGenre: ['Hip-Hop', 'Rap'],
explicit: 'explicit',
language: 'en'
}
},
isPublic: true,
tags: ['hip-hop', 'album', 'explicit']
})
};
fetch('https://api.royalti.io/defaultsettings/templates', 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/defaultsettings/templates",
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([
'name' => 'Hip-Hop Album Defaults',
'description' => 'Standard settings for hip-hop album releases',
'category' => 'content',
'entityType' => 'release',
'settings' => [
'content' => [
'type' => 'Audio',
'format' => 'Album',
'mainGenre' => [
'Hip-Hop',
'Rap'
],
'explicit' => 'explicit',
'language' => 'en'
]
],
'isPublic' => true,
'tags' => [
'hip-hop',
'album',
'explicit'
]
]),
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/defaultsettings/templates"
payload := strings.NewReader("{\n \"name\": \"Hip-Hop Album Defaults\",\n \"description\": \"Standard settings for hip-hop album releases\",\n \"category\": \"content\",\n \"entityType\": \"release\",\n \"settings\": {\n \"content\": {\n \"type\": \"Audio\",\n \"format\": \"Album\",\n \"mainGenre\": [\n \"Hip-Hop\",\n \"Rap\"\n ],\n \"explicit\": \"explicit\",\n \"language\": \"en\"\n }\n },\n \"isPublic\": true,\n \"tags\": [\n \"hip-hop\",\n \"album\",\n \"explicit\"\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/defaultsettings/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Hip-Hop Album Defaults\",\n \"description\": \"Standard settings for hip-hop album releases\",\n \"category\": \"content\",\n \"entityType\": \"release\",\n \"settings\": {\n \"content\": {\n \"type\": \"Audio\",\n \"format\": \"Album\",\n \"mainGenre\": [\n \"Hip-Hop\",\n \"Rap\"\n ],\n \"explicit\": \"explicit\",\n \"language\": \"en\"\n }\n },\n \"isPublic\": true,\n \"tags\": [\n \"hip-hop\",\n \"album\",\n \"explicit\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/defaultsettings/templates")
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 \"name\": \"Hip-Hop Album Defaults\",\n \"description\": \"Standard settings for hip-hop album releases\",\n \"category\": \"content\",\n \"entityType\": \"release\",\n \"settings\": {\n \"content\": {\n \"type\": \"Audio\",\n \"format\": \"Album\",\n \"mainGenre\": [\n \"Hip-Hop\",\n \"Rap\"\n ],\n \"explicit\": \"explicit\",\n \"language\": \"en\"\n }\n },\n \"isPublic\": true,\n \"tags\": [\n \"hip-hop\",\n \"album\",\n \"explicit\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Template created successfully",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"settings": {
"content": {
"version": "<string>",
"language": "<string>",
"mainGenre": [
"<string>"
],
"subGenre": [
"<string>"
],
"contributors": {}
},
"business": {
"label": "<string>",
"copyright": "<string>",
"publisher": "<string>",
"copyrightOwner": "<string>",
"distribution": "<string>"
},
"ddex": {
"enableDDEX": true,
"labelName": "<string>",
"resourceReference": "<string>",
"grid": "<string>",
"icpn": "<string>"
},
"validation": {
"requireGenre": true,
"requireLyrics": true,
"requireDescription": true,
"minimumTrackCount": 1,
"maximumTrackCount": 2
}
},
"description": "<string>",
"isPublic": true,
"isSystem": false,
"usageCount": 0,
"tags": [
"<string>"
],
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"message": "Invalid request parameters"
}{
"status": "error",
"message": "Unauthorized"
}{
"success": false,
"error": {
"code": "CONFLICT",
"message": "A default setting for this entity and category already exists"
}
}{
"status": "error",
"message": "Internal server error"
}Description
POST /defaultsettings/templates Description: Create a new reusable template for default settings. Authorization:- Required role:
adminor higher
POST
Request Body:
| Parameter | Type | Description | Required |
|---|---|---|---|
| name | string | Template name | Yes |
| description | string | Template description | No |
| category | string | Settings category | Yes |
| entityType | string | Target entity type | Yes |
| settings | object | Template settings | Yes |
| isPublic | boolean | Public visibility (default: true) | No |
| tags | array | Tags for categorization | No |
Code Examples
const response = await fetch('https://api.royalti.io/defaultsettings/templates', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "sample-name",
"description": "sample-description",
"category": "sample-category",
"entityType": "sample-entityType",
"isPublic": true,
"tags": [
{}
]
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://api.royalti.io/defaultsettings/templates',
json={"name":"sample-name","description":"sample-description","category":"sample-category","entityType":"sample-entityType","isPublic":true,"tags":[{}]}
)
data = response.json()
print(data)
curl -X POST https://api.royalti.io/defaultsettings/templates \
-H "Content-Type: application/json" \
-d '{"name":"sample-name","description":"sample-description","category":"sample-category","entityType":"sample-entityType","isPublic":true,"tags":[{}]}'
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Body
application/json
Template name
Available options:
content, business, ddex, validation Available options:
catalog, asset, product, release The actual settings data organized by category
Show child attributes
Show child attributes
Template description
⌘I