## List invites

`client.Admin.Organization.Invites.List(ctx, query) (*ConversationCursorPage[Invite], error)`

**get** `/organization/invites`

Returns a list of invites in the organization.

### Parameters

- `query AdminOrganizationInviteListParams`

  - `After param.Field[string]`

    A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

  - `Limit param.Field[int64]`

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

### Returns

- `type Invite struct{…}`

  Represents an individual `invite` to the organization.

  - `ID string`

    The identifier, which can be referenced in API endpoints

  - `CreatedAt int64`

    The Unix timestamp (in seconds) of when the invite was sent.

    `format: unixtime`

  - `Email string`

    The email address of the individual to whom the invite was sent

  - `Object OrganizationInvite`

    The object type, which is always `organization.invite`

    - `const OrganizationInviteOrganizationInvite OrganizationInvite = "organization.invite"`

  - `Projects []InviteProject`

    The projects that were granted membership upon acceptance of the invite.

    - `ID string`

      Project's public ID

    - `Role string`

      Project membership role

      - `const InviteProjectRoleMember InviteProjectRole = "member"`

      - `const InviteProjectRoleOwner InviteProjectRole = "owner"`

  - `Role InviteRole`

    `owner` or `reader`

    - `const InviteRoleOwner InviteRole = "owner"`

    - `const InviteRoleReader InviteRole = "reader"`

  - `Status InviteStatus`

    `accepted`,`expired`, or `pending`

    - `const InviteStatusAccepted InviteStatus = "accepted"`

    - `const InviteStatusExpired InviteStatus = "expired"`

    - `const InviteStatusPending InviteStatus = "pending"`

  - `AcceptedAt int64`

    The Unix timestamp (in seconds) of when the invite was accepted.

    `format: unixtime`

  - `ExpiresAt int64`

    The Unix timestamp (in seconds) of when the invite expires.

    `format: unixtime`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAdminAPIKey("My Admin API Key"),
  )
  page, err := client.Admin.Organization.Invites.List(context.TODO(), openai.AdminOrganizationInviteListParams{

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

#### 200 — Example

```json
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "email": "email",
      "object": "organization.invite",
      "projects": [
        {
          "id": "id",
          "role": "member"
        }
      ],
      "role": "owner",
      "status": "accepted",
      "accepted_at": 0,
      "expires_at": 0
    }
  ],
  "has_more": true,
  "object": "list",
  "first_id": "first_id",
  "last_id": "last_id"
}
```
