> ## 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.

# Information query

> Sends an Information Query (iq) to an entity on the XMPP network, given its Full JID.

## Overview

Sends an Information Query (iq) to an entity on the XMPP network, given its Full JID. For connected entities, you need to have an presence subscription to that entity, approved by the entity, to get the Full JID. You get the Full JID using the Presence Probe resource.

## HTTP request

`POST /Agent/Xmpp/InformationQuery`

## Authentication

Requires a valid JWT bearer token.

## Request (JSON)

```json theme={null}
{
	"to":Required(Str(PTo)),
	"type":Required(Str(PType)),
	"xml":Required(Xml(PQuery))
}
```

## Input parameters

| Parameter | Description                                                             |
| --------- | ----------------------------------------------------------------------- |
| PTo       | Bare JID of contact to whom the presence probe is directed.             |
| PType     | Type of Information Query. Must be get or set.                          |
| PQuery    | Valid XML (or string-representation of valid XML) of the query to send. |

## Response (JSON)

```json theme={null}
{
	"ok": Required(Boolean(POk)),
	"errorCode": Optional(Int(PErrorCode)),
	"errorText": Optional(Str(PErrorText)),
	"errorType": Optional(Str(PErrorType)),
	"ErrorElement": Optional(PErrorElement),
	"Stanza": Optional(PStanza)
}
```

## Response parameters

| Parameter  | Description                                         |
| ---------- | --------------------------------------------------- |
| POk        | If query executed without error.                    |
| PErrorCode | Optional error code, in case an error was returned. |
| PErrorText | Optional error text, in case an error was returned. |
| PErrorType | Optional error type, in case an error was returned. |
| PContent   | Any XML content returned in the query result.       |

## Notes

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