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

# Listing instances

> Lists all instances created by the partner integrator

## Overview

Method used to list all created instances.

<Warning>
  To use Partner endpoints, provide the Partner Token in the **Authorization** field using the following format: `Bearer <Partner-Token>`

  It is not necessary to send the **Client-Token** in these requests.
</Warning>

***

## Attributes

### Query Parameters

<ParamField query="page" type="integer" required>
  Page to fetch
</ParamField>

<ParamField query="pageSize" type="integer" required>
  Number of results per page
</ParamField>

<ParamField query="query" type="string">
  Search by instance name and ID
</ParamField>

<ParamField query="middleware" type="string">
  Instance type: `web` or `mobile`
</ParamField>

***

## Request Examples

### List by instance name or ID

```bash theme={"theme":{"light":"github-light","dark":"poimandres"}}
https://api.z-api.io/instances?page=1&pageSize=15&query=NAME_OR_INSTANCEID
```

### List by type (web or mobile)

```bash theme={"theme":{"light":"github-light","dark":"poimandres"}}
https://api.z-api.io/instances?page=1&pageSize=15&middleware=web
```

### List by type (web or mobile) + instance name or ID

```bash theme={"theme":{"light":"github-light","dark":"poimandres"}}
https://api.z-api.io/instances?page=1&pageSize=15&middleware=web&query=NAME_OR_INSTANCEID
```

## Response

### 200

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "total": 1,
  "totalPage": 1,
  "pageSize": 1,
  "page": 1,
  "content": [
    {
      "token": "",
      "tenant": "",
      "created": "",
      "due": 1648565999675,
      "paymentStatus": "",
      "deliveryCallbackUrl": "",
      "phoneConnected": false,
      "whatsappConnected": false,
      "middleware": "web",
      "name": "",
      "id": ""
    }
  ]
}
```

### 405

Make sure you are correctly sending the method specification, that is, verify that you sent POST or GET as specified at the beginning of this topic.

### 415

If you receive a 415 error, make sure to add the "Content-Type" header to your request, which in most cases is "application/json".
