Get app's conversations

This method allows you to receive application conversations. We use this method in the "Inbox" section.

URL

GET https://api.dashly.app/v1/apps/{id}/conversations

Arguments

This method follows the general rules. Arguments are transmitted as GET or POST parameters.

Argument Description
auth_token Required. Authorization token (requires scope: conversations-read)
include_not_assigned Set true to get closed conversations, false to get only open ones. To get everything, ignore this argument.
closed Укажите true, чтобы получить закрытые диалоги, false - чтобы получить только открытые. Игнорируйте этот аргумент, чтобы получить все.
assigned Insert the administrator ID to get the conversations assigned only to him or null to get those not assigned to anyone. To get everything, ignore this argument. To get unsorted conversations, set 0 to assign parameter and true to include_not_assigned.
tags A list of tags (separated by commas). If specified, returns the conversations to which all these tags are assigned.
channel Set channel ID to get specified channel's conversations. Ignore to get all channels' conversations
after Pagination. The cursor to start with.
count Pagination. The maximum number of messages to be returned (from 1 to 50). Default: 20

Detail on pagination.

Answer

{
  "meta": {
    "status": 200,
    "next_after": 1454408108.30303
  },
  "data": [
    {
      "id": 9334799,
      "created": 1454392168,
      "user": {
        "id": 23939391,
        "user_id": "28231",
        "presence": "idle",
        "props": {
          "$name": "Maks",
          "$email": "maks@my-site.com",
          ...
        }
      },
      "channel": {
        "avatar": "",
        "droppable": true,
        "id": 5,
        "name": "Тестовый канал",
        "not_assigned_count": 0,
        "not_read_count": 0,
        "read_permission": null,
        "type": "manual"
      },
      "read": true,
      "replied": true,
      "clicked": false,
      "unsubscribed": false,
      "closed": false,
      "message": null,
      "type": "popup_chat",
      "reply_type": "text",
      "part_last": {
        "id": 10481096,
        "created": 1454412399,
        "conversation": 9334799,
        "body": "Hello! How are u?",
        "read": true,
        "type": "reply_admin",
        "sent_via": "app_desktop",
        "from": {
          "id": 24463,
          "name": "Dima",
          "avatar": "https://files.dashly.app/avatars/1446021235578-be57yp6v.jpg",
          "type": "admin"
        }
      },
      "parts_count": 22,
      "assignee": {
        "id": 24463,
        "name": "Dima",
        "avatar": "https://files.dashly.app/avatars/1446021235578-be57yp6v.jpg",
        "type": "admin"
      },
      "unread_parts_count": 0,
      "last_admin": {
        "id": 24463,
        "name": "Dima",
        "avatar": "https://files.dashly.app/avatars/1446021235578-be57yp6v.jpg",
        "type": "admin"
      },
      "last_update": 1454412399,
      "tags": []
    },
    ...
  ]
}

The answer will contain an array with Conversation objects.

Example

curl -X GET 'https://api.dashly.app/v1/apps/$self_app/conversations?auth_token=XXX'