Submit Media Links to Release
curl --request POST \
--url https://api.royalti.io/releases/{id}/media/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"links": [
{
"url": "https://wetransfer.com/downloads/abc123",
"name": "Track Demo",
"type": "audio"
},
{
"url": "https://drive.google.com/file/d/abc123",
"name": "Album Artwork",
"type": "image"
}
]
}
'import requests
url = "https://api.royalti.io/releases/{id}/media/links"
payload = { "links": [
{
"url": "https://wetransfer.com/downloads/abc123",
"name": "Track Demo",
"type": "audio"
},
{
"url": "https://drive.google.com/file/d/abc123",
"name": "Album Artwork",
"type": "image"
}
] }
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({
links: [
{
url: 'https://wetransfer.com/downloads/abc123',
name: 'Track Demo',
type: 'audio'
},
{
url: 'https://drive.google.com/file/d/abc123',
name: 'Album Artwork',
type: 'image'
}
]
})
};
fetch('https://api.royalti.io/releases/{id}/media/links', 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/releases/{id}/media/links",
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([
'links' => [
[
'url' => 'https://wetransfer.com/downloads/abc123',
'name' => 'Track Demo',
'type' => 'audio'
],
[
'url' => 'https://drive.google.com/file/d/abc123',
'name' => 'Album Artwork',
'type' => 'image'
]
]
]),
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/releases/{id}/media/links"
payload := strings.NewReader("{\n \"links\": [\n {\n \"url\": \"https://wetransfer.com/downloads/abc123\",\n \"name\": \"Track Demo\",\n \"type\": \"audio\"\n },\n {\n \"url\": \"https://drive.google.com/file/d/abc123\",\n \"name\": \"Album Artwork\",\n \"type\": \"image\"\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/releases/{id}/media/links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"links\": [\n {\n \"url\": \"https://wetransfer.com/downloads/abc123\",\n \"name\": \"Track Demo\",\n \"type\": \"audio\"\n },\n {\n \"url\": \"https://drive.google.com/file/d/abc123\",\n \"name\": \"Album Artwork\",\n \"type\": \"image\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/releases/{id}/media/links")
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 \"links\": [\n {\n \"url\": \"https://wetransfer.com/downloads/abc123\",\n \"name\": \"Track Demo\",\n \"type\": \"audio\"\n },\n {\n \"url\": \"https://drive.google.com/file/d/abc123\",\n \"name\": \"Album Artwork\",\n \"type\": \"image\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"cloudId": "550e8400-e29b-41d4-a716-446655440000",
"cloudUrl": "https://storage.royalti.io/files/audio.mp3",
"type": "audio",
"name": "my-track.mp3",
"isLink": false,
"releasePath": "tenant123/releases/release456/tracks/track789/file.mp3",
"metadata": {
"duration": 213.5,
"bitrate": "320",
"sampleRate": "44100",
"channels": "2",
"codec": "mp3",
"fileSize": 1048576,
"mimeType": "audio/mpeg",
"processedAt": "2023-11-07T05:31:56Z",
"linkValidated": true
}
},
"message": "Media uploaded successfully"
}{
"status": "error",
"message": "Invalid request parameters"
}{
"status": "error",
"message": "Unauthorized"
}{
"status": "error",
"message": "Resource not found"
}{
"status": "error",
"message": "Internal server error"
}Release
Submit Media Links to Release
POST /releases//media/links
POST
/
releases
/
{id}
/
media
/
links
Submit Media Links to Release
curl --request POST \
--url https://api.royalti.io/releases/{id}/media/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"links": [
{
"url": "https://wetransfer.com/downloads/abc123",
"name": "Track Demo",
"type": "audio"
},
{
"url": "https://drive.google.com/file/d/abc123",
"name": "Album Artwork",
"type": "image"
}
]
}
'import requests
url = "https://api.royalti.io/releases/{id}/media/links"
payload = { "links": [
{
"url": "https://wetransfer.com/downloads/abc123",
"name": "Track Demo",
"type": "audio"
},
{
"url": "https://drive.google.com/file/d/abc123",
"name": "Album Artwork",
"type": "image"
}
] }
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({
links: [
{
url: 'https://wetransfer.com/downloads/abc123',
name: 'Track Demo',
type: 'audio'
},
{
url: 'https://drive.google.com/file/d/abc123',
name: 'Album Artwork',
type: 'image'
}
]
})
};
fetch('https://api.royalti.io/releases/{id}/media/links', 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/releases/{id}/media/links",
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([
'links' => [
[
'url' => 'https://wetransfer.com/downloads/abc123',
'name' => 'Track Demo',
'type' => 'audio'
],
[
'url' => 'https://drive.google.com/file/d/abc123',
'name' => 'Album Artwork',
'type' => 'image'
]
]
]),
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/releases/{id}/media/links"
payload := strings.NewReader("{\n \"links\": [\n {\n \"url\": \"https://wetransfer.com/downloads/abc123\",\n \"name\": \"Track Demo\",\n \"type\": \"audio\"\n },\n {\n \"url\": \"https://drive.google.com/file/d/abc123\",\n \"name\": \"Album Artwork\",\n \"type\": \"image\"\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/releases/{id}/media/links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"links\": [\n {\n \"url\": \"https://wetransfer.com/downloads/abc123\",\n \"name\": \"Track Demo\",\n \"type\": \"audio\"\n },\n {\n \"url\": \"https://drive.google.com/file/d/abc123\",\n \"name\": \"Album Artwork\",\n \"type\": \"image\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/releases/{id}/media/links")
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 \"links\": [\n {\n \"url\": \"https://wetransfer.com/downloads/abc123\",\n \"name\": \"Track Demo\",\n \"type\": \"audio\"\n },\n {\n \"url\": \"https://drive.google.com/file/d/abc123\",\n \"name\": \"Album Artwork\",\n \"type\": \"image\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"cloudId": "550e8400-e29b-41d4-a716-446655440000",
"cloudUrl": "https://storage.royalti.io/files/audio.mp3",
"type": "audio",
"name": "my-track.mp3",
"isLink": false,
"releasePath": "tenant123/releases/release456/tracks/track789/file.mp3",
"metadata": {
"duration": 213.5,
"bitrate": "320",
"sampleRate": "44100",
"channels": "2",
"codec": "mp3",
"fileSize": 1048576,
"mimeType": "audio/mpeg",
"processedAt": "2023-11-07T05:31:56Z",
"linkValidated": true
}
},
"message": "Media uploaded successfully"
}{
"status": "error",
"message": "Invalid request parameters"
}{
"status": "error",
"message": "Unauthorized"
}{
"status": "error",
"message": "Resource not found"
}{
"status": "error",
"message": "Internal server error"
}This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
This endpoint allows submitting external links as media for a release. Links are validated and stored for later processing. Only releases in ‘draft’ or ‘rejected’ status can have links submitted. Authorization:- Required role:
useror higher
Code Examples
const response = await fetch('https://api.royalti.io/releases/example-id/media/links', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"ref": "#/components/schemas/LinkSubmissionRequest"
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://api.royalti.io/releases/example-id/media/links',
headers={
'Authorization': f'Bearer {token}'
},
json={"ref":"#/components/schemas/LinkSubmissionRequest"}
)
data = response.json()
print(data)
curl -X POST https://api.royalti.io/releases/example-id/media/links \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ref":"#/components/schemas/LinkSubmissionRequest"}'
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Path Parameters
Release ID
Body
application/json
Show child attributes
Show child attributes
⌘I