Revert Release Status (Admin Only)
curl --request POST \
--url https://api.royalti.io/releases/{id}/revert-status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"targetStatus": "submitted",
"reason": "Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections."
}
'import requests
url = "https://api.royalti.io/releases/{id}/revert-status"
payload = {
"targetStatus": "submitted",
"reason": "Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections."
}
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({
targetStatus: 'submitted',
reason: 'Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections.'
})
};
fetch('https://api.royalti.io/releases/{id}/revert-status', 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}/revert-status",
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([
'targetStatus' => 'submitted',
'reason' => 'Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections.'
]),
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}/revert-status"
payload := strings.NewReader("{\n \"targetStatus\": \"submitted\",\n \"reason\": \"Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections.\"\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}/revert-status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"targetStatus\": \"submitted\",\n \"reason\": \"Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/releases/{id}/revert-status")
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 \"targetStatus\": \"submitted\",\n \"reason\": \"Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections.\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Release status reverted to \"submitted\" successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "submitted",
"previousStatus": "approved",
"reason": "Auto-creation failed due to missing artist metadata"
}
}{
"success": false,
"message": "Target status must be one of: submitted, draft"
}{
"success": false,
"message": "Only admins can revert release status"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}Release
Revert Release Status (Admin Only)
POST /releases//revert-status
POST
/
releases
/
{id}
/
revert-status
Revert Release Status (Admin Only)
curl --request POST \
--url https://api.royalti.io/releases/{id}/revert-status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"targetStatus": "submitted",
"reason": "Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections."
}
'import requests
url = "https://api.royalti.io/releases/{id}/revert-status"
payload = {
"targetStatus": "submitted",
"reason": "Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections."
}
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({
targetStatus: 'submitted',
reason: 'Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections.'
})
};
fetch('https://api.royalti.io/releases/{id}/revert-status', 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}/revert-status",
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([
'targetStatus' => 'submitted',
'reason' => 'Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections.'
]),
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}/revert-status"
payload := strings.NewReader("{\n \"targetStatus\": \"submitted\",\n \"reason\": \"Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections.\"\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}/revert-status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"targetStatus\": \"submitted\",\n \"reason\": \"Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/releases/{id}/revert-status")
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 \"targetStatus\": \"submitted\",\n \"reason\": \"Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections.\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Release status reverted to \"submitted\" successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "submitted",
"previousStatus": "approved",
"reason": "Auto-creation failed due to missing artist metadata"
}
}{
"success": false,
"message": "Target status must be one of: submitted, draft"
}{
"success": false,
"message": "Only admins can revert release status"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
This endpoint allows admins to revert a release status. Primarily used to revert failed auto-creation releases back to submitted status or completed releases back to draft. Allowed Status Reversions:- Approved (with failed auto-creation) → Submitted
- Completed → Draft
- Required role:
adminor higher
Code Examples
const response = await fetch('https://api.royalti.io/releases/example-id/revert-status', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"targetStatus": "sample-targetStatus",
"reason": "sample-reason"
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://api.royalti.io/releases/example-id/revert-status',
headers={
'Authorization': f'Bearer {token}'
},
json={"targetStatus":"sample-targetStatus","reason":"sample-reason"}
)
data = response.json()
print(data)
curl -X POST https://api.royalti.io/releases/example-id/revert-status \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"targetStatus":"sample-targetStatus","reason":"sample-reason"}'
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Path Parameters
Release ID
Body
application/json
⌘I