# List pending invitations

`GET /v1/orgs/{org_id}/invitations`

Requires role admin or higher.

## Authentication

A session token: `Authorization: Bearer <session token>`, or the session cookie in the browser. Requires role `admin` or higher.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `cursor` | query | string | no |  |
| `limit` | query | integer | no |  |
| `org_id` | path | string | yes |  |

## Responses

### 200

Pending invitations, oldest first.

`application/json`

```json
{
  "additionalProperties": false,
  "description": "Pending invitations, oldest first.",
  "properties": {
    "data": {
      "items": {
        "additionalProperties": false,
        "description": "A pending invitation.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "pattern": "^inv_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "type": "string"
          },
          "invited_by": {
            "anyOf": [
              {
                "pattern": "^usr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "org_id": {
            "pattern": "^org_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "type": "string"
          },
          "role": {
            "anyOf": [
              {
                "enum": [
                  "admin"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "member"
                ],
                "type": "string"
              }
            ]
          }
        },
        "required": [
          "id",
          "org_id",
          "email",
          "role",
          "invited_by",
          "expires_at",
          "created_at"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "data",
    "next_cursor"
  ],
  "type": "object"
}
```

### 401

unauthorized: no valid session, or the email is not verified.

Problem type: [unauthorized](https://docs.dlogify.com/errors/unauthorized.md).

### 403

forbidden: the action requires the admin role.

Problem type: [forbidden](https://docs.dlogify.com/errors/forbidden.md).

### 404

not-found: the resource does not exist, or the caller is not a member of its organization.

Problem type: [not-found](https://docs.dlogify.com/errors/not-found.md).

### 422

validation-failed: the request does not match the schema.

Problem type: [validation-failed](https://docs.dlogify.com/errors/validation-failed.md).

### 429

rate-limited: per-user management request limit.

Problem type: [rate-limited](https://docs.dlogify.com/errors/rate-limited.md).

## Example

```bash
curl -X GET "https://api.dlogify.com/v1/orgs/{org_id}/invitations" \
  -H "Authorization: Bearer $DLOGIFY_SESSION"
```

Source: https://docs.dlogify.com/api/invitations/listInvitations
