curl --request POST \
--url https://api.royalti.io/labels/{labelId}/access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "admin",
"permissions": [
"<string>"
]
}
'{
"status": "<string>",
"data": {
"TenantId": 123,
"LabelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "admin",
"permissions": [
"<string>"
],
"TenantUser": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "<string>",
"lastName": "<string>",
"role": "owner",
"permissions": {},
"User": {
"email": "[email protected]",
"profilePicture": "<string>"
}
}
}
}Add Label Access
curl --request POST \
--url https://api.royalti.io/labels/{labelId}/access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "admin",
"permissions": [
"<string>"
]
}
'{
"status": "<string>",
"data": {
"TenantId": 123,
"LabelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "admin",
"permissions": [
"<string>"
],
"TenantUser": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "<string>",
"lastName": "<string>",
"role": "owner",
"permissions": {},
"User": {
"email": "[email protected]",
"profilePicture": "<string>"
}
}
}
}const response = await fetch('https://api.royalti.io/labels/example-id/access', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"ref": "#/components/schemas/LabelAccessInput"
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"