DESKIE API
Cases
Create a case

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

{
  "case" : {
    "user_email" : "[email protected]",
    "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]
  }
}

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" : "web",
    "recipient" : "[email protected]",
    "recipient_cc" : "",
    "recipient_bcc" : "",
    "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]
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "case": { "user_email":"[email protected]", "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].deskie.io/api/cases.json
Create a case with attachments

POST  |  https://[domain].deskie.io/api/cases.json
Create a new case with attachments.
The maximum size of single attached file is 25MB.
The total size of all files should not exceed 50MB.
There are two options to send a request:
— in multipart/form-data format, to send the files themselves in the request;
— using the attachment_urls parameter to specify links to files.
Request in multipart/form-data format

{
  "case[user_email]": "[email protected]",
  "case[user_full_name]": "Alex",
  "case[subject]": "Contract and invoice",
  "case[content]": "Dear Team, docs are attached.",
  "case[attachments][1]": "Contract.pdf",
  "case[attachments][2]": "Invoice.pdf"
}
Request using the attachment_urls parameter

{
  "case" : {
    "user_email" : "[email protected]",
    "user_full_name": "Alex",
    "subject" : "Contract and invoice",
    "content" : "Dear Team, docs are attached.",
    "attachment_urls":  [
        "https://abcompany.com/548899/contract.pdf",
        "https://abcompany.com/548899/invoice.pdf"
    ]
  }
}
Response

{
  "case" : {
    "case_id" : 2000,
    "case_number" : "664-245651",
    "subject" : "Contract and invoice",
    "user_id" : 123,
    "staff_id" : 22,
    "group_id" : 44,
    "status" : "waiting",
    "priority" : "normal",
    "channel" : "web",
    "recipient" : "[email protected]",
    "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]
  }
}
Sample code in multipart/form-data format

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][email protected]" -F "case[language_id]=2" -F "case[custom_fields][cf_44]=3" -X POST https://[domain].deskie.io/api/cases.json
Sample code using the attachment_urls parameter

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "case": { "user_email":"[email protected]", "subject":"Contract and invoice", "content":"Dear Team, docs are attached.", "attachment_urls":  ["https://abcompany.com/548899/contract.pdf", "https://abcompany.com/548899/invoice.pdf"] }}' https://[domain].deskie.io/api/cases.json
Get a list of cases

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

If the "page" and "limit" parameters are not specified in the request, by default, the first 100 cases will be returned.

When passing an array parameter (for example, several user IDs via the user_id parameter), you can specify no more than 20 values.

In response to the request, the "labels" parameter transmits all the labels of the case; "locked_labels" — are the ones added via rules and SLA and agents cannot delete them either through the web version of the agent account or mobile apps.
Parameters
Response

{
    "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" : "[email protected]",
        "recipient_cc" : "[email protected],[email protected]",
        "recipient_bcc" : "[email protected]",
        "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],
        "closing_speed" : 7 // value in minutes. 0 - less than a minute,
                            // "-" - not closed
      }
    },
    "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",
        "recipient_cc" : "",
        "recipient_bcc" : "",
        "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],
        "closing_speed" : 0
      }
    },
    "2": {
      "case" : {
        "case_id" : 2002,
        "case_number" : "634-245651",
        "subject" : "Please, help me!",
        "user_id" : 123,
        "staff_id" : 22,
        "group_id" : 44,
        "status" : "closed",
        "priority" : "high",
        "channel" : "email",
        "recipient" : "[email protected]",
        "recipient_cc" : "[email protected],[email protected]",
        "recipient_bcc" : "[email protected]",
        "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" : 1,
        "custom_fields" : {
          "cf_25" : "some text",
          "cf_30" : "another field"
        },
        "labels" : [101, 102],
        "closing_speed" : "-"
      }
    },
    "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" : "[email protected]",
        "recipient_cc" : "[email protected],[email protected]",
        "recipient_bcc" : "[email protected]",
        "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]
      }
    },
    "total_count":17
}
Sample code (string)

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -g -X GET https://[domain].deskie.io/api/cases.json?limit=50&page=2&custom_fields[cf_25]=data&custom_fields[cf_30]=anotherdata&status=open
Sample code (array)

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -g -X GET https://[domain].deskie.io/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 a list of filters 

GET  |  https://[domain].deskie.io/api/filters.json
View all the filters of the agent whose credentials are being used for authentication.
Response

