Labels
Labels classify participants and resolve requests for filtering and reporting.
Label read endpoints require the listed api:labels:read scope and an active
owner identity. Label mutation endpoints require the listed api:labels:write
scope and an owner identity with label-management access. Admins and effective
project owners can create and update labels. Non-admin project owners can
delete only labels they created, and only when every usage is in projects they
own.
Endpoints
Section titled “Endpoints”| Method | Path | Required scope |
|---|---|---|
GET | /api/v1/labels | api:labels:read |
POST | /api/v1/labels | api:labels:write |
GET | /api/v1/labels/:id | api:labels:read |
PATCH | /api/v1/labels/:id | api:labels:write |
DELETE | /api/v1/labels/:id | api:labels:write |
List Labels
Section titled “List Labels”curl "https://roster.example.com/api/v1/labels?query=finance&limit=20" \ -H "Authorization: Bearer ${ROSTER_API_KEY}"const url = new URL("https://roster.example.com/api/v1/labels");url.searchParams.set("query", "finance");url.searchParams.set("limit", "20");
const response = await fetch(url, { headers: { Authorization: `Bearer ${process.env.ROSTER_API_KEY}`, },});
if (!response.ok) { throw new Error(`Label list failed: ${response.status}`);}
const data = await response.json();import osimport requests
response = requests.get( "https://roster.example.com/api/v1/labels", params={"query": "finance", "limit": 20}, headers={"Authorization": f"Bearer {os.environ['ROSTER_API_KEY']}"}, timeout=10,)response.raise_for_status()data = response.json()query searches label name case-insensitively. limit accepts values from 1
to 100.
Create Label
Section titled “Create Label”curl -X POST "https://roster.example.com/api/v1/labels" \ -H "Authorization: Bearer ${ROSTER_API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "name": "Finance", "color": "#C84A1F" }'const response = await fetch("https://roster.example.com/api/v1/labels", { method: "POST", headers: { Authorization: `Bearer ${process.env.ROSTER_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ name: "Finance", color: "#C84A1F" }),});
if (!response.ok) { throw new Error(`Label creation failed: ${response.status}`);}
const data = await response.json();import osimport requests
response = requests.post( "https://roster.example.com/api/v1/labels", headers={"Authorization": f"Bearer {os.environ['ROSTER_API_KEY']}"}, json={"name": "Finance", "color": "#C84A1F"}, timeout=10,)response.raise_for_status()data = response.json()