## List Organizations

`client.Organizations.List(ctx, query) (*PaginatedCursor[Organization], error)`

**get** `/api/v2/organizations`

List organizations the current user can access.

### Parameters

- `query OrganizationListParams`

  - `Name param.Field[string]`

  - `PageSize param.Field[int64]`

  - `PageToken param.Field[string]`

### Returns

- `type Organization struct{…}`

  API response schema for an organization.

  - `ID string`

    The organization's unique identifier.

  - `Name string`

    The organization's display name.

  - `CreatedAt Time`

    Creation datetime

  - `Metadata map[string, any]`

    Additional organization metadata.

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llamacloud-admin-go"
  "github.com/run-llama/llamacloud-admin-go/option"
)

func main() {
  client := llamacloudadmin.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Organizations.List(context.TODO(), llamacloudadmin.OrganizationListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### Response

```json
{
  "items": [
    {
      "id": "id",
      "name": "name",
      "created_at": "2019-12-27T18:11:19.117Z",
      "metadata": {
        "foo": "bar"
      },
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```
