---
title: "List user invitations"
description: "Get all pending invitations for the authenticated user"
---

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

Path: Test And Accept API › Invitations

`GET /invitations`

Get all pending invitations for the authenticated user

## Authentication

- `bearerAuth`, http, header `Authorization`, format `tnda_ token`

## Code samples

### cURL

```bash
curl --request GET \
  --url https://api.testandaccept.com/api/rest/invitations \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.testandaccept.com/api/rest/invitations';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.testandaccept.com/api/rest/invitations"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Successful response

#### Example

```json
{
  "invitations": [
    null
  ]
}
```

- `invitations` (`invitations-list.response.200.invitations`; array<unknown>, required)

### 400

Invalid input data

#### Example

```json
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
```

- `message` (`invitations-list.response.400.message`; string, required) — The error message
  - example `"Invalid input data"`
- `code` (`invitations-list.response.400.code`; string, required) — The error code
  - example `"BAD_REQUEST"`
- `issues` (`invitations-list.response.400.issues`; array<object>, optional) — An array of issues that were responsible for the error
  - example `[]`
  - `message` (`invitations-list.response.400.issues.message`; string, required)

### 401

Authorization not provided

#### Example

```json
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
```

- `message` (`invitations-list.response.401.message`; string, required) — The error message
  - example `"Authorization not provided"`
- `code` (`invitations-list.response.401.code`; string, required) — The error code
  - example `"UNAUTHORIZED"`
- `issues` (`invitations-list.response.401.issues`; array<object>, optional) — An array of issues that were responsible for the error
  - example `[]`
  - `message` (`invitations-list.response.401.issues.message`; string, required)

### 403

Insufficient access

#### Example

```json
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
```

- `message` (`invitations-list.response.403.message`; string, required) — The error message
  - example `"Insufficient access"`
- `code` (`invitations-list.response.403.code`; string, required) — The error code
  - example `"FORBIDDEN"`
- `issues` (`invitations-list.response.403.issues`; array<object>, optional) — An array of issues that were responsible for the error
  - example `[]`
  - `message` (`invitations-list.response.403.issues.message`; string, required)

### 404

Not found

#### Example

```json
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
```

- `message` (`invitations-list.response.404.message`; string, required) — The error message
  - example `"Not found"`
- `code` (`invitations-list.response.404.code`; string, required) — The error code
  - example `"NOT_FOUND"`
- `issues` (`invitations-list.response.404.issues`; array<object>, optional) — An array of issues that were responsible for the error
  - example `[]`
  - `message` (`invitations-list.response.404.issues.message`; string, required)

### 500

Internal server error

#### Example

```json
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}
```

- `message` (`invitations-list.response.500.message`; string, required) — The error message
  - example `"Internal server error"`
- `code` (`invitations-list.response.500.code`; string, required) — The error code
  - example `"INTERNAL_SERVER_ERROR"`
- `issues` (`invitations-list.response.500.issues`; array<object>, optional) — An array of issues that were responsible for the error
  - example `[]`
  - `message` (`invitations-list.response.500.issues.message`; string, required)


Source: https://docs.testandaccept.com/reference/invitations/list/index.md
