DESKIE API
Labels
Create a label

POST  |  https://[domain].deskie.io/api/labels.json
Create a new label.
Parameters
Request

{
  "label" : {
    "label_title" : "Test title"
  }
}
Response

{
  "label" : {
    "label_id" : 200,
    "label_title" : "Test title"
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "labels": {"label_title":"Test title" }}' https://[domain].deskie.io/api/labels.json
Get a list of labels

GET  |  https://[domain].deskie.io/api/labels.json
Get a list of labels.
Parameters
Response

{
    "0" : {
      "label" : {
        "label_id" : 200,
        "label_title" : "Test title"
      }
    },
    "1" : {
      "label" : {
        "label_id" : 210,
        "label_title" : "Test title 2"
      }
    },
    "total_count":10
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/labels.json?limit=50&page=2
Edit a label

PUT  |  https://[domain].deskie.io/api/labels/[id].json
Edit a label.
Parameters
Request

{
  "label" : {
    "label_title" : "New label title"
  }
}
Response

{
  "label" : {
    "label_id" : 200,
    "label_title" : "New label title"
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "label": { "label_title":"New label title" }}' https://[domain].deskie.io/api/labels/200.json
Delete a label

DELETE  |  https://[domain].deskie.io/api/labels/[id].json
Delete a label.
Response

HTTP Status: 200 OK
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].deskie.io/api/labels/200.json