POST | https://[domain].omnidesk.ru/api/labels.json
{
"label" : {
"label_title" : "Test title"
}
}
{
"label" : {
"label_id" : 200,
"label_title" : "Test title"
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "labels": {"label_title":"Test title" }}' https://[domain].omnidesk.ru/api/labels.json
GET | https://[domain].omnidesk.ru/api/labels.json
{
"0" : {
"label" : {
"label_id" : 200,
"label_title" : "Test title"
}
},
"1" : {
"label" : {
"label_id" : 210,
"label_title" : "Test title 2"
}
},
"total_count":10
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].omnidesk.ru/api/labels.json?limit=50&page=2
PUT | https://[domain].omnidesk.ru/api/labels/[id].json
{
"label" : {
"label_title" : "New label title"
}
}
{
"label" : {
"label_id" : 200,
"label_title" : "New label title"
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "label": { "label_title":"New label title" }}' https://[domain].omnidesk.ru/api/labels/200.json
DELETE | https://[domain].omnidesk.ru/api/labels/[id].json
HTTP Status: 200 OK
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].omnidesk.ru/api/labels/200.json