Skip to main content
POST
/
defaultsettings
/
{entityType}
/
{entityId}
Create Default Setting
curl --request POST \
  --url https://api.royalti.io/defaultsettings/{entityType}/{entityId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "category": "content",
  "settings": {
    "content": {
      "type": "Audio",
      "format": "Album",
      "mainGenre": [
        "Rock",
        "Alternative"
      ],
      "explicit": "clean",
      "language": "en"
    }
  },
  "priority": 0
}'
{
  "success": true,
  "message": "Default setting created successfully",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "TenantId": 123,
    "entityType": "tenant",
    "entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "category": "content",
    "settings": {
      "content": {
        "type": "Audio",
        "format": "Single",
        "version": "<string>",
        "explicit": "explicit",
        "language": "<string>",
        "mainGenre": [
          "<string>"
        ],
        "subGenre": [
          "<string>"
        ],
        "contributors": {}
      },
      "business": {
        "label": "<string>",
        "copyright": "<string>",
        "publisher": "<string>",
        "copyrightOwner": "<string>",
        "distribution": "<string>",
        "status": "Live"
      },
      "ddex": {
        "enableDDEX": true,
        "labelName": "<string>",
        "resourceReference": "<string>",
        "grid": "<string>",
        "icpn": "<string>"
      },
      "validation": {
        "requireGenre": true,
        "requireLyrics": true,
        "requireDescription": true,
        "minimumTrackCount": 1,
        "maximumTrackCount": 2
      }
    },
    "isActive": true,
    "priority": 0,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Description

POST /defaultsettings// Description: Create a new default setting for the specified entity. Each entity can have one setting per category. Validation:
  • Entity must exist (for label/artist/user types)
  • Only one setting per entity + category combination
  • Settings are automatically validated against the category schema
Method: POST Path Parameters:
ParameterTypeDescriptionRequired
entityTypestringType of entityYes
entityIduuidEntity ID (optional for tenant/catalog)Conditional
Request Body:
ParameterTypeDescriptionRequired
categorystringSettings category (content, business, ddex, validation)Yes
settingsobjectSettings data matching the category schemaYes
priorityintegerPriority for conflict resolution (default: 0)No

Code Examples

const response = await fetch('https://api.royalti.io/defaultsettings/example-id/example-id', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "category": "sample-category",
    "priority": 1
  })
});

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

Authorizations

Authorization
string
header
required

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

Path Parameters

entityType
enum<string>
required
Available options:
tenant,
label,
artist,
user,
catalog
entityId
string<uuid>
required

Body

application/json
category
enum<string>
required

Category of settings

Available options:
content,
business,
ddex,
validation
settings
object
required

The actual settings data organized by category

priority
integer
default:0

Priority for conflict resolution

Response

Default setting created successfully

success
boolean
Example:

true

message
string
Example:

"Default setting created successfully"

data
object

A default setting entry