---
title: "ListOrganizations"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: EZGH Cloud organizations and IAM › organizations

`GET /v1/organizations`

## Authentication

Requires one of the following:

- `apiKey`, http, header `Authorization`
- `sessionCookie`, apiKey, in cookie
- `oauth`, http, header `Authorization`

## Query parameters

- `ListOrganizations.query.limit` (string, optional)
  - pattern `^[+-]?\d*\.?\d+(?:[Ee][+-]?\d+)?$`
- `ListOrganizations.query.cursor` (string, optional)

## Code samples

### cURL

```curl
curl --request GET \
  --url https://orgs.ezghcloud.com/v1/organizations \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://orgs.ezghcloud.com/v1/organizations';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://orgs.ezghcloud.com/v1/organizations"

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

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

print(response.text)
```

## Responses

### 200

Success

#### Example

```json
{
  "organizations": [
    {
      "id": "string",
      "name": "string",
      "slug": "string",
      "resourceName": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "isRoot": true
    }
  ],
  "nextCursor": "string"
}
```

- `ListOrganizations.response.200.organizations` (array<object>, required)
  - `ListOrganizations.response.200.organizations.id` (string, required)
  - `ListOrganizations.response.200.organizations.name` (string, required)
  - `ListOrganizations.response.200.organizations.slug` (string, required)
  - `ListOrganizations.response.200.organizations.resourceName` (string, required)
  - `ListOrganizations.response.200.organizations.createdAt` (string, required)
  - `ListOrganizations.response.200.organizations.updatedAt` (string, required)
  - `ListOrganizations.response.200.organizations.isRoot` (boolean, required)
- `ListOrganizations.response.200.nextCursor` (any of, required)
  - any of: `string`, `null`

### 400

InvalidCursor | InvalidRequest

#### Example

```json
{
  "error": {
    "code": "invalid_cursor",
    "message": "string"
  }
}
```

Any of:

- [InvalidCursorEncoded](/orgs-api/schemas/InvalidCursorEncoded/)
- [InvalidRequestEncoded](/orgs-api/schemas/InvalidRequestEncoded/)

### 401

Unauthenticated

#### Example

```json
{
  "error": {
    "code": "unauthenticated",
    "message": "string"
  }
}
```

- `ListOrganizations.response.401.error` (object, required)
  - `ListOrganizations.response.401.error.code` (string, required)
    - one of `"unauthenticated"`
  - `ListOrganizations.response.401.error.message` (string, required)

### 403

AccessDenied | ForbiddenOrigin

#### Example

```json
{
  "error": {
    "code": "access_denied",
    "message": "string"
  }
}
```

Any of:

- [AccessDeniedEncoded](/orgs-api/schemas/AccessDeniedEncoded/)
- [ForbiddenOriginEncoded](/orgs-api/schemas/ForbiddenOriginEncoded/)

### 404

NotFound

#### Example

```json
{
  "error": {
    "code": "not_found",
    "message": "string"
  }
}
```

- `ListOrganizations.response.404.error` (object, required)
  - `ListOrganizations.response.404.error.code` (string, required)
    - one of `"not_found"`
  - `ListOrganizations.response.404.error.message` (string, required)

### 429

TooManyRequests

#### Example

```json
{
  "error": {
    "code": "too_many_requests",
    "message": "string"
  }
}
```

- `ListOrganizations.response.429.error` (object, required)
  - `ListOrganizations.response.429.error.code` (string, required)
    - one of `"too_many_requests"`
  - `ListOrganizations.response.429.error.message` (string, required)

### 500

InternalError

#### Example

```json
{
  "error": {
    "code": "internal_error",
    "message": "string"
  }
}
```

- `ListOrganizations.response.500.error` (object, required)
  - `ListOrganizations.response.500.error.code` (string, required)
    - one of `"internal_error"`
  - `ListOrganizations.response.500.error.message` (string, required)

### 503

Unavailable

#### Example

```json
{
  "error": {
    "code": "unavailable",
    "message": "string"
  }
}
```

- `ListOrganizations.response.503.error` (object, required)
  - `ListOrganizations.response.503.error.code` (string, required)
    - one of `"unavailable"`
  - `ListOrganizations.response.503.error.message` (string, required)


Source: https://docs.ezghcloud.com/orgs-api/organizations/ListOrganizations/index.md
