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/apps/{id}/conversations

Arguments

Auth parameters.
Pagination parameters. Pagination is performed by last conversation update time (field last_update) in descending order.
id_as_string parameter.
Parameters which include optional fields of Conversation object.
Optional fields part_last, important_part_last, reply_last, user are included by default

Parameter Type Description
closed Optional[boolean] If filter is set, returns only open (false) or only closed (true) conversations. If not - returns all conversations.
answered Optional[boolean] If filter is set, returns only conversations with operator's (true) or user's (false) last reply. If not - returns all conversations.
delayed Optional[boolean] If filter is set, return only delayed (true) or not delayed (false) conversations. If not - returns all conversations.
assigned Optional[ID / 0] Set operator ID to get conversations assigned to him. If not set, all conversations are returned. You can set 0 and include_not_assigned parameter set to true in order to get unassigned conversations.
tags Optional[Array[str]] Conversation tags filter. If set, only conversations with given tags are returned. If not - returns all conversations.
channel Optional[ID / 0] Channel filter. Set channel ID to get conversations in that channel. If not set - conversations with any channels are returned. Set 0 in order to return conversations without channel.
assistant_type Optional[string] If set, returns conversations managed by assistant. Assistant types: dialogflow, lead_bot, routing_bot, facebook_bot, telegram_bot, widget_bot.
include_no_tags Optional[boolean] Defaults to false. Set true to add conversations without tags to result.
include_not_assigned Optional[boolean] Defaults to false. Set true to add unassigned conversations to result.

Notes

Conversations are ordered by last update time (time of last reply in conversation) in descending order.
If assistant_type is not set conversations without user replies are not returned. Conversations managed by assistants will not be returned. If assistant_type is set, delayed, answered, assigned, tags, channel filters are ignored.

Answer

The answer will contain an array with Conversation objects.

Example:

{
  "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": "Test channel",
        "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": []
    },
    ...
  ]
}

Example

curl -X GET  -H "Authorization: Token XXX" "https://api.dashly.app/apps/$self_app/conversations"