{
    "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
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/filters.json
View a case

GET  |  https://[domain].deskie.io/api/cases/[id].json
View data of a specific case.

In response to the request, the "labels" parameter transmits all the labels of the case; "locked_labels" — are the ones added via rules and SLA and agents cannot delete them either through the web version of the agent account or mobile apps.
Response

{
  "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" : "[email protected]",
    "cc_emails" : "[email protected],[email protected]",
    "bcc_emails" : "[email protected]",
    "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, // value in minutes. 0 - less than a minute,
                            // "-" - not closed
    "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
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/cases/2000.json
View messages

GET  |  https://[domain].deskie.io/api/cases/[id]/messages.json
View the messages of a specific case.

If the "page" and "limit" parameters are not specified in the request, by default, the last 100 messages of the case will be returned.

❗️When a message contains images within text or attached files, you receive links to them in the response to the request. For fresh messages, links to images and files work without authorization. If the message was created more than 30 days ago, that is the files are old, to get them you need to use the same authentication method that you use to make requests to the Deskie API.
Parameters
Response

{
  "0": {
      "message" : {
        "message_id" : 2000,
        "user_id" : 123,
        "staff_id" : 0,
        "content" : "",
        "content_html" : "Test response of the user",
        "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" : 200198257,
        "user_id" : 0,
        "staff_id" : 41087,
        "content" : "",
        "content_html" : "Test response of the user",
        "attachments" : [
          {
              "file_id" : 345,
              "file_name" : "test.jpg",
              "file_size" : 40863,
              "mime_type" : "image/jpeg",
              "url" : "https://[domain].deskie.io/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" // if created_at and sent_at are different, it means that a delayed message is scheduled
      }
    },
    "total_count":17
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/cases/200/messages.json
View changelog

GET  |  https://[domain].deskie.io/api/cases/[id]/changelog.json
View the changelog of a specific case.

By default, the response contains the record of almost all the changes that have occurred in the case. For filtering, with the request, you need to pass the parameters from the table below.

If the "page" and "limit" parameters are not specified in the request, by default, the record of the last 100 changes that have occurred in the case will be returned.
The changelog is stored for the last year. If a case is old, then there will be no logs. If a case was created more than a year ago, but new actions are still appearing in it (parameter changes, user responses, agent responses, notes), only data for the last year will be present in the changelog of that case.
Parameters
Response

{
    "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"
        },
    ]
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/cases/128-917744/changelog.json?show_chat_completion=true&status=any,any
Add a response

POST  |  https://[domain].deskie.io/api/cases/[id]/messages.json
Add a new user/agent response to the case.
Bulk response addition: https://[domain].deskie.io/api/cases/[id],[id],[id]/messages.json.

No more than 10 cases in one request.
Parameters
Request

{ 
  "message" : 
  {
    "user_id" : "18772600", 
    "content" : "user reply text"
  }
}
Response

{
  "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"
  }
}
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "message": { "content":"I need help", "staff_id":123 }}' https://[domain].deskie.io/api/cases/200/messages.json
Add a response with attachments

POST  |  https://[domain].deskie.io/api/cases/[id]/messages.json
Add a new user/agent response with attachments to the case.
The maximum size of single attached file is 25MB.
The total size of all files should not exceed 50MB.
There are two options to send a request:
— in multipart/form-data format, to send the files themselves in the request;
— using the attachment_urls parameter to specify links to files.
Request in multipart/form-data format

{
  "message[user_id]": 18772600,
  "message[content]": "Docs are attached.",
  "message[attachments][1]": "Contract.pdf",
  "message[attachments][2]": "Invoice.pdf"
}
Request using the attachment_urls parameter

{ 
  "message" : {
    "user_id" : "18772600", 
    "content" : "Docs are attached.",
    "attachment_urls":  [
        "https://abcompany.com/548899/contract.pdf",
        "https://abcompany.com/548899/invoice.pdf"
    ]
  }
}
Response

{
  "message" : {
    "message_id" : 2001,
    "user_id" : 18772600,
    "staff_id" : 0,
    "content" : "Docs are attached",
    "content_html" : "",
    "attachments" : [
      {
          "file_id" : 345,
          "file_name" : "contract.pdf",
          "file_size" : 40863,
          "mime_type" : "application/pdf",
          "url" : "https://[domain].deskie.io/some_path_here/345"
      },
      {
          "file_id" : 346,
          "file_name" : "invoice.pdf",
          "file_size" : 50863,
          "mime_type" : "application/pdf",
          "url" : "https://[domain].deskie.io/some_path_here/346"
      }
    ],
    "note" : false,
    "created_at" : "Mon, 06 May 2014 00:15:17 +0300"
  }
}
Sample code in multipart/form-data format

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].deskie.io/api/cases/200/messages.json
Sample code using the attachment_urls parameter

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "message": { "user_id":18772600, "content":"Docs are attached.", "attachment_urls":  ["https://abcompany.com/548899/contract.pdf", "https://abcompany.com/548899/invoice.pdf"]  }}' https://[domain].deskie.io/api/cases/200/messages.json
Edit a response

