Skip to main content
POST
/
user
/
bulk
/
entity
Create Bulk Entity
curl --request POST \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/user/bulk/entity \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "data": [
    {
      "artistName": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "email": "jsmith@example.com",
      "splitShare": 123
    }
  ],
  "sendEmail": true,
  "redirect_url": "<string>"
}'
{
  "message": "Bulk entity creation completed.",
  "createdEntities": [
    {
      "artistName": "Melodic Harmony",
      "userName": "Emma Johnson"
    }
  ],
  "processedCount": 1,
  "errors": [
    "Invalid email format for Michael Chen",
    "Invalid split share percentage for Sonic Wave"
  ]
}
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/user/bulk/entity', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "data": [
      {
        "artistName": "sample-artistName",
        "firstName": "sample-firstName",
        "lastName": "sample-lastName",
        "email": "sample-email",
        "splitShare": 1
      }
    ],
    "sendEmail": true,
    "redirect_url": "sample-redirect_url"
  })
});

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
data
object[]
required
sendEmail
boolean
default:true

This sends an invite email to the entities

redirect_url
string

The URL to redirect after creation

Response

Success - Bulk entity creation completed

message
string
createdEntities
object[]
processedCount
integer
errors
string[]