---
updatedAt: 2026-04-29T12:32:37.000Z
agentTools:
  projectIndex: https://developers.octadesk.com/llms.txt
---

# /chat

Retrives all chats or filter using a search criteria

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/chat": {
      "get": {
        "operationId": "getChatByFilter",
        "description": "Retrives all chats or filter using a search criteria",
        "parameters": [
          {
            "name": "octa-agent-email",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "required": false,
            "in": "query",
            "style": "deepObject",
            "explode": true,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/Filters",
                "type": "object"
              },
              "type": "array"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Number of the page",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Limit of items per page. MAX = 100, MIN = 1",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "style": "deepObject",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Sort",
              "type": "object"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChatList"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Chat"
        ],
        "security": [
          {
            "api-key": []
          }
        ],
        "summary": "/chat"
      }
    }
  },
  "info": {
    "title": "Octadesk API",
    "description": "Entrypoint of Public API",
    "version": "1.0",
    "contact": {
      "name": "OctadeskTech",
      "url": "https://octadesk.com",
      "email": "suporte@octadesk.com"
    }
  },
  "servers": [
    {
      "url": "{api-url}",
      "description": "",
      "variables": {
        "api-url": {
          "default": "TESTE_PLATFORM2"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "api-key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    },
    "schemas": {
      "Filters": {
        "type": "object",
        "properties": {
          "property": {
            "type": "string",
            "description": "Name of the property",
            "example": "name"
          },
          "operator": {
            "type": "string",
            "description": "Comparison operator",
            "example": "eq",
            "enum": [
              "eq",
              "ne",
              "lt",
              "gt",
              "le",
              "ge",
              "in",
              "nin"
            ]
          },
          "value": {
            "description": "Name of the property",
            "example": "Jane Doe",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ]
          }
        },
        "required": [
          "property",
          "operator",
          "value"
        ]
      },
      "PhoneContacts": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "description": "Phone Number that will receive the message",
            "example": "119999999999"
          },
          "countryCode": {
            "type": "string",
            "description": "Country code",
            "example": "55"
          }
        },
        "required": [
          "number"
        ]
      },
      "CustomFields": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Key of the field"
          },
          "value": {
            "description": "Value of the field",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ]
          }
        },
        "required": [
          "key",
          "value"
        ]
      },
      "Organization": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Organization ID"
          },
          "name": {
            "type": "string",
            "description": "Organization name"
          },
          "customField": {
            "description": "Organization custom fields",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomFields"
            }
          }
        },
        "required": [
          "id",
          "name",
          "customField"
        ]
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Person identifier"
          },
          "name": {
            "type": "string",
            "description": "Person name"
          },
          "email": {
            "type": "string",
            "description": "Person email"
          },
          "type": {
            "type": "string",
            "description": "Person type, if is an agent or a contact"
          },
          "phoneContacts": {
            "description": "Person phone number",
            "allOf": [
              {
                "$ref": "#/components/schemas/PhoneContacts"
              }
            ]
          },
          "customFields": {
            "description": "Custom fields",
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomFields"
              }
            ]
          },
          "organization": {
            "description": "This field refers to the organization to which the contact belongs",
            "allOf": [
              {
                "$ref": "#/components/schemas/Organization"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "email"
        ]
      },
      "ResponsibleDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the responsible",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Name of the responsible",
            "readOnly": true
          },
          "email": {
            "type": "string",
            "description": "Email of the responsible"
          }
        }
      },
      "ContactsPayload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Customer ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Customer name",
            "example": "Jane Doe"
          },
          "email": {
            "type": "string",
            "description": "Customer email",
            "example": "jane_doe@test.com"
          },
          "phoneContacts": {
            "description": "Phone info that will receive the message",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PhoneContacts"
            }
          },
          "customFields": {
            "description": "Fields to be used on the template (key / value)",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomFields"
            }
          },
          "organization": {
            "description": "This field refers to the organization to which the contact belongs",
            "allOf": [
              {
                "$ref": "#/components/schemas/Organization"
              }
            ]
          },
          "responsible": {
            "description": "Contact's responsible",
            "allOf": [
              {
                "$ref": "#/components/schemas/ResponsibleDTO"
              }
            ]
          }
        }
      },
      "Group": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Group ID"
          },
          "name": {
            "type": "string",
            "description": "Group name"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "Survey": {
        "type": "object",
        "properties": {
          "response": {
            "type": "string",
            "description": "Survey answer",
            "enum": [
              "satisfied",
              "unsatisfied",
              "not_answered",
              "not_sent"
            ]
          },
          "comment": {
            "type": "string",
            "description": "Survey comment"
          }
        },
        "required": [
          "response"
        ]
      },
      "Sort": {
        "type": "object",
        "properties": {
          "property": {
            "type": "string",
            "description": "Name of the property to sort",
            "example": "name"
          },
          "direction": {
            "type": "string",
            "description": "'asc' or 'desc' to order the result",
            "example": "asc",
            "enum": [
              "asc",
              "desc"
            ]
          }
        },
        "required": [
          "property",
          "direction"
        ]
      },
      "Woz": {
        "type": "object",
        "properties": {
          "assignedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when the WOZ virtual agent was assigned"
          },
          "virtualAgentId": {
            "type": "string",
            "description": "ID of the WOZ virtual agent"
          },
          "virtualAgentName": {
            "type": "string",
            "description": "Name of the WOZ virtual agent"
          },
          "chargeReason": {
            "type": "string",
            "description": "Reason why the WOZ virtual agent was charged for this conversation",
            "enum": [
              "CLIENT_REPLY_TIMEOUT",
              "WOZ_HANDLED_CONVERSATION",
              "AGENT_REPLIED_WOZ_CONVERSATION",
              "AGENT_CLOSED_CHAT",
              "WOZ_TRANSFERRED_CONVERSATION"
            ]
          }
        }
      },
      "Bot": {
        "type": "object",
        "properties": {
          "contactStartedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when the contact started the conversation"
          },
          "assignedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when the bot/flux was assigned"
          },
          "id": {
            "type": "string",
            "description": "ID of the bot/flux"
          },
          "name": {
            "type": "string",
            "description": "Name of the bot/flux"
          },
          "woz": {
            "description": "WOZ virtual agent data",
            "allOf": [
              {
                "$ref": "#/components/schemas/Woz"
              }
            ]
          },
          "transferredToHumanAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when the conversation was transferred to a human agent"
          },
          "firstHumanResponseAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp of the first human agent response"
          },
          "closedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when the conversation was closed"
          },
          "resolvedByBot": {
            "type": "boolean",
            "description": "Whether the conversation was resolved by the bot/WOZ without human transfer"
          }
        }
      },
      "ChatList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Your chat identification key"
          },
          "number": {
            "type": "string",
            "description": "The number to identify your chat through the application"
          },
          "channel": {
            "type": "string",
            "description": "Channel that the conversation occurred",
            "enum": [
              "whatsapp",
              "web",
              "facebook-messenger",
              "instagram",
              "email",
              "widget"
            ]
          },
          "contact": {
            "description": "Contact that started the conversation",
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactsPayload"
              }
            ]
          },
          "agent": {
            "description": "Agent who was assigned to conversation",
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "lastMessageDate": {
            "format": "date-time",
            "type": "string",
            "description": "Date of the last message that was send"
          },
          "status": {
            "type": "string",
            "description": "The status of the conversation",
            "enum": [
              "waiting",
              "talking",
              "closed",
              "missed",
              "started",
              "offline",
              "hidden"
            ]
          },
          "closedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Date the chat was closed"
          },
          "group": {
            "description": "Designated group for customer service",
            "allOf": [
              {
                "$ref": "#/components/schemas/Group"
              }
            ]
          },
          "tags": {
            "description": "The tags that are marked for this conversation",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "withBot": {
            "type": "boolean",
            "description": "If a bot was involved in this conversation"
          },
          "unreadMessages": {
            "type": "boolean",
            "description": "An attribute that indicates whether there are unanswered messages"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "The date the chat was created"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "The date the chat was last updated"
          },
          "origin": {
            "type": "string",
            "description": "Person who started the conversation",
            "enum": [
              "outbound",
              "inbound"
            ]
          },
          "botName": {
            "type": "string",
            "description": "Name of the bot that participated in the conversation"
          },
          "conversationOrigin": {
            "type": "string",
            "description": "Origin of the conversation"
          },
          "statusDetail": {
            "type": "string",
            "description": "The status detail",
            "enum": [
              "in-queue",
              "in-service",
              "abandoned",
              "closed-inactivity",
              "closed-timeout",
              "closed-by-operator",
              "closed-by-customer",
              "closed-by-Bot"
            ]
          },
          "agentFirstMessageDate": {
            "type": "string",
            "description": "Date of the first message sent by an agent"
          },
          "botAssignedDate": {
            "type": "string",
            "description": "Date when the bot assigned the chat"
          },
          "assignedToAgentDate": {
            "type": "string",
            "description": "Date when the chat was assigned to an agent"
          },
          "assignedToGroupDate": {
            "type": "string",
            "description": "Date when the chat was assigned to a group"
          },
          "survey": {
            "description": "The survey information",
            "allOf": [
              {
                "$ref": "#/components/schemas/Survey"
              }
            ]
          },
          "bot": {
            "description": "Bot journey data with timestamps for computing resolution and response time metrics",
            "allOf": [
              {
                "$ref": "#/components/schemas/Bot"
              }
            ]
          }
        },
        "required": [
          "id"
        ]
      }
    }
  }
}
```