PUT  |  https://[domain].deskie.io/api/cases/[case_id]/messages/[message_id].json
Edit a user/agent response in a case.
Parameters
Request

{
  "message" : {
    "content" : "Edited content"
  }
}
Response

{
  "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"
  }
}
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "message": { "content":"Edited content" }}' https://[domain].deskie.io/api/cases/200/messages/2001.json
Delete a response

DELETE  |  https://[domain].deskie.io/api/cases/[case_id]/messages/[message_id].json
Delete a response in the case.
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/cases/2000/messages/123456.json
Add a note

POST  |  https://[domain].deskie.io/api/cases/[id]/note.json
Add a note to the case.
Bulk note addition: https://[domain].deskie.io/api/cases/[id],[id],[id]/note.json.

No more than 10 cases in one request.
Parameters
Request

{
  "note" : {
    "note_staff_id" : 123,
    "content" : "I need help"
  }
}
Response

{
  "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"
  }
}
}
Sample code

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].deskie.io/api/cases/200/note.json
Add a note with attachments

POST  |  https://[domain].deskie.io/api/cases/[id]/note.json
Add a note with attachments to the case.
The maximum size of single attached file is 25MB.
The total size of all files should not exceed 50MB.
There are two options to send a request:
— in multipart/form-data format, to send the files themselves in the request;
— using the attachment_urls parameter to specify links to files.
Request in multipart/form-data format

{
  "note[staff_id]": "15789",
  "note[content]": "Docs are attached.",
  "note[attachments][1]": "Contract.pdf",
  "note[attachments][2]": "Invoice.pdf"
}
Request using the attachment_urls parameter

{
  "note" : {
    "staff_id" : "15789",
    "content" : "Docs are attached.",
    "attachment_urls":  [
        "https://abcompany.com/548899/contract.pdf",
        "https://abcompany.com/548899/invoice.pdf"
    ]
  }
}
Response

{
  "message" : {
    "message_id" : 2001,
    "user_id" : 0,
    "staff_id" : 15789,
    "content" : "Docs are attached.",
    "content_html" : "",
    "attachments" : [
      {
          "file_id" : 345,
          "file_name" : "contract.pdf",
          "file_size" : 40863,
          "mime_type" : "application/pdf",
          "url" : "https://[domain].deskie.io/some_path_here/345"
      },
      {
          "file_id" : 346,
          "file_name" : "invoice.pdf",
          "file_size" : 50863,
          "mime_type" : "application/pdf",
          "url" : "https://[domain].deskie.io/some_path_here/346"
      }
    ],
    "note" : true,
    "created_at" : "Mon, 06 May 2014 00:15:17 +0300"
  }
}
Sample code in multipart/form-data format

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].deskie.io/api/cases/200/note.json
Sample code using the attachment_urls parameter

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "note": { "staff_id":15789, "content":"Docs are attached", "attachment_urls":  ["https://abcompany.com/548899/contract.pdf", "https://abcompany.com/548899/invoice.pdf"]  }}' https://[domain].deskie.io/api/cases/200/note.json
Edit a note

PUT  |  https://[domain].deskie.io/api/cases/[case_id]/note/[message_id].json
Edit a note in the case.
Parameters
Request

{
  "note" : {
    "content" : "Edited content"
  }
}
Response

{
  "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"
  }
}
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "message": { "content":"Edited content" }}' https://[domain].deskie.io/api/cases/200/messages/2001.json
Delete a note

DELETE  |  https://[domain].deskie.io/api/cases/[case_id]/note/[message_id].json
Delete a note in the case.
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/cases/2000/note/123456.json
Add a satisfaction rating to the case

PUT | https://[domain].deskie.io/api/cases/[case_id]/rate.json
Add a satisfaction rating to the case/chat on behalf of the user.

Applies if the option "in a separate email after the case is closed" is selected within the rating settings for email based cases and/or any option is selected within the rating settings for chats.
Parameters
Request

