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

# List Pending Invitations in Your Shilo Organization

> Retrieve a paginated list of pending invitations in your Shilo organization. Supports cursor-based pagination and ascending or descending sort order.

Use this endpoint to fetch all pending invitations in your Shilo organization. This is useful for auditing who has been invited but hasn't yet accepted, or for building dashboards that surface outstanding onboarding actions for your team administrators.

## Endpoint

```
GET https://api.shilo.ai/api/v1/invitations
```

## Authentication

Include your API key in the request header:

```
x-api-key: YOUR_API_KEY
```

## Query Parameters

<ParamField query="limit" type="number" default="50">
  Maximum number of results to return per page. Maximum value is `100`.
</ParamField>

<ParamField query="cursor" type="string">
  Pagination cursor returned from a previous response's `pagination.next_cursor`. Omit to start from the beginning of the list.
</ParamField>

<ParamField query="sort" type="string" default="asc">
  Sort order for results by creation date. Accepted values: `asc`, `desc`.
</ParamField>

## Response

### 200 — Success

Returns an `InvitationsResponseDto` object containing a `data` array of Invitation objects and a `pagination` block.

<ResponseField name="data" type="array">
  Array of pending Invitation objects.

  <Expandable title="Invitation object">
    <ResponseField name="id" type="string">
      Unique identifier for the invitation (UUID).
    </ResponseField>

    <ResponseField name="email" type="string">
      Email address the invitation was sent to.
    </ResponseField>

    <ResponseField name="status" type="string">
      Current status of the invitation. Will be `pending` for all results returned by this endpoint.
    </ResponseField>

    <ResponseField name="created_date" type="string">
      ISO-8601 timestamp of when the invitation was created.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination metadata for iterating through large result sets.

  <Expandable title="pagination object">
    <ResponseField name="has_more" type="boolean">
      Whether additional pages of results exist beyond the current page.
    </ResponseField>

    <ResponseField name="next_cursor" type="string | null">
      Cursor to pass as the `cursor` query parameter to retrieve the next page. `null` when `has_more` is `false`.
    </ResponseField>
  </Expandable>
</ResponseField>

### 401 — Unauthorized

Your API key is missing or invalid. Ensure the `x-api-key` header is present and correct.

## Example Request

```bash theme={null}
curl --request GET \
  --url "https://api.shilo.ai/api/v1/invitations?limit=50&sort=asc" \
  --header "x-api-key: YOUR_API_KEY"
```

## Example Response

```json theme={null}
{
  "data": [
    {
      "id": "ee6f2136-b94a-4438-9335-3acf5b2a0d31",
      "email": "newagent@example.com",
      "status": "pending",
      "created_date": "2030-09-24T12:34:56Z"
    }
  ],
  "pagination": {
    "has_more": false,
    "next_cursor": null
  }
}
```
