curl --request PUT \
--url https://api.royalti.io/user/{id}/aut \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"redirect_url": "https://app.royalti.io/welcome",
"sendEmail": true
}
'{}/user//aut
curl --request PUT \
--url https://api.royalti.io/user/{id}/aut \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"redirect_url": "https://app.royalti.io/welcome",
"sendEmail": true
}
'{}/user/{userId}/aut endpoint allows users to add a specific user to a tenant identified by their unique userId.
Method:
PUT
Path Parameter:
| Parameter | Type | Description |
|---|---|---|
| userId | string | The unique identifier of the user. |
| Parameter | Type | Description |
|---|---|---|
| redirect_url | string | The URL to redirect the user to after adding to tenant |
| sendEmail | boolean | Whether to send an invite email to the user (default: true) |
const response = await fetch('https://api.royalti.io/user/example-id/aut', {
method: 'PUT',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"redirect_url": "https://app.royalti.io/welcome",
"sendEmail": true
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
User ID (TenantUser ID)
success
The response is of type object.