Docs menu

List a contact's chats

GET/v1/contacts/{address}/conversations

  • Scope messages:read

The person's chats on the team's lines, each with the line, unread count and newest message.

Parameters

Path

  • addressstringrequired

    The person's phone number or email, URL-encoded (%2B14155550142). Any common phone format works.

Response

200 OKChats.

  • object"list"required

  • dataarray of Conversationrequired

    Fields of data
    • idstringrequired

      cht_…

    • object"chat"required

    • profile_idstringrequired

      prf_…

    • handlestringrequired

      The other side: a phone number (+1…), an email, or a group chat id.

    • kind"dm" | "group"required

    • titlestring or nullrequired

      The chat's own name (group chats).

    • contactChatContact or nullrequired

      What the team calls the person (contacts), or null when nobody named them.

      Fields of contact
      • namestring or nullrequired

      • tagsarray of stringrequired

    • last_message_attimestamp or nullrequired

    • assigned_to"agent" | "human" or nullrequired

      Who handles the chat; a flag your agent can read and set.

    • last_read_attimestamp or nullrequired

    • created_attimestamprequired

    • unread_countintegerrequired

    • last_messageMessage or nullrequired

      A message sent or received on a line.

      Fields of last_message
      • idstringrequired

        msg_…

      • object"message"required

      • profile_idstringrequired

        prf_…

      • chat_idstringrequired

        cht_…

      • chat_handlestring

        The chat's address: a phone number, email or group chat id.

      • direction"inbound" | "outbound"required

      • senderstring or nullrequired

        Who sent an inbound message (in group chats, one of the members).

      • textstring or nullrequired

      • attachmentsarray of Attachmentrequired

      • servicestring or nullrequired

        How it went or came: iMessage, RCS or SMS. Null until known.

      • requested_servicestring or nullrequired

        The service the send asked for, if any.

      • fallback_fromstring or nullrequired

        Set when the message failed over: the service it started on (iMessage).

      • reactionsarray of Reactionrequired

      • status"queued" | "dispatched" | "sent" | "delivered" | "read" | "failed" | "unconfirmed" | "received"required

        queued → dispatched → sent → delivered → read (iMessage only), or failed / unconfirmed. Inbound messages are received.

      • errorobject or nullrequired

        Why a message failed: line_unavailable, recipient_not_allowed, sending_paused, unconfirmed or send_failed.

      • guidstring or nullrequired

        The message's id in Messages, once it has one.

      • created_attimestamprequired

      • sent_attimestamp or nullrequired

      • delivered_attimestamp or nullrequired

      • read_attimestamp or nullrequired

      • queue_untiltimestamp or nullrequired

        While queued: when the send gives up if the line is still unavailable.

    • lineobjectrequired

      Fields of line
      • idstringrequired

      • labelstring or nullrequired

      • phone_numberstring or nullrequired

Errors

StatusCodeMeans
400validation_failedA field is missing or invalid.
401unauthorizedThe API key is missing, unknown or revoked.
403insufficient_scopeThe API key lacks the scope this needs.
404not_foundNo such object, or the key can't see it.

Every error is { "error": { "code", "message" } }. All error codes.

Keys come with your first line.

Request an invite and we'll set up a line for your team. API access is part of every plan.

Request an invite