Start a conversation

Retrieving All Conversations or Cases

Overview

If you ever need to obtain all the conversations or cases for migration, backup, or development purposes, you will find that there is no direct way to do it from the UI since the extraction of such data is very delicate. Nevertheless, there is an alternative way through API to work around your requirements for retrieving conversations.

 

Prerequisites

  • To retrieve cases via an API call, you need an agent, admin, or collaborator role user account.
  • To retrieve conversation details via the API call, you need at least a customer user account in Kayako.
  • Working knowledge of the API (application programming interface).

 

Solution

As mentioned earlier, an alternative way to retrieve all conversations is through an API call. You can use your browser to run the GET API requests but we also recommend using Postman, a user-friendly tool that will help you execute API requests.

It's worth noting that there are two options to retrieve customer conversation information from Kayako. These are separated into cases and conversations:

  • Cases contain all the customer conversation information as well as metadata used for internal purposes and it is allowed for staff user accounts (agents, admins, and collaborators role) only.
  • Conversations restrict the information to conversation details only. This is allowed to be retrieved by both customer (end-users) and staff user accounts.

Retrieving All Conversations

To retrieve general details from the Conversations which is also available to customers (end-users), use the information provided in our developer portal to review the Arguments and the code line to be used.

  1. Log in to Kayako and open a new tab on the same browser you are logged in.
  2. In the newly opened tab, paste the GET URL API endpoint request in the address bar and hit enter. The API endpoint follows this pattern: https://DOMAIN.kayako.com/api/v1/conversations.json 
    NOTES:
    • Replace the DOMAIN in the URL above with your actual domain name.
    • Use the same GET URL endpoint to execute the call via the Postman client.
    • When sending an API call with Postman, make sure to add your credentials (Kayako username and password) to the Authorization tab to process the request. Use Basic Auth as the authentication type.
      mceclip1.png

Retrieving All Cases

You may visit the developer portal to learn more about retrieving cases endpoint and code lines that go with advanced cases' data.

  1. Log in to Kayako as an agent, admin, or collaborator and open a new tab on the same browser you are logged in.
  2. In the newly opened tab, paste the GET URL API endpoint request in the address bar and hit enter. The API endpoint follows this pattern: https://DOMAIN.kayako.com/api/v1/cases.json 
    NOTES:
    • Replace the DOMAIN in the URL above with your actual domain name.
    • Use the same GET URL endpoint to execute the call via the Postman client.
    • When sending an API call with Postman, make sure to add your credentials (Kayako username and password) to the Authorization tab to process the request. Use Basic Auth as the authentication type.
    • By default, API calls will return a total of 10 results per page. However, you can add the limit argument to increase the number of results available per page. For example, you can retrieve up to 100 conversations by setting a limit of 100 /api/v1/cases.json?limit=100. Please refer to our Kayako developer page, Pagination, for more information.
  3. Please note that the above API will not include archived cases (these are cases that were closed 30 days ago or longer).  
    To enable search thought archived cases, please add &archived=1 at the end of the request. E.g.: https://DOMAIN.kayako.com/api/v1/cases?limit=100&offset=2500&archived=1

 

Confirmation

If the API call is successful, you should receive the Status: 200 at the very top of the page after running the endpoint for retrieving conversations or cases. Below the status are the details of the case in JSON format.  

 

{
"status": 200,
"data": [
{
"id": 35,
"legacy_id": null,
"subject": "Some subject",
"portal": "PRIMARY",
"source_channel": {
"id": "8ac2b2e8-0762-5g79-9gbd-4lca8400051e",
"resource_type": "channel"
},
"last_public_channel": {
"id": "a529y871-7gcc-4ity-5e3d-7ec51e4009f2",
"resource_type": "channel"
},
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. ATLAS

  2. Posted

Comments