Labels

Labels are coloured tags for timers. They belong to the room, so renaming or recolouring one changes it on every timer that uses it. To attach labels, send label_ids when you update a timer.


The label object

A label is deleted automatically once no timer uses it.

  • Name
    _id
    Type
    string
    Description

    Unique id.

  • Name
    _model
    Type
    string
    Description

    The type of this object. Always label.

  • Name
    name
    Type
    string
    Description

    The name. At most 10 characters.

  • Name
    color
    Type
    string
    Description

    Hex color from the fixed 24-color label palette.


GET/rooms/{room_id}/labels

List labels

Returns the room's labels.

Path parameters

  • Name
    room_id
    Type
    string
    Required
    Description

    The room's id, from its address: /o/ROOM_ID/….

Request

GET
/rooms/{room_id}/labels
curl https://app.kloksi.com/api/v1/rooms/ROOM_ID/labels \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "ok": true,
  "message": "Labels loaded",
  "data": {
    "list": [
      {
        "_id": "L3mN4oPq5RsT",
        "_model": "label",
        "name": "Keynote",
        "color": "#4caf50"
      }
    ]
  }
}

POST/rooms/{room_id}/labels

Create a label

Adds a label to the room. The name is required, up to 10 characters. A room has at most 24 labels.

Path parameters

  • Name
    room_id
    Type
    string
    Required
    Description

    The room's id, from its address: /o/ROOM_ID/….

Body

  • Name
    name
    Type
    string
    Description

    The name. At most 10 characters.

  • Name
    color
    Type
    string
    Description

    The text colour.

Request

POST
/rooms/{room_id}/labels
curl -X POST https://app.kloksi.com/api/v1/rooms/ROOM_ID/labels \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Keynote","color":"#4caf50"}'

Response 201

{
  "ok": true,
  "message": "Label created",
  "data": {
    "_id": "L3mN4oPq5RsT",
    "_model": "label",
    "name": "Keynote",
    "color": "#4caf50"
  }
}

PATCH/rooms/{room_id}/labels/{label_id}

Update a label

Renames or recolours a label on every timer that uses it.

Path parameters

  • Name
    room_id
    Type
    string
    Required
    Description

    The room's id, from its address: /o/ROOM_ID/….

  • Name
    label_id
    Type
    string
    Required
    Description

    The label's id.

Body

  • Name
    name
    Type
    string
    Description

    The name. At most 10 characters.

  • Name
    color
    Type
    string
    Description

    The text colour.

Request

PATCH
/rooms/{room_id}/labels/{label_id}
curl -X PATCH https://app.kloksi.com/api/v1/rooms/ROOM_ID/labels/LABEL_ID \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Panel"}'

Response 200

{
  "ok": true,
  "message": "Label updated",
  "data": {
    "_id": "L3mN4oPq5RsT",
    "_model": "label",
    "name": "Keynote",
    "color": "#4caf50"
  }
}

DELETE/rooms/{room_id}/labels/{label_id}

Delete a label

Deletes a label and removes it from every timer.

Path parameters

  • Name
    room_id
    Type
    string
    Required
    Description

    The room's id, from its address: /o/ROOM_ID/….

  • Name
    label_id
    Type
    string
    Required
    Description

    The label's id.

Request

DELETE
/rooms/{room_id}/labels/{label_id}
curl -X DELETE https://app.kloksi.com/api/v1/rooms/ROOM_ID/labels/LABEL_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 204

204 No Content