# place.hud.listChats

> Every chat the person has, the one written in last first, a page at a time. Served only where HUD has a model to chat with, and, where the operator names the accounts the chat answers, to them alone: else MethodNotImplemented. Requires auth: the workspace's web session (its cookie) or a HUD access token as Bearer.

- Kind: query
- Authority: hud.place
- Lexicon: 1
- Published by [lexicons.hud.place](https://lexicon.garden/identity/did:plc:3tzbz4pml36u4mkresb6pdhv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.listChats)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.listChats/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.listChats/analytics)

## Query (`place.hud.listChats`)

Type: query · GET

### Parameters (query string)

- `cursor` (string): Where the last page ended, as its answer's cursor said.
  - Constraints: maxLength: 128
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 100, default: 50

### Output (application/json)

- `available` (boolean, required): Always true: listChats is served only where there is a model to chat with. Kept for clients that read it.
- `chats` (array, required)
  - `items` (ref)
    - Reference: `place.hud.chatDefs#chatSummary`
- `cursor` (string)
  - Constraints: maxLength: 128

### Errors

- `InvalidRequest`: The cursor is not one this method gave.
- `AuthRequired`: No live web session or HUD access token: sign in.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Every chat the person has, the one written in last first, a page at a time. Served only where HUD has a model to chat with, and, where the operator names the accounts the chat answers, to them alone: else MethodNotImplemented. Requires auth: the workspace's web session (its cookie) or a HUD access token as Bearer.",
      "errors": [
        {
          "description": "The cursor is not one this method gave.",
          "name": "InvalidRequest"
        },
        {
          "description": "No live web session or HUD access token: sign in.",
          "name": "AuthRequired"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "available": {
              "description": "Always true: listChats is served only where there is a model to chat with. Kept for clients that read it.",
              "type": "boolean"
            },
            "chats": {
              "items": {
                "ref": "place.hud.chatDefs#chatSummary",
                "type": "ref"
              },
              "type": "array"
            },
            "cursor": {
              "maxLength": 128,
              "type": "string"
            }
          },
          "required": [
            "chats",
            "available"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "description": "Where the last page ended, as its answer's cursor said.",
            "maxLength": 128,
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "The person's chats, the latest first.",
  "id": "place.hud.listChats",
  "lexicon": 1
}
```
