Skip to main content
POST
/
user
Create User
curl --request POST \
  --url https://api.royalti.io/user/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "firstName": "<string>",
  "lastName": "<string>",
  "nickName": "<string>",
  "userType": "<string>",
  "role": "<string>",
  "email": "[email protected]",
  "ipi": "<string>",
  "phone": "<string>",
  "country": "<string>",
  "sendEmail": true,
  "redirect_url": "<string>",
  "message": "<string>"
}
'
{
  "fullName": "Emmanuel Royalti",
  "phone": "+1234567890",
  "country": "Nigeria",
  "message": "Welcome to Royalti!",
  "sendEmail": true,
  "redirect_url": "https://app.royalti.io/welcome",
  "id": "3d5c9971-451e-4711-8874-ff498d55e601",
  "isVerified": false,
  "isActive": false,
  "firstName": "Emmanuel",
  "lastName": "Royalti",
  "TenantUsers": [
    {
      "UserId": "3d5c9971-451e-4711-8874-ff498d55e601",
      "TenantId": 1,
      "nickName": "iEmmanuel104",
      "userType": [
        "Artist"
      ],
      "paymentSettings": null,
      "lastLogin": null,
      "permissions": null
    }
  ],
  "email": "[email protected]",
  "updatedAt": "2023-02-19T11:26:45.512Z",
  "createdAt": "2023-02-19T11:26:45.512Z",
  "externalId": null,
  "ipi": null,
  "role": null
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

/user/ Description:
The /user/ endpoint allows the creation of a single user by providing their details, such as first name, last name, nickname, user type, and email address.
Method:
POST
Request Payload:
ParameterTypeDescription
firstNamestringThe first name of the user.
lastNamestringThe last name of the user.
nickNamestringThe nickname of the user.
userTypestringThe type of user (e.g., Artist, Manager).
emailstringThe email address of the user.
ipi (Optional)stringThe IPI (Interested Parties Information) of the user.
rolestringThe role of the user in the workspace
phone (Optional)stringThe user’s phone number.
country (Optional)stringThe user’s country.
sendEmail (Optional)booleanThis sends an invite email to the user, by default it is true.
redirect_url (Optional)stringThe URL to redirect the user to after the creation.
message (Optional)stringFor passing the invite email custom message.

Code Examples

const response = await fetch('https://api.royalti.io/user/', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "firstName": "sample-firstName",
    "lastName": "sample-lastName",
    "nickName": "sample-nickName",
    "email": "sample-email",
    "ipi": "sample-ipi",
    "role": "sample-role",
    "phone": "sample-phone",
    "country": "sample-country",
    "sendEmail": true,
    "redirect_url": "sample-redirect_url",
    "message": "sample-message"
  })
});

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
firstName
string
required

The first name of the user

lastName
string
required

The last name of the user

nickName
string
required

The nickname of the user

userType
required

The type of user (e.g., Artist, Manager). Can be a string or array of strings.

role
string
required

The role of the user in the workspace

email
string<email>

The email address of the user

ipi
string

The IPI (Interested Parties Information) of the user

phone
string

The user's phone number

country
string

The user's country

sendEmail
boolean
default:true

This sends an invite email to the user, by default it is true

redirect_url
string

The URL to redirect the user to after the creation

message
string

For passing the invite email custom message

Response

Success

fullName
string
id
string
isVerified
boolean
isActive
boolean
firstName
string
lastName
string
TenantUsers
object[]
email
string
updatedAt
string<date-time>
createdAt
string<date-time>
externalId
string | null
phone
string | null
country
string | null
ipi
string | null
role
string | null