Skip to main content
POST
/
artist
/
bulk
Create Bulk Artists
curl --request POST \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/artist/bulk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "artists": [
    {
      "artistName": "<string>",
      "signDate": "2023-12-25",
      "label": "<string>",
      "externalId": "<string>",
      "users": [
        "<string>"
      ],
      "split": [
        {
          "user": "<string>",
          "share": 123
        }
      ]
    }
  ]
}'
{
  "message": "Bulk artist creation completed",
  "createdArtists": [
    "Artist One",
    "Artist Two"
  ],
  "processedCount": 3,
  "errors": [
    "Artist Three already exists"
  ]
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/artist/bulk', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "artists": [
      {
        "artistName": "sample-artistName",
        "signDate": "2024-01-21",
        "label": "sample-label",
        "externalId": "sample-externalId",
        "users": [
          {}
        ],
        "split": [
          {
            "user": "sample-user",
            "share": 1
          }
        ]
      }
    ]
  })
});

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

Authorizations

Authorization
string
header
required

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

Body

application/json
artists
object[]
required

Response

Created with possible errors

message
string
createdArtists
string[]
processedCount
integer
errors
string[]