Skip to main content
POST
/
work
/
works
Create a work
curl --request POST \
  --url https://api.royalti.io/work/works \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workTitle": "<string>",
  "iswc": "<string>",
  "workType": "<string>",
  "languageCode": "<string>",
  "duration": 123,
  "submitterWorkNumber": "<string>"
}
'
import requests

url = "https://api.royalti.io/work/works"

payload = {
    "workTitle": "<string>",
    "iswc": "<string>",
    "workType": "<string>",
    "languageCode": "<string>",
    "duration": 123,
    "submitterWorkNumber": "<string>"
}
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({
    workTitle: '<string>',
    iswc: '<string>',
    workType: '<string>',
    languageCode: '<string>',
    duration: 123,
    submitterWorkNumber: '<string>'
  })
};

fetch('https://api.royalti.io/work/works', 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/work/works",
  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([
    'workTitle' => '<string>',
    'iswc' => '<string>',
    'workType' => '<string>',
    'languageCode' => '<string>',
    'duration' => 123,
    'submitterWorkNumber' => '<string>'
  ]),
  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/work/works"

	payload := strings.NewReader("{\n  \"workTitle\": \"<string>\",\n  \"iswc\": \"<string>\",\n  \"workType\": \"<string>\",\n  \"languageCode\": \"<string>\",\n  \"duration\": 123,\n  \"submitterWorkNumber\": \"<string>\"\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/work/works")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"workTitle\": \"<string>\",\n  \"iswc\": \"<string>\",\n  \"workType\": \"<string>\",\n  \"languageCode\": \"<string>\",\n  \"duration\": 123,\n  \"submitterWorkNumber\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.royalti.io/work/works")

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  \"workTitle\": \"<string>\",\n  \"iswc\": \"<string>\",\n  \"workType\": \"<string>\",\n  \"languageCode\": \"<string>\",\n  \"duration\": 123,\n  \"submitterWorkNumber\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tenantId": 123,
  "workTitle": "<string>",
  "alternativeTitles": [
    {}
  ],
  "iswc": "<string>",
  "libraryCatalogueName": "<string>",
  "originalWorkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "languageCode": "<string>",
  "musicalWorkDistributionCategory": "<string>",
  "duration": 123,
  "recorded": true,
  "versionType": "<string>",
  "excerptType": "<string>",
  "compositeType": "<string>",
  "musicArrangement": "<string>",
  "lyricAdaptation": "<string>",
  "performers": [
    {}
  ],
  "recordings": [
    {}
  ],
  "copyrightDate": "2023-12-25",
  "copyrightNumber": "<string>",
  "grandRights": true,
  "compositePart": true,
  "compositeWorkId": "<string>",
  "compositeWorkTitle": "<string>",
  "compositeWorkIswc": "<string>",
  "compositeWorkDuration": 123,
  "compositeWorkShare": 123,
  "metadata": {},
  "workType": "<string>",
  "arrangementType": "<string>",
  "instrumentation": [
    "<string>"
  ],
  "componentType": "<string>",
  "isArrangement": true,
  "isAdaptation": true,
  "hasLyricModification": true,
  "isNonLyricModification": true,
  "submitterWorkNumber": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}
{
  "status": "error",
  "message": "<string>",
  "code": "<string>",
  "details": {}
}
{
  "status": "error",
  "message": "<string>",
  "code": "<string>",
  "details": {}
}
{
  "status": "error",
  "message": "<string>",
  "code": "<string>",
  "details": {}
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

POST /work/works Description: Creates a CWRWork for the caller’s tenant. No dedicated request validator — accepts any writable CWRWork field and surfaces Sequelize validation failures as a 400. Authorization:
  • Required role: admin or higher
Method: POST

Code Examples

const response = await fetch('https://api.royalti.io/work/works', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "ref": "#/components/schemas/CreateWorkRequest"
  })
});

const data = await response.json();
console.log(data);
import requests

response = requests.post(
  'https://api.royalti.io/work/works',
  headers={
    'Authorization': f'Bearer {token}'
  },
  json={"ref":"#/components/schemas/CreateWorkRequest"}
)

data = response.json()
print(data)
curl -X POST https://api.royalti.io/work/works \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ref":"#/components/schemas/CreateWorkRequest"}'

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json

Accepts any CWRWork writable field; tenantId is set server-side from the caller's active workspace and any client-supplied value is overwritten. No dedicated request validator exists — invalid combinations surface as a 400 from Sequelize model validation.

workTitle
string
required
iswc
string
workType
string
languageCode
string
duration
integer
submitterWorkNumber
string

Response

Work created

id
string<uuid>
tenantId
integer
workTitle
string
alternativeTitles
object[]
iswc
string | null

International Standard Musical Work Code (max 13 chars)

libraryCatalogueName
string | null
originalWorkId
string<uuid> | null
languageCode
string
musicalWorkDistributionCategory
string
duration
integer

Seconds

recorded
boolean
versionType
string
excerptType
string
compositeType
string
musicArrangement
string
lyricAdaptation
string
performers
object[]
recordings
object[]

CWR "recording detail" blocks embedded on the work (distinct from the WorkRecording junction table / WorkRecordings below)

grandRights
boolean
compositePart
boolean
compositeWorkId
string | null
compositeWorkTitle
string | null
compositeWorkIswc
string | null
compositeWorkDuration
integer | null
compositeWorkShare
number | null
metadata
object

Includes completeness (complete/skeleton), source (e.g. publishing-bootstrap), seededDefaults, origin.library

workType
string
arrangementType
string
instrumentation
string[]
componentType
string
isArrangement
boolean
isAdaptation
boolean
hasLyricModification
boolean
isNonLyricModification
boolean
submitterWorkNumber
string | null
createdAt
string<date-time>
updatedAt
string<date-time>