Skip to main content
POST
/
labels
/
{labelId}
/
access
Add Label Access
curl --request POST \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/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": "jsmith@example.com",
        "profilePicture": "<string>"
      }
    }
  }
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/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);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Path Parameters

labelId
string<uuid>
required

Body

application/json
tenantUserId
string<uuid>
required
role
enum<string>
required
Available options:
admin,
manager,
viewer
permissions
string[]

Response

Created

status
string
data
object

Label access entry linking a tenant user to a label