ReferenceInbox API
Список диалогов
GET
Сначала диалоги с самым свежим lastMessageAt. Для следующей страницы передайте pagination.nextCursor в cursor.
bearerheader
AuthorizationBearer <token>Ключ выдаётся в Settings → Developer → API key. Методам Inbox нужен доступ Inbox, методам Campaigns — доступ Campaigns.
limit?numberРазмер страницы. По умолчанию 50.
cursor?stringpagination.nextCursor из предыдущей страницы (lastMessageAt в ISO).
channelId?stringТолько один канал.
status?stringСтатус диалога.
Value in
"OPEN""CLOSED"unread?booleantrue оставляет только диалоги с непрочитанными сообщениями.
tab?stringmine_open: открытые и назначенные на этот ключ. unassigned: открытые и ни на кого не назначенные. all: без дополнительного фильтра по вкладке.
Value in
"mine_open""unassigned""all"assigneeId?stringТолько диалоги, назначенные на этого пользователя.
application/json- response
data*array<>pagination*curl -X GET 'https://api.1msg.io/api/v1/inbox/conversations'{ "data": [ { "id": "string", "channelId": "string", "contactId": "string", "status": "OPEN", "assignedTo": "string", "assignedUser": { "id": "b2bb82f0-2253-4e05-b955-a21f3d699caa", "name": "QA Stage", "avatar": null }, "lastMessageAt": "2019-08-24T14:15:22Z", "isUnread": true, "tags": [ "string" ], "lastMessagePreview": "string", "lastMessageType": "string", "lastMessageDirection": "INBOUND", "lastMessageStatus": "string", "unreadCount": 0, "isBlocked": true, "title": "string", "lastCustomerMessageAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "contact": { "id": "string", "phoneNumber": "79001234567", "name": "string", "avatar": "string" }, "channelType": "WABA", "customerPhone": "string" } ], "pagination": { "hasMore": true, "nextCursor": "2019-08-24T14:15:22Z", "limit": 50 }}