1MSG
ReferenceInbox API

Listar conversas

GET
/api/v1/inbox/conversations

As conversas com lastMessageAt mais recente vêm primeiro. Para a próxima página, envie pagination.nextCursor como cursor.

Authorization

bearer
headerAuthorizationBearer <token>

Chave gerada em Settings → Developer → API key. Os métodos do Inbox precisam do escopo Inbox. Os métodos de Campaigns precisam do escopo Campaigns.

Query Parameters

limit?number

Tamanho da página. Padrão 50.

cursor?string

pagination.nextCursor da página anterior (lastMessageAt em ISO).

channelId?string

Só um canal.

status?string

Status da conversa.

Value in"OPEN""CLOSED"
unread?boolean

true mantém só as conversas com mensagens não lidas.

tab?string

mine_open: abertas e atribuídas a esta chave. unassigned: abertas e sem responsável. all: sem filtro extra de aba.

Value in"mine_open""unassigned""all"
assigneeId?string

Só conversas atribuídas a este usuário.

Response Body

application/json
  1. 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  }}