POST | https://[domain].omnidesk.ru/api/cases.json
{
"case" : {
"user_email" : "user@domain.ru",
"user_full_name" : "User's full name",
"subject" : "I need help",
"content" : "I need help",
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102]
}
}
{
"case" : {
"case_id" : 2000,
"case_number" : "664-245651",
"subject" : "I need help",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "waiting",
"priority" : "normal",
"channel" : "web",
"recipient" : "user@domain.ru",
"cc_emails" : "",
"bcc_emails" : "",
"deleted" : false,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102]
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "case": { "user_email":"user@domain.ru", "user_full_name":"User\u0027s full name", "subject":"I need help", "content":"I need help", "language_id":2, "custom_fields":{"cf_25":"some text", "cf_30":"another field"}, "labels":[101, 102] }}' https://[domain].omnidesk.ru/api/cases.json
POST | https://[domain].omnidesk.ru/api/cases.json
{
"case[user_email]": "alex@abcompany.com",
"case[user_full_name]": "Алексей",
"case[subject]": "Договор и счёт",
"case[content]": "Коллеги, добрый день! Документы в приложении.",
"case[attachments][1]": "Contract.pdf",
"case[attachments][2]": "Invoice.pdf"
}
{
"case" : {
"user_email" : "alex@abcompany.com",
"user_full_name": "Алексей",
"subject" : "Договор и счёт",
"content" : "Коллеги, добрый день! Документы в приложении.",
"attachment_urls": [
"https://abcompany.ru/548899/contract.pdf",
"https://abcompany.ru/548899/invoice.pdf"
]
}
}
{
"case" : {
"case_id" : 2000,
"case_number" : "664-245651",
"subject" : "Договор и счёт",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "waiting",
"priority" : "normal",
"channel" : "web",
"recipient" : "alex@abcompany.com",
"cc_emails" : "",
"bcc_emails" : "",
"deleted" : false,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102]
}
}
curl -u [staff_email]:[api_key] -F "case[attachments][0]=@/path/to/file1.ext" -F "case[attachments][1]=@/path/to/file2.ext" -F "case[content]=I need help" -F "case[subject]=I need help" -F "case[user_email]=alex@abcompany.com" -F "case[language_id]=2" -F "case[custom_fields][cf_44]=3" -X POST https://[domain].omnidesk.ru/api/cases.json
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "case": { "user_email":"alex@abcompany.com", "subject":"Договор и счёт", "content":"Коллеги, добрый день! Документы в приложении.", "attachment_urls": ["https://abcompany.ru/548899/contract.pdf", "https://abcompany.ru/548899/invoice.pdf"] }}' https://[domain].omnidesk.ru/api/cases.json
GET | https://[domain].omnidesk.ru/api/cases.json
{
"0": {
"case" : {
"case_id" : 2000,
"case_number" : "664-245551",
"subject" : "I need help",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "open",
"priority" : "low",
"channel" : "web",
"recipient" : "user@domain.ru",
"cc_emails" : "user_cc@domain.ru,user_cc2@domain.ru",
"bcc_emails" : "user_bcc@domain.ru",
"deleted" : false,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"closed_at" : "-",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"last_response_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"parent_case_id": 0,
"closing_speed": "-", // значение в минутах. 0 - меньше минуты,
// "-" - не закрыто
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102],
"locked_labels" : [101]
}
},
"1": {
"case" : {
"case_id" : 2001,
"case_number" : "334-245651",
"subject" : "Oh, help me please",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "waiting",
"priority" : "normal",
"channel" : "facebook",
"recipient" : "facebook",
"cc_emails" : "",
"bcc_emails" : "",
"deleted" : false,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"closed_at" : "-",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"last_response_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"parent_case_id": 0,
"closing_speed": "-",
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102],
"locked_labels" : [101]
}
},
"2": {
"case" : {
"case_id" : 2002,
"case_number" : "634-245651",
"subject" : "Please, help me!",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "waiting",
"priority" : "high",
"channel" : "email",
"recipient" : "user2@domain.ru",
"cc_emails" : "user_cc@domain.ru,user_cc2@domain.ru",
"bcc_emails" : "bcc@domain.ru",
"deleted" : false,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"closed_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"last_response_at" : "Tue, 23 Dec 2014 10:54:59 +0200",
"parent_case_id": 0,
"closing_speed": "-",
"language_id" : 1,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102],
"locked_labels" : [101]
}
},
"3": {
"case" : {
"case_id" : 2003,
"case_number" : "134-245651",
"subject" : "Help!!!",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "closed",
"priority" : "critical",
"channel" : "email",
"recipient" : "user3@domain.ru",
"cc_emails" : "user_cc@domain.ru,user_cc2@domain.ru",
"bcc_emails" : "user_bcc@domain.ru",
"deleted" : false,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"closed_at" : "Tue, 23 Dec 2014 09:47:02 +0200",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"last_response_at" : "Tue, 23 Dec 2014 09:47:02 +0200",
"parent_case_id": 0,
"closing_speed": 7,
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102],
"locked_labels" : [101],
"rating": "high",
"rating_comment": "cool123",
"rated_staff_id": 193
}
},
"total_count":17
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -g -X GET https://[domain].omnidesk.ru/api/cases.json?limit=50&page=2&custom_fields[cf_25]=data&custom_fields[cf_30]=anotherdata&status=open
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -g -X GET https://[domain].omnidesk.ru/api/cases.json?limit=50&page=2&custom_fields[cf_25][]=data&custom_fields[cf_25][]=data_two&custom_fields[cf_30][]=1&custom_fields[cf_30][]=2&status[]=open&status[]=closed
GET | https://[domain].omnidesk.ru/api/filters.json
{
"0" : {
"filter" : {
"filter_id" : unassigned,
"filter_name" : "open",
"isSelected" : true,
"isCustom" : false
}
},
"1" : {
"filter" : {
"filter_id" : 234,
"filter_name" : "Test filter",
"isSelected" : false,
"isCustom" : true
}
},
"total_count":10
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].omnidesk.ru/api/filters.json
GET | https://[domain].omnidesk.ru/api/cases/[id].json
{
"case" : {
"case_id" : 2000,
"case_number" : "664-245651",
"subject" : "I need help",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "closed",
"priority" : "normal",
"channel" : "web",
"recipient" : "user@domain.ru",
"cc_emails" : "user_cc@domain.ru,user_cc2@domain.ru",
"bcc_emails" : "user_bcc@domain.ru",
"deleted" : false,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"closed_at" : "-",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"last_response_at" : "Tue, 23 Dec 2014 09:53:14 +0200",
"closing_speed": 15, // значение в минутах. 0 - меньше минуты,
// "-" - не закрыто
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102, 103, 104, 105],
"locked_labels" : [104, 105],
"rating": "high",
"rating_comment": "cool123",
"rated_staff_id": 193
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].omnidesk.ru/api/cases/2000.json
GET | https://[domain].omnidesk.ru/api/cases/[id]/messages.json
{
"0": {
"message" : {
"message_id" : 2000,
"user_id" : 123,
"staff_id" : 0,
"content" : "",
"content_html" : "Тестовый ответ пользователя",
"attachments" : [],
"note" : false,
"sent_via_rule" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"sent_at" : "Mon, 05 May 2014 00:15:17 +0300",
"rating": "high",
"rating_comment": "cool123",
"rated_staff_id": 0
}
},
"1": {
"message" : {
"message_id" : 200198234,
"user_id" : 0,
"staff_id" : 41094,
"content" : "",
"content_html" : "Тестовый ответ сотрудника",
"attachments" : [
{
"file_id" : 345,
"file_name" : "test.jpg",
"file_size" : 40863,
"mime_type" : "image/jpeg",
"url" : "https://[domain].omnidesk.ru/some_path_here/345"
}
],
"note" : false,
"sent_via_rule" : false,
"created_at" : "Mon, 15 May 2023 09:28:43 +0300",
"sent_at" : "Mon, 15 May 2023 10:15:17 +0300" // если created_at и sent_at отличаются, значит, запланирована отложенная отправка сообщения
}
},
"total_count":17
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].omnidesk.ru/api/cases/200/messages.json
GET | https://[domain].omnidesk.ru/api/cases/[id]/changelog.json
{
"changelog": [{
"created_at": "Fri, 13 Aug 2021 12:57:54 +0300",
"event": "rules",
"done_by": "rule_1332",
"old_value": "Slack Notification (ID - 1332)"
},
{
"created_at": "Fri, 13 Aug 2021 12:57:54 +0300",
"event": "staff",
"done_by": "rule_1332",
"old_value": "0",
"value": "330"
},
{
"created_at": "Fri, 13 Aug 2021 12:57:54 +0300",
"event": "fixed_chat",
"done_by": "rule_1332",
"old_value": "0",
"value": "330"
},
{
"created_at": "Fri, 13 Aug 2021 12:57:54 +0300",
"event": "group",
"done_by": "rule_1336",
"old_value": "341",
"value": "344"
},
{
"created_at": "Fri, 13 Aug 2021 12:58:07 +0300",
"event": "status",
"done_by": "staff_330",
"old_value": "open",
"value": "waiting"
},
{
"created_at": "Fri, 13 Aug 2021 12:58:13 +0300",
"event": "custom_field_94",
"done_by": "staff_330",
"old_value": "",
"value": "1"
},
]
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].omnidesk.ru/api/cases/128-917744/changelog.json?show_chat_completion=true&status=any,any
POST | https://[domain].omnidesk.ru/api/cases/[id]/messages.json
{
"message" : {
"user_id" : "18772600",
"content" : "текст сообщения пользователя"
}
}
{
"message" : {
"message_id" : 2001,
"user_id" : 0,
"staff_id" : 123,
"content" : "I need help",
"content_html" : "",
"attachments" : [],
"note" : false,
"created_at" : "Mon, 06 May 2014 00:15:17 +0300"
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "message": { "content":"I need help", "staff_id":123 }}' https://[domain].omnidesk.ru/api/cases/200/messages.json
POST | https://[domain].omnidesk.ru/api/cases/[id]/messages.json
{
"message[user_id]": 18772600,
"message[content]": "Документы в приложении.",
"message[attachments][1]": "Contract.pdf",
"message[attachments][2]": "Invoice.pdf"
}
{
"message" : {
"user_id" : "18772600",
"content" : "Документы в приложении.",
"attachment_urls": [
"https://abcompany.ru/548899/contract.pdf",
"https://abcompany.ru/548899/invoice.pdf"
]
}
}
{
"message" : {
"message_id" : 2001,
"user_id" : 18772600,
"staff_id" : 0,
"content" : "Документы в приложении",
"content_html" : "",
"attachments" : [
{
"file_id" : 345,
"file_name" : "contract.pdf",
"file_size" : 40863,
"mime_type" : "application/pdf",
"url" : "https://[domain].omnidesk.ru/some_path_here/345"
},
{
"file_id" : 346,
"file_name" : "invoice.pdf",
"file_size" : 50863,
"mime_type" : "application/pdf",
"url" : "https://[domain].omnidesk.ru/some_path_here/346"
}
],
"note" : false,
"created_at" : "Mon, 06 May 2014 00:15:17 +0300"
}
}
curl -u [staff_email]:[api_key] -F "message[attachments][0]=@/path/to/file1.ext" -F "message[attachments][1]=@/path/to/file2.ext" -F "message[content]=I need help" -F "message[user_id]=18772600" -X POST https://[domain].omnidesk.ru/api/cases/200/messages.json
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "message": { "user_id":18772600, "content":"Документы в приложении.", "attachment_urls": ["https://abcompany.ru/548899/contract.pdf", "https://abcompany.ru/548899/invoice.pdf"] }}' https://[domain].omnidesk.ru/api/cases/200/messages.json
PUT | https://[domain].omnidesk.ru/api/cases/[case_id]/messages/[message_id].json
{
"message" : {
"content" : "Edited content"
}
}
{
"message" : {
"message_id" : 2001,
"user_id" : 0,
"staff_id" : 123,
"content" : "Edited content",
"content_html" : "",
"attachments" : [],
"note" : false,
"created_at" : "Mon, 06 May 2014 00:15:17 +0300"
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "message": { "content":"Edited content" }}' https://[domain].omnidesk.ru/api/cases/200/messages/2001.json
DELETE | https://[domain].omnidesk.ru/api/cases/[case_id]/messages/[message_id].json
HTTP Status: 200 OK
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].omnidesk.ru/api/cases/2000/messages/123456.json
POST | https://[domain].omnidesk.ru/api/cases/[id]/note.json
{
"note" : {
"staff_id" : 123,
"content" : "I need help"
}
}
{
"message" : {
"message_id" : 2001,
"user_id" : 0,
"staff_id" : 123,
"content" : "I need help",
"content_html" : "",
"attachments" : [],
"note" : true,
"created_at" : "Mon, 06 May 2014 00:15:17 +0300"
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "message": { "content":"I need help", "note_staff_id":123 }}' https://[domain].omnidesk.ru/api/cases/200/note.json
POST | https://[domain].omnidesk.ru/api/cases/[id]/note.json
{
"note[staff_id]": "15789",
"note[content]": "Документы в приложении.",
"note[attachments][1]": "Contract.pdf",
"note[attachments][2]": "Invoice.pdf"
}
{
"note" : {
"staff_id" : "15789",
"content" : "Документы в приложении.",
"attachment_urls": [
"https://abcompany.ru/548899/contract.pdf",
"https://abcompany.ru/548899/invoice.pdf"
]
}
}
{
"message" : {
"message_id" : 2001,
"user_id" : 0,
"staff_id" : 15789,
"content" : "Документы в приложении.",
"content_html" : "",
"attachments" : [
{
"file_id" : 345,
"file_name" : "contract.pdf",
"file_size" : 40863,
"mime_type" : "application/pdf",
"url" : "https://[domain].omnidesk.ru/some_path_here/345"
},
{
"file_id" : 346,
"file_name" : "invoice.pdf",
"file_size" : 50863,
"mime_type" : "application/pdf",
"url" : "https://[domain].omnidesk.ru/some_path_here/346"
}
],
"note" : true,
"created_at" : "Mon, 06 May 2014 00:15:17 +0300"
}
}
curl -u [staff_email]:[api_key] -F "note[attachments][0]=@/path/to/file1.ext" -F "note[attachments][1]=@/path/to/file2.ext" -F "note[content]=I need help" -F "note[staff_id]=15789" -X POST https://[domain].omnidesk.ru/api/cases/200/note.json
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "note": { "staff_id":15789, "content":"Документы в приложении.", "attachment_urls": ["https://abcompany.ru/548899/contract.pdf", "https://abcompany.ru/548899/invoice.pdf"] }}' https://[domain].omnidesk.ru/api/cases/200/note.json
PUT | https://[domain].omnidesk.ru/api/cases/[case_id]/note/[message_id].json
{
"note" : {
"content" : "Edited content"
}
}
{
"message" : {
"message_id" : 2001,
"user_id" : 0,
"staff_id" : 123,
"content" : "Edited content",
"content_html" : "",
"attachments" : [],
"note" : true,
"created_at" : "Mon, 06 May 2014 00:15:17 +0300"
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "message": { "content":"Edited content" }}' https://[domain].omnidesk.ru/api/cases/200/messages/2001.json
DELETE | https://[domain].omnidesk.ru/api/cases/[case_id]/note/[message_id].json
HTTP Status: 200 OK
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].omnidesk.ru/api/cases/2000/note/123456.json
PUT | https://[domain].omnidesk.ru/api/cases/[case_id]/rate.json
{
"rate" : {
"rating" : "low\middle\high",
"rating_comment" : "cool",
"rating_staff_id" : 189
}
}
{
"case" : {
"case_id" : 2000,
"case_number" : "664-245651",
"subject" : "I need help",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "waiting",
"priority" : "normal",
"channel" : "web",
"recipient" : "user@domain.ru",
"cc_emails" : "user_cc@domain.ru,user_cc2@domain.ru",
"bcc_emails" : "user_bcc@domain.ru",
"deleted" : false,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102]
"rating": "high",
"rating_comment": "cool123",
"rated_staff_id": 189
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d "{ \"rate\" : { \"rating\" : \"low\", \"rating_comment\" : \"cool\" }} " https://[domain].omnidesk.ru/api/cases/47223/rate.json
PUT | https://[domain].omnidesk.ru/api/cases/[case_id]/rate/[message_id].json
{
"rate" : {
"rating" : "low\middle\high",
"rating_comment" : "cool"
}
}
{
"message" : {
"message_id" : 2001,
"user_id" : 0,
"staff_id" : 123,
"content" : "I need help",
"content_html" : "",
"attachments" : [],
"note" : false,
"created_at" : "Mon, 06 May 2014 00:15:17 +0300",
"rating": "low",
"rating_comment": "cool",
"rated_staff_id": 0
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d "{ \"rate\" : { \"rating\" : \"low\", \"rating_comment\" : \"cool\" }} " https://[domain].omnidesk.ru/api/cases/47223/rate/153624.json
PUT | https://[domain].omnidesk.ru/api/cases/[id].json
{
"case" : {
"subject" : "Test subject changed",
"status" : "closed",
"priority" : "critical",
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"add_labels" : [103, 104]
}
}
{
"case" : {
"case_id" : 2000,
"case_number" : "664-245651",
"subject" : "Test subject changed",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "closed",
"priority" : "critical",
"channel" : "web",
"recipient" : "user@domain.ru",
"deleted" : false,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102, 103, 104]
}
}
{
"case_success_id" : [101, 102, 103, 104]
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "case": { "subject":"Test subject changed", "status":"closed", "priority":"critical","language_id":2, "custom_fields":{"cf_25":"some text", "cf_30":"another field"} }}' https://[domain].omnidesk.ru/api/cases/2000.json
PUT | https://[domain].omnidesk.ru/api/cases/[id]/trash.json
{
"case" : {
"case_id" : 2000,
"case_number" : "664-245651",
"subject" : "Test subject changed",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "closed",
"priority" : "critical",
"channel" : "web",
"recipient" : "user@domain.ru",
"deleted" : true,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102]
}
}
{
"case_success_id" : [101, 102, 103, 104]
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].omnidesk.ru/api/cases/2000/trash.json
PUT | https://[domain].omnidesk.ru/api/cases/[id]/spam.json
{
"case" : {
"case_id" : 2000,
"case_number" : "664-245651",
"subject" : "Test subject changed",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "closed",
"priority" : "critical",
"channel" : "web",
"recipient" : "user@domain.ru",
"deleted" : false,
"spam" : true,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102]
}
}
{
"case_success_id" : [101, 102, 103, 104]
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].omnidesk.ru/api/cases/2000/spam.json
PUT | https://[domain].omnidesk.ru/api/cases/[id]/restore.json
{
"case" : {
"case_id" : 2000,
"case_number" : "664-245651",
"subject" : "Test subject changed",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "closed",
"priority" : "critical",
"channel" : "web",
"recipient" : "user@domain.ru",
"deleted" : false,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"language_id" : 2,
"custom_fields" : {
"cf_25" : "some text",
"cf_30" : "another field"
},
"labels" : [101, 102]
}
}
{
"case_success_id" : [101, 102, 103, 104]
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].omnidesk.ru/api/cases/2000/restore.json
DELETE | https://[domain].omnidesk.ru/api/cases/[id].json
HTTP Status: 200 OK
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].omnidesk.ru/api/cases/2000.json
PUT | https://[domain].omnidesk.ru/api/cases/[case_id]/idea.json
{
"message" : {
"content" : "New content",
"stage" : "planned"
}
}
{
"case" : {
"case_id" : 2000,
"case_number" : "664-245651",
"subject" : "I need help",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "waiting",
"priority" : "normal",
"channel" : "idea",
"recipient" : "",
"cc_emails" : "",
"bcc_emails" : "",
"deleted" : false,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"idea" : {
"content" : "New content",
"stage" : "planned",
"category" : 319
}
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "message": { "content":"New content", "stage" : "planned" }}' https://[domain].omnidesk.ru/api/cases/200/idea.json
PUT | https://[domain].omnidesk.ru/api/cases/[case_id]/idea_official_response.json
{
"message" : {
"content" : "New official response"
}
}
{
"case" : {
"case_id" : 2000,
"case_number" : "664-245651",
"subject" : "I need help",
"user_id" : 123,
"staff_id" : 22,
"group_id" : 44,
"status" : "waiting",
"priority" : "normal",
"channel" : "idea",
"recipient" : "",
"cc_emails" : "",
"bcc_emails" : "",
"deleted" : false,
"spam" : false,
"created_at" : "Mon, 05 May 2014 00:15:17 +0300",
"updated_at" : "Tue, 23 Dec 2014 10:55:23 +0200",
"idea" : {
"official_response" : "New official response",
"official_response_tstamp" : 1509007649
}
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "message": { "content":"New official response" }}' https://[domain].omnidesk.ru/api/cases/200/idea_official_response.json
DELETE | https://[domain].omnidesk.ru/api/cases/[case_id]/idea_official_response.json
HTTP Status: 200 OK
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].omnidesk.ru/api/cases/2000/idea_official_response.json