POST
/
users
/
{userId}
/
principal
curl --request POST \
  --url https://api.sulu.sh/v0/users/{userId}/principal \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "organization": "<string>",
  "roles": [
    "<string>"
  ]
}'
{
  "id": "<string>",
  "userId": "<string>",
  "organizationId": "<string>",
  "roles": [
    "<string>"
  ],
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

userId
string
required

Unique identifier for a user

Body

application/json

Response

201
application/json
Principal created successfully

The response is of type object.