> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.modex.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.modex.com/_mcp/server.

# List your clients

GET https://api.modex.com/v1/clients

Clients you own, ordered by ID. Cursor-paginated.

**Query parameters:** `limit`, `cursor` (see [Pagination](/getting-started#pagination)).

**Response fields** (`data[]`):

| Field | Type | Description |
|---|---|---|
| `id` | UUID | Client ID |
| `name` | string | Client name |
| `active` | boolean | Whether the client account is active |
| `max_users` | integer, nullable | Seat limit. `null` means unlimited. |
| `total_users` | integer | Users currently on the client. Pending invitations aren't counted. |

Saves the first client's ID to `client_id`.

Reference: https://docs.modex.com/api-reference/account/client-seats/list-clients

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `limit` (integer, optional) — Page size. Defaults to 25. Maximum is 100.
- `cursor` (string, optional) — Cursor from pagination.next_cursor on the previous page. Leave disabled for the first page.

## Response

### 200

OK

- `data` (list of V1ClientsGetResponsesContentApplicationJsonSchemaDataItems, optional) — The records on this page.
- `pagination` (V1ClientsGetResponsesContentApplicationJsonSchemaPagination, optional) — Cursor details for the next and previous pages. See Pagination in Getting started.

## Errors

### 403 Forbidden Error

Forbidden

- `error` (ApiErrorError, required)

## Types

### V1ClientsGetResponsesContentApplicationJsonSchemaDataItems

- `id` (string, optional) — Client ID
- `name` (string, optional) — Client name
- `active` (boolean, optional) — Whether the client account is active
- `max_users` (integer, optional) — Seat limit. `null` means unlimited.
- `total_users` (integer, optional) — Users currently on the client. Pending invitations aren't counted.

### V1ClientsGetResponsesContentApplicationJsonSchemaPagination

Cursor details for the next and previous pages. See Pagination in Getting started.

- `per_page` (integer, optional) — Page size used for this response.
- `next_cursor` (any, optional) — Pass as `cursor` to get the next page. `null` on the last page.
- `next_page_url` (any, optional) — Full URL of the next page. `null` on the last page.
- `prev_cursor` (any, optional) — Pass as `cursor` to get the previous page. `null` on the first page.
- `prev_page_url` (any, optional) — Full URL of the previous page. `null` on the first page.

### ApiErrorError

- `type` (string, required) — Error category: invalid_request, authentication_error, permission_error, not_found, rate_limit_error, or api_error.
- `code` (string, required) — Specific error code. Same as `type`, except `validation_error` for request-body validation failures.
- `message` (string, required) — Human-readable explanation.
- `details` (map from string to list of string, optional) — Validation errors only: each invalid field mapped to its messages.

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f",
      "name": "Northstar Lending Group",
      "active": true,
      "max_users": 10,
      "total_users": 3
    }
  ],
  "pagination": {
    "per_page": 25
  }
}
```

**SDK Code**

```python Clients
import requests

url = "https://api.modex.com/v1/clients"

querystring = {"cursor":"{{cursor}}","limit":"25"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Clients
const url = 'https://api.modex.com/v1/clients?cursor=%7B%7Bcursor%7D%7D&limit=25';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Clients
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.modex.com/v1/clients?cursor=%7B%7Bcursor%7D%7D&limit=25"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Clients
require 'uri'
require 'net/http'

url = URI("https://api.modex.com/v1/clients?cursor=%7B%7Bcursor%7D%7D&limit=25")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Clients
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.modex.com/v1/clients?cursor=%7B%7Bcursor%7D%7D&limit=25")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Clients
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.modex.com/v1/clients?cursor=%7B%7Bcursor%7D%7D&limit=25', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Clients
using RestSharp;

var client = new RestClient("https://api.modex.com/v1/clients?cursor=%7B%7Bcursor%7D%7D&limit=25");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Clients
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modex.com/v1/clients?cursor=%7B%7Bcursor%7D%7D&limit=25")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```