Update Default Setting (Entity-Specific)
curl --request PUT \
--url https://api.royalti.io/defaultsettings/{entityType}/{entityId}/{settingId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": {
"content": {
"explicit": "explicit",
"mainGenre": [
"Hip-Hop",
"Rap"
]
}
},
"isActive": true
}
'import requests
url = "https://api.royalti.io/defaultsettings/{entityType}/{entityId}/{settingId}"
payload = {
"settings": { "content": {
"explicit": "explicit",
"mainGenre": ["Hip-Hop", "Rap"]
} },
"isActive": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {content: {explicit: 'explicit', mainGenre: ['Hip-Hop', 'Rap']}},
isActive: true
})
};
fetch('https://api.royalti.io/defaultsettings/{entityType}/{entityId}/{settingId}', 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/{entityType}/{entityId}/{settingId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'settings' => [
'content' => [
'explicit' => 'explicit',
'mainGenre' => [
'Hip-Hop',
'Rap'
]
]
],
'isActive' => true
]),
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/{entityType}/{entityId}/{settingId}"
payload := strings.NewReader("{\n \"settings\": {\n \"content\": {\n \"explicit\": \"explicit\",\n \"mainGenre\": [\n \"Hip-Hop\",\n \"Rap\"\n ]\n }\n },\n \"isActive\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.royalti.io/defaultsettings/{entityType}/{entityId}/{settingId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"content\": {\n \"explicit\": \"explicit\",\n \"mainGenre\": [\n \"Hip-Hop\",\n \"Rap\"\n ]\n }\n },\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/defaultsettings/{entityType}/{entityId}/{settingId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"settings\": {\n \"content\": {\n \"explicit\": \"explicit\",\n \"mainGenre\": [\n \"Hip-Hop\",\n \"Rap\"\n ]\n }\n },\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Default setting updated successfully",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TenantId": 123,
"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
}
},
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isActive": true,
"priority": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"message": "Invalid request parameters"
}{
"status": "error",
"message": "Unauthorized"
}{
"status": "error",
"message": "Resource not found"
}{
"status": "error",
"message": "Internal server error"
}Default Settings
Update Default Setting (Entity-Specific)
PUT /defaultsettings///
PUT
/
defaultsettings
/
{entityType}
/
{entityId}
/
{settingId}
Update Default Setting (Entity-Specific)
curl --request PUT \
--url https://api.royalti.io/defaultsettings/{entityType}/{entityId}/{settingId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": {
"content": {
"explicit": "explicit",
"mainGenre": [
"Hip-Hop",
"Rap"
]
}
},
"isActive": true
}
'import requests
url = "https://api.royalti.io/defaultsettings/{entityType}/{entityId}/{settingId}"
payload = {
"settings": { "content": {
"explicit": "explicit",
"mainGenre": ["Hip-Hop", "Rap"]
} },
"isActive": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {content: {explicit: 'explicit', mainGenre: ['Hip-Hop', 'Rap']}},
isActive: true
})
};
fetch('https://api.royalti.io/defaultsettings/{entityType}/{entityId}/{settingId}', 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/{entityType}/{entityId}/{settingId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'settings' => [
'content' => [
'explicit' => 'explicit',
'mainGenre' => [
'Hip-Hop',
'Rap'
]
]
],
'isActive' => true
]),
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/{entityType}/{entityId}/{settingId}"
payload := strings.NewReader("{\n \"settings\": {\n \"content\": {\n \"explicit\": \"explicit\",\n \"mainGenre\": [\n \"Hip-Hop\",\n \"Rap\"\n ]\n }\n },\n \"isActive\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.royalti.io/defaultsettings/{entityType}/{entityId}/{settingId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"content\": {\n \"explicit\": \"explicit\",\n \"mainGenre\": [\n \"Hip-Hop\",\n \"Rap\"\n ]\n }\n },\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/defaultsettings/{entityType}/{entityId}/{settingId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"settings\": {\n \"content\": {\n \"explicit\": \"explicit\",\n \"mainGenre\": [\n \"Hip-Hop\",\n \"Rap\"\n ]\n }\n },\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Default setting updated successfully",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TenantId": 123,
"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
}
},
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isActive": true,
"priority": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"message": "Invalid request parameters"
}{
"status": "error",
"message": "Unauthorized"
}{
"status": "error",
"message": "Resource not found"
}{
"status": "error",
"message": "Internal server error"
}Description
PUT /defaultsettings/// Description: Update an existing default setting for a specific entity (label, artist, or user). Settings are deep-merged within their category, allowing partial updates without losing existing configuration. Entity Types (for this endpoint):label- Label-specific defaults (entityId required)artist- Artist-specific defaults (entityId required)user- User-specific defaults (entityId required)
PUT /defaultsettings/{entityType}/{settingId} endpoint instead (without entityId).
Authorization:
- Required role:
adminor higher
PUT
Path Parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
| entityType | string | Type of entity (label, artist, or user) | Yes |
| entityId | uuid | Entity ID | Yes |
| settingId | uuid | ID of the setting to update | Yes |
| Parameter | Type | Description | Required |
|---|---|---|---|
| settings | object | Partial settings to merge | No |
| isActive | boolean | Active status | No |
| priority | integer | Priority level | No |
Code Examples
const response = await fetch('https://api.royalti.io/defaultsettings/example-id/example-id/example-id', {
method: 'PUT',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"isActive": true,
"priority": 1
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.put(
'https://api.royalti.io/defaultsettings/example-id/example-id/example-id',
json={"isActive":true,"priority":1}
)
data = response.json()
print(data)
curl -X PUT https://api.royalti.io/defaultsettings/example-id/example-id/example-id \
-H "Content-Type: application/json" \
-d '{"isActive":true,"priority":1}'
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Path Parameters
Type of entity (label, artist, or user only)
Available options:
label, artist, user Entity ID
ID of the setting to update
Body
application/json
⌘I