# app.zeens.getMessages

> Published by [zeens.app](https://lexicon.garden/identity/did:plc:pwpuqwge6g7xrjmfbw73uycw)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:pwpuqwge6g7xrjmfbw73uycw/app.zeens.getMessages)
- [Documentation](https://lexicon.garden/lexicon/did:plc:pwpuqwge6g7xrjmfbw73uycw/app.zeens.getMessages/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:pwpuqwge6g7xrjmfbw73uycw/app.zeens.getMessages/examples)

## Definitions

### `app.zeens.getMessages`

**Type**: `query`

Return the message history for one conversation, newest-first, paginated. Each item's body is base64-obfuscated (not encrypted); Zeens decodes it. The viewer must be a participant.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `convoId` | `string` | Yes |  |
| `cursor` | `string` | No |  |
| `limit` | `integer` | No |  |
| `viewer` | `string` (did) | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No |  |
| `messages` | `array` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Return the message history for one conversation, newest-first, paginated. Each item's body is base64-obfuscated (not encrypted); Zeens decodes it. The viewer must be a participant.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "messages": {
              "items": {
                "properties": {
                  "body": {
                    "type": "string"
                  },
                  "convoId": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "recipient": {
                    "format": "did",
                    "type": "string"
                  },
                  "sender": {
                    "format": "did",
                    "type": "string"
                  },
                  "uri": {
                    "type": "string"
                  }
                },
                "required": [
                  "uri",
                  "sender",
                  "convoId",
                  "body",
                  "createdAt"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "messages"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "convoId": {
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "default": 36,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "viewer": {
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "viewer",
          "convoId"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "app.zeens.getMessages",
  "lexicon": 1
}
```
