Open App

Labels

API endpoints for labels

List labels

GET /api/v1/labels

Parameters

NameInTypeRequiredDescription
entityTypequerystring (project, task)No
organisationIdquerystringNoOrganisation scope id; use personal for personal labels

Example request

curl -X GET \
"https://api.usemonoid.com/api/v1/labels?entityType=<entityType>&organisationId=<organisationId>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": [
    {
      "_id": "string",
      "name": "string",
      "color": "string",
      "entityType": "string",
      "organisationId": "string"
    }
  ]
}

Other statuses: 401, 403.

Response body type

{ data: Label[] }


Create label

POST /api/v1/labels

Example request

curl -X POST \
"https://api.usemonoid.com/api/v1/labels" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"name":"string","color":"string","entityType":"project","organisationId":"string"}'

Example response

Status: 201

{
  "data": {
    "_id": "string",
    "name": "string",
    "color": "string",
    "entityType": "string",
    "organisationId": "string"
  }
}

Other statuses: 400, 401, 403.

Response body type

{ data: Label }


Get label by id

GET /api/v1/labels/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesPath parameter.

Example request

curl -X GET \
"https://api.usemonoid.com/api/v1/labels/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "name": "string",
    "color": "string",
    "entityType": "string",
    "organisationId": "string"
  }
}

Other statuses: 401, 403, 404.

Response body type

{ data: Label }


Update label

PATCH /api/v1/labels/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesPath parameter.

Example request

curl -X PATCH \
"https://api.usemonoid.com/api/v1/labels/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"name":"string","color":"string","entityType":"project","organisationId":"string"}'

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "name": "string",
    "color": "string",
    "entityType": "string",
    "organisationId": "string"
  }
}

Other statuses: 400, 401, 403, 404.

Response body type

{ data: Label }


Delete label

DELETE /api/v1/labels/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesPath parameter.

Example request

curl -X DELETE \
"https://api.usemonoid.com/api/v1/labels/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Other statuses: 401, 403, 404.

Response body type