# Invite requests from koi.dog, with what Clerk says of each.

> Every address that asked on koi.dog/invite/ (the koidog-site list) or was sent a Clerk invitation, newest first, each with its `state`: `requested`, `invited` (Clerk's invitation is pending), `accepted`, `revoked` or `expired`.
> https://koi.dog/docs/api/invitations/list-invite-requests/

`GET /api/v1/invites` · Scope: `approve`

Reads both sources on each call. An approval action, because inviting lets a person in. `409 not_configured` names each server variable that is missing; `502` (`clerk_error`, `invite_list_error`) passes on what Clerk or the list answered. Answers in one page. No path or query parameters.

## Response.

One page of a list: `data` holds the items (object); `nextCursor` and `hasMore` lead to the next page. The example has placeholder values.

## Request.

```sh
curl https://app.koi.dog/api/v1/invites \
    -H "Authorization: Bearer $KOIDOG_API_KEY"
```

```js
const res = await fetch("https://app.koi.dog/api/v1/invites", {
  headers: {
    Authorization: `Bearer ${process.env.KOIDOG_API_KEY}`,
  },
});
console.log(await res.json());
```

```python
import os

import requests

r = requests.get(
    "https://app.koi.dog/api/v1/invites",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "data": [],
  "nextCursor": "string",
  "hasMore": false
}
```
