> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuro-tech.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Pop messages

## Overview

Gets messages for the account from the server.

## HTTP request

`POST /Agent/Xmpp/PopMessages`

## Authentication

Requires a valid JWT bearer token.

## Request (JSON)

```json theme={null}
{
	"maxCount":Optional(Int(0 < PMaxCount <= 2147483647))
}
```

## Input parameters

| Parameter | Description                           |
| --------- | ------------------------------------- |
| PMaxCount | Maximum number of messages to return. |

## Response (JSON)

```json theme={null}
{
	"Messages":
	{
		"id": Optional(Str(PId)),
		"from": Required(Str(PFrom)),
		"to": Required(Str(PTo)),
		"lang": Optional(Str(PLanguage)),
		"type": Required(Str(PType)),
		"timestamp": Required(DateTime(PTimestamp)),
		"Content": Required(PContent[])
	}?[]
}
```

## Response parameters

| Parameter  | Description                                        |
| ---------- | -------------------------------------------------- |
| PId        | Optional ID associated with message.               |
| PFrom      | JID of entity sending the message.                 |
| PTo        | JID of recipient.                                  |
| PLanguage  | Optional language code associated with message.    |
| PType      | Type of message.                                   |
| PTimestamp | Date and time when message was received by server. |
| PContent   | Content of message.                                |

## Notes

This endpoint uses the request schema notation described in [Pattern matching](/neuron-api/pattern-matching).
