List labels

Every label in a tenant, with who carries it.

GET /organizations/{org}/tenants/{tenantId}/labels

Labels are named groups inside a tenant. Applying one to a member gives them a level in it, and /users/me returns it in labels. Not paginated.

Authorization

Any member of the org. A non-member gets 404.

Path parameters

NameTypeDescription
orgstringThe organization: its id (org_…) or its slug. It has to be an org your token can manage (see Who can call it)
tenantIdstringThe tenant, tnt_…

Response

200 OK with an array of labels.

[
  {
    "id": "lbl_65f1c2a9e4b0d3f7a1c8e90a",
    "tenant_id": "tnt_65f1c2a9e4b0d3f7a1c8e908",
    "name": "Finance",
    "color": "emerald",
    "icon": "banknotes",
    "description": "",
    "members": [
      { "user_id": "usr_65f1c2a9e4b0d3f7a1c8e909", "level": "admin" }
    ]
  }
]
FieldTypeDescription
idstringlbl_…
tenant_idstring
namestring
colorstring
iconstringA Heroicons name
descriptionstring
members{ user_id, level }[]Who carries the label, at which level

Errors

StatuserrorWhen
404not_foundNo such tenant in this org, or the org is not yours

Example

curl https://loginwith.loginwith.dev/organizations/acme/tenants/tnt_65f1c2a9e4b0d3f7a1c8e908/labels \
  -H "Authorization: Bearer $TOKEN"