v1

latestOpenAPI 3.0.02026-07-24378968.5 KB
Chat

/chat/{id}

Retrives information about a specific chat

get/chat/{id}

Path parameters

idstring required

Query parameters

pagenumber

Page to search

limitnumber

Limit of items to return, MIN = 1 and MAX = 100

propertystring required

Name of the property to sort

direction'asc' | 'desc' required

'asc' or 'desc' to order the result

Headers

octa-agent-emailstring

Response

idstring required

Your chat identification key

numberstring

The number to identify your chat through the application

createdAtstring date-time

The date that the chat was open

updatedAtstring date-time

The day that the chat was last updated

channel'whatsapp' | 'web' | 'facebook-messenger' | 'instagram' | 'email' | 'widget'

Channel that the conversation occurred

lastMessageDatestring date-time

Date of the last message that was send

firstMessageDatestring date-time

Date of the first message that was send

messagesCountnumber

Total number of messages exchanged

status'waiting' | 'talking' | 'closed' | 'missed' | 'started' | 'offline' | 'hidden'

The status of the conversation

waitingTimenumber

Waiting time on seconds

originstring

The origin of the beginning of the conversation

botNamestring

Name of the bot that participated in the conversation

conversationOriginstring

Origin of the conversation

windowExpiresAtstring date-time
withBotboolean

If a bot was involved in this conversation

unreadMessagesboolean

An attribute that indicates whether there are unanswered messages

customFieldsobject[]

Custom fields associated with the chat

pagenumber

Current page number

pagesnumber

Total number of pages for messages

Example response

{
  "contact": {
    "name": "Jane Doe",
    "email": "jane_doe@test.com",
    "phoneContacts": [
      {
        "number": "119999999999",
        "countryCode": "55"
      }
    ]
  },
  "pastAgents": [
    {
      "phoneContacts": {
        "number": "119999999999",
        "countryCode": "55"
      }
    }
  ],
  "agent": {
    "phoneContacts": {
      "number": "119999999999",
      "countryCode": "55"
    }
  },
  "messages": [
    {
      "sentBy": {
        "phoneContacts": {
          "number": "119999999999",
          "countryCode": "55"
        }
      },
      "mentions": [
        {
          "phoneContacts": {
            "number": "119999999999",
            "countryCode": "55"
          }
        }
      ]
    }
  ],
  "closed": {
    "closedBy": {
      "phoneContacts": {
        "number": "119999999999",
        "countryCode": "55"
      }
    }
  }
}