Create Label
curl --request POST \
--url https://api.royalti.io/labels/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Future Sound Records",
"website": "https://futuresound.example.com",
"country": "US",
"labelCode": "LC12345",
"dpid": "DPID-123456",
"contacts": {
"email": "contact@futuresound.example.com"
},
"socialLinks": {
"twitter": "https://twitter.com/futuresound"
}
}
'import requests
url = "https://api.royalti.io/labels/"
payload = {
"name": "Future Sound Records",
"website": "https://futuresound.example.com",
"country": "US",
"labelCode": "LC12345",
"dpid": "DPID-123456",
"contacts": { "email": "contact@futuresound.example.com" },
"socialLinks": { "twitter": "https://twitter.com/futuresound" }
}
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: 'Future Sound Records',
website: 'https://futuresound.example.com',
country: 'US',
labelCode: 'LC12345',
dpid: 'DPID-123456',
contacts: {email: 'contact@futuresound.example.com'},
socialLinks: {twitter: 'https://twitter.com/futuresound'}
})
};
fetch('https://api.royalti.io/labels/', 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/labels/",
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' => 'Future Sound Records',
'website' => 'https://futuresound.example.com',
'country' => 'US',
'labelCode' => 'LC12345',
'dpid' => 'DPID-123456',
'contacts' => [
'email' => 'contact@futuresound.example.com'
],
'socialLinks' => [
'twitter' => 'https://twitter.com/futuresound'
]
]),
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/labels/"
payload := strings.NewReader("{\n \"name\": \"Future Sound Records\",\n \"website\": \"https://futuresound.example.com\",\n \"country\": \"US\",\n \"labelCode\": \"LC12345\",\n \"dpid\": \"DPID-123456\",\n \"contacts\": {\n \"email\": \"contact@futuresound.example.com\"\n },\n \"socialLinks\": {\n \"twitter\": \"https://twitter.com/futuresound\"\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/labels/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Future Sound Records\",\n \"website\": \"https://futuresound.example.com\",\n \"country\": \"US\",\n \"labelCode\": \"LC12345\",\n \"dpid\": \"DPID-123456\",\n \"contacts\": {\n \"email\": \"contact@futuresound.example.com\"\n },\n \"socialLinks\": {\n \"twitter\": \"https://twitter.com/futuresound\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/labels/")
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\": \"Future Sound Records\",\n \"website\": \"https://futuresound.example.com\",\n \"country\": \"US\",\n \"labelCode\": \"LC12345\",\n \"dpid\": \"DPID-123456\",\n \"contacts\": {\n \"email\": \"contact@futuresound.example.com\"\n },\n \"socialLinks\": {\n \"twitter\": \"https://twitter.com/futuresound\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TenantId": 123,
"name": "<string>",
"logo": "<string>",
"website": "<string>",
"country": "US",
"foundedDate": "2023-12-25",
"labelCode": "<string>",
"dpid": "<string>",
"contacts": {},
"socialLinks": {},
"distributionSettings": {},
"catalogSettings": {},
"ddexSettings": {},
"parentLabelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"distribution": "<string>",
"genres": [
"<string>"
],
"isActive": true,
"metadata": {},
"tradingName": "<string>",
"pLinePrefix": "<string>",
"cLinePrefix": "<string>",
"isrcPrefix": "<string>",
"upcPrefix": "<string>",
"parentLabel": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"logo": "<string>"
},
"childLabels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"logo": "<string>"
}
],
"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": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"status": "error",
"message": "Internal server error"
}Label
Create Label
Creates a new label within the authenticated tenant. All operations are tenant-scoped.
POST
/
labels
/
Create Label
curl --request POST \
--url https://api.royalti.io/labels/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Future Sound Records",
"website": "https://futuresound.example.com",
"country": "US",
"labelCode": "LC12345",
"dpid": "DPID-123456",
"contacts": {
"email": "contact@futuresound.example.com"
},
"socialLinks": {
"twitter": "https://twitter.com/futuresound"
}
}
'import requests
url = "https://api.royalti.io/labels/"
payload = {
"name": "Future Sound Records",
"website": "https://futuresound.example.com",
"country": "US",
"labelCode": "LC12345",
"dpid": "DPID-123456",
"contacts": { "email": "contact@futuresound.example.com" },
"socialLinks": { "twitter": "https://twitter.com/futuresound" }
}
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: 'Future Sound Records',
website: 'https://futuresound.example.com',
country: 'US',
labelCode: 'LC12345',
dpid: 'DPID-123456',
contacts: {email: 'contact@futuresound.example.com'},
socialLinks: {twitter: 'https://twitter.com/futuresound'}
})
};
fetch('https://api.royalti.io/labels/', 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/labels/",
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' => 'Future Sound Records',
'website' => 'https://futuresound.example.com',
'country' => 'US',
'labelCode' => 'LC12345',
'dpid' => 'DPID-123456',
'contacts' => [
'email' => 'contact@futuresound.example.com'
],
'socialLinks' => [
'twitter' => 'https://twitter.com/futuresound'
]
]),
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/labels/"
payload := strings.NewReader("{\n \"name\": \"Future Sound Records\",\n \"website\": \"https://futuresound.example.com\",\n \"country\": \"US\",\n \"labelCode\": \"LC12345\",\n \"dpid\": \"DPID-123456\",\n \"contacts\": {\n \"email\": \"contact@futuresound.example.com\"\n },\n \"socialLinks\": {\n \"twitter\": \"https://twitter.com/futuresound\"\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/labels/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Future Sound Records\",\n \"website\": \"https://futuresound.example.com\",\n \"country\": \"US\",\n \"labelCode\": \"LC12345\",\n \"dpid\": \"DPID-123456\",\n \"contacts\": {\n \"email\": \"contact@futuresound.example.com\"\n },\n \"socialLinks\": {\n \"twitter\": \"https://twitter.com/futuresound\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/labels/")
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\": \"Future Sound Records\",\n \"website\": \"https://futuresound.example.com\",\n \"country\": \"US\",\n \"labelCode\": \"LC12345\",\n \"dpid\": \"DPID-123456\",\n \"contacts\": {\n \"email\": \"contact@futuresound.example.com\"\n },\n \"socialLinks\": {\n \"twitter\": \"https://twitter.com/futuresound\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TenantId": 123,
"name": "<string>",
"logo": "<string>",
"website": "<string>",
"country": "US",
"foundedDate": "2023-12-25",
"labelCode": "<string>",
"dpid": "<string>",
"contacts": {},
"socialLinks": {},
"distributionSettings": {},
"catalogSettings": {},
"ddexSettings": {},
"parentLabelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"distribution": "<string>",
"genres": [
"<string>"
],
"isActive": true,
"metadata": {},
"tradingName": "<string>",
"pLinePrefix": "<string>",
"cLinePrefix": "<string>",
"isrcPrefix": "<string>",
"upcPrefix": "<string>",
"parentLabel": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"logo": "<string>"
},
"childLabels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"logo": "<string>"
}
],
"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": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"status": "error",
"message": "Internal server error"
}This endpoint requires authentication. Include your Bearer token in the Authorization header.
Code Examples
const response = await fetch('https://api.royalti.io/labels/', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "sample-name",
"logo": "sample-logo",
"website": "sample-website",
"country": "sample-country",
"foundedDate": "2024-01-21",
"labelCode": "sample-labelCode",
"dpid": "sample-dpid",
"contacts": {},
"socialLinks": {},
"distributionSettings": {},
"catalogSettings": {},
"parentLabelId": "sample-parentLabelId",
"distribution": "sample-distribution",
"genres": [
{}
],
"isActive": true,
"metadata": {}
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://api.royalti.io/labels/',
headers={
'Authorization': f'Bearer {token}'
},
json={"name":"sample-name","logo":"sample-logo","website":"sample-website","country":"sample-country","foundedDate":"2024-01-21","labelCode":"sample-labelCode","dpid":"sample-dpid","contacts":{},"socialLinks":{},"distributionSettings":{},"catalogSettings":{},"parentLabelId":"sample-parentLabelId","distribution":"sample-distribution","genres":[{}],"isActive":true,"metadata":{}}
)
data = response.json()
print(data)
curl -X POST https://api.royalti.io/labels/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"sample-name","logo":"sample-logo","website":"sample-website","country":"sample-country","foundedDate":"2024-01-21","labelCode":"sample-labelCode","dpid":"sample-dpid","contacts":{},"socialLinks":{},"distributionSettings":{},"catalogSettings":{},"parentLabelId":"sample-parentLabelId","distribution":"sample-distribution","genres":[{}],"isActive":true,"metadata":{}}'
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Body
application/json
ISO 3166-1 alpha-2 code
⌘I