Skip to main content
POST
/
api
/
v2
/
users
Add users
curl --request POST \
  --url https://demo.api.loopcrypto.xyz/api/v2/users \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --header 'entity-id: <api-key>' \
  --data '{
  "users": [
    {
      "email": "name@email.com",
      "role": "company"
    }
  ]
}'
{
  "users": [
    {
      "id": "usr_1234567890",
      "email": "user@company.com",
      "role": "company",
      "lastLogin": 1710936000,
      "createdAt": 1710936000
    }
  ],
  "errors": [
    "Invalid email format for user test@invalid",
    "Role 'invalid_role' is not supported"
  ]
}

Authorizations

api-key
string
header
required
entity-id
string
header
required

Body

application/json

Add user(s) to one entity, with roles (optionals)

users
object[]
required

Response

Ok

users
object[]
required

List of users that were created

errors
string[]

Array of error messages that occurred during the request processing

Example:
[
"Invalid email format for user test@invalid",
"Role 'invalid_role' is not supported"
]
I