{ 
  "rate" : { 
       "rating" : "low\middle\high", 
       "rating_comment" : "cool",
       "rating_staff_id" : 189
   }
}
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" : "web",
    "recipient" : "[email protected]",
    "cc_emails" : "[email protected],[email protected]",
    "bcc_emails" : "[email protected]",
    "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
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d "{ \"rate\" : { \"rating\" : \"low\", \"rating_comment\" : \"cool\" }} " https://[domain].deskie.io/api/cases/47223/rate.json
Add a satisfaction rating to the message

PUT | https://[domain].deskie.io/api/cases/[case_id]/rate/[message_id].json
Add a satisfaction rating to a specific agent response.

Applies if the option "in the signature of each agent's response" is selected within the rating settings for email based cases.
Parameters
Request

{ 
  "rate" : { 
       "rating" : "low\middle\high", 
       "rating_comment" : "cool"
   }
}
Response

{
  "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
  }
}
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d "{ \"rate\" : { \"rating\" : \"low\", \"rating_comment\" : \"cool\" }} " https://[domain].deskie.io/api/cases/47223/rate/153624.json
Update a case/cases

PUT  |  https://[domain].deskie.io/api/cases/[id].json
Update parameters of a specific case.
Bulk update: https://[domain].deskie.io/api/cases/[id],[id],[id].json.

No more than 10 cases in one request.
Parameters
Request

{
  "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]
  }
}
Response

{
  "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" : "[email protected]",
    "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]
  }
}
RESPONSE FOR A BULK UPDATE

{
  "case_success_id" : [101, 102, 103, 104]
}
Sample code

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].deskie.io/api/cases/2000.json
Move a case/cases to the "TRASH"

PUT  |  https://[domain].deskie.io/api/cases/[id]/trash.json
Move a case to the "TRASH".
Bulk move cases to the "TRASH": https://[domain].deskie.io/api/cases/[id],[id],[id]/trash.json.

No more than 10 cases in one request.
Response

{
  "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" : "[email protected]",
    "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]
  }
}
RESPONSE FOR A BULK MOVING OF CASES TO THE "TRASH"

{
  "case_success_id" : [101, 102, 103, 104]
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/cases/2000/trash.json
Mark a case/cases as SPAM

PUT  |  https://[domain].deskie.io/api/cases/[id]/spam.json
Move a case to the "SPAM" filter.
Bulk move cases to the "SPAM" filter: https://[domain].deskie.io/api/cases/[id],[id],[id]/spam.json.

No more than 10 cases in one request.
Response

{
  "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" : "[email protected]",
    "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]
  }
}
RESPONSE FOR A BULK MOVING OF CASES TO THE "SPAM" FILTER

{
  "case_success_id" : [101, 102, 103, 104]
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/cases/2000/spam.json
Restore a case/cases

PUT  |  https://[domain].deskie.io/api/cases/[id]/restore.json
Restore a case from the "TRASH" or "SPAM".
Bulk restore: https://[domain].deskie.io/api/cases/[id],[id],[id]/restore.json.

No more than 10 cases in one request.
Response

{
  "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" : "[email protected]",
    "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]
  }
}
RESPONSE FOR A BULK RESTORING OF CASES

{
  "case_success_id" : [101, 102, 103, 104]
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/cases/2000/restore.json
Delete permanently a case

DELETE  |  https://[domain].deskie.io/api/cases/[id].json
Delete permanently a case. Available only to the agents with a full access level.
Bulk permanent delete: https://[domain].deskie.io/api/cases/[id],[id],[id].json.

No more than 10 cases in one request.
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/cases/2000.json
Edit an idea

PUT  |  https://[domain].deskie.io/api/cases/[case_id]/idea.json
Edit an idea.
Parameters
Request

{
  "message" : {
    "content" : "New content",
    "stage" : "planned"
  }
}
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" : "",
    "recipient_cc" : "",
    "recipient_bcc" : "",
    "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
    }
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "message": { "content":"New content", "stage" : "planned" }}' https://[domain].deskie.io/api/cases/200/idea.json
Update an official response for the idea

PUT  |  https://[domain].deskie.io/api/cases/[case_id]/idea_official_response.json
Add/edit an official response for the idea.
Parameters
Request

{
  "message" : {
    "content" : "New official response"
  }
}
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" : "",
    "recipient_cc" : "",
    "recipient_bcc" : "",
    "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
    }
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "message": { "content":"New official response" }}' https://[domain].deskie.io/api/cases/200/idea_official_response.json
Delete an official response for the idea

DELETE  |  https://[domain].deskie.io/api/cases/[case_id]/idea_official_response.json
Delete an official response for the idea.
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/cases/2000/idea_official_response.json