Skip to main content
POST
/
writer
/
writers
curl --request POST \
  --url https://api.royalti.io/writer/writers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "firstName": "Chinedu",
  "lastName": "Okafor",
  "writerRole": "CA"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tenantId": 123,
  "firstName": "<string>",
  "lastName": "<string>",
  "ipiNameNumber": "<string>",
  "ipiBaseNumber": "<string>",
  "affiliatedPRO": "<string>",
  "mrSociety": "<string>",
  "srSociety": "<string>",
  "generallyControlled": false,
  "canBeControlled": false,
  "publisherFee": 50,
  "saan": "<string>",
  "territories": [
    {
      "territoryCode": "WW",
      "prShare": 50,
      "mrShare": 50,
      "srShare": 50,
      "startDate": "2023-11-07T05:31:56Z",
      "endDate": "2023-11-07T05:31:56Z"
    }
  ],
  "settings": {},
  "tenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "userData": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "firstName": "<string>",
    "lastName": "<string>",
    "email": "jsmith@example.com",
    "ipi": "<string>"
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}
{
"status": "error",
"message": "<string>",
"code": "<string>",
"details": {}
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

POST /writer/writers Description: Creates a new CWR writer for the tenant. If territories is omitted (or empty), defaults to a single worldwide entry at 100% PR/MR/SR. Runs WriterValidator (IPI name/base number format, territory shares) before insert. If tenantUserId is supplied it must belong to an existing TenantUser on this tenant. Authorization:
  • Required role: admin or higher
Method: POST

Code Examples

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

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

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

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

Authorizations

Authorization
string
header
required

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

Body

application/json
firstName
string
required
lastName
string
required
writerRole
enum<string>
required
Available options:
CA,
C,
A,
AR,
AD,
TR,
SR,
LY,
CO,
PA
ipiNameNumber
string
ipiBaseNumber
string
isrCode
string

Accepted in the request body but NOT a persisted CWRWriter column — currently a no-op for storage purposes.

territories
object[]

Defaults to worldwide 100% PR/MR/SR if omitted.

tenantUserId
string<uuid>

Must reference an existing TenantUser on this tenant, or the request fails with 400.

affiliatedPRO
string

Response

Writer created

id
string<uuid>
tenantId
integer
firstName
string
lastName
string
ipiNameNumber
string | null

11-digit CISAC IPI name number. Unique per tenant when set.

ipiBaseNumber
string | null

13-character CISAC IPI base number. Unique per tenant when set.

writerRole
enum<string>

CWR writer designation code. One of: CA (Composer & Author), C (Composer), A (Author/Lyricist), AR (Arranger), AD (Adaptor), TR (Translator), SR (Sub-Arranger), LY (Lyricist), CO (Composer), PA (Performer).

Available options:
CA,
C,
A,
AR,
AD,
TR,
SR,
LY,
CO,
PA
affiliatedPRO
string | null

Performing rights organization the writer is affiliated with (e.g. ASCAP, BMI). Free text — not enum-validated.

mrSociety
string | null
Maximum string length: 3
srSociety
string | null
Maximum string length: 3
generallyControlled
boolean
default:false
canBeControlled
boolean
default:false
publisherFee
number | null
Required range: 0 <= x <= 100
saan
string | null

Society-Assigned Agreement Number.

Maximum string length: 14
territories
object[]

Defaults to a single worldwide (WW) entry at 100% PR/MR/SR if omitted on create.

settings
object

Free-form writer settings (e.g. defaultTerritory, defaultShares). Not accepted via the create/update request bodies — set separately or defaulted to {}.

tenantUserId
string<uuid> | null
userData
object

Linked TenantUser account, included when the writer has a tenantUserId.

createdAt
string<date-time>
updatedAt
string<date-time>