---
title: "Invitations"
summary: "Invitation links bring people into a project or an organization. Endpoints, parameters, examples and errors."
url: "https://taskloader.com/docs/api/reference/invitations"
---

> Documentation index: https://taskloader.com/llms.txt

# Invitations

Invitation links bring people into a project or an organization. Endpoints, parameters, examples and errors.

Invitation links bring people into a project or an organization. The token and the link are returned once, when the invitation is made: keep them secret, and revoke links you no longer need. Accepting needs the `invitations:accept` scope, so an app cannot accept a pasted link unless the person allowed it.

## List organization invitations {#list_organization_invitations}

Lists the organization’s invitation links that can still be used, newest first.

```http
GET /api/v1/organizations/{organizationId}/invitations
```

- **Scopes:** `organizations:manage`
- **Who:** Organization admin or owner
- **[Project-limited credentials](https://taskloader.com/docs/authentication.md#project-limited-credentials):** refused with `credential_restricted`; use a credential with access to all projects
- **Retries:** a read; safe to repeat
- **Rate limit:** the `read` bucket
- **MCP tool:** `list_invitations`

Returns the links to the organization itself that are unused, unrevoked and unexpired, newest first (organization owner and admins). Links to its projects are listed per project. Tokens are never listed: a link is shown once, when it is created.

#### Parameters

| Name             | In    | Type           | Required | Description                                                                                                                                                           |
| ---------------- | ----- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `organizationId` | path  | id (`org_…`)   | Yes      | Organization id: org_ followed by 32 lowercase hex digits, for example org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718.                                                          |
| `limit`          | query | integer, 1–100 | No       | How many to return, 1–100, for example 50. Defaults to 50 (25 over MCP).                                                                                              |
| `cursor`         | query | string         | No       | The nextCursor from the previous page, to read the next one. Leave it out for the first page; start again without it when you change filters. Up to 2,048 characters. |

#### Response

`200` with a list of `Invitation` objects; while `hasMore` is true, pass `nextCursor` back as `cursor` (with the same filters) for the next page.

| Field        | Type                | Description                                                     |
| ------------ | ------------------- | --------------------------------------------------------------- |
| `object`     | `"list"`            |                                                                 |
| `hasMore`    | boolean             | True when there is a next page.                                 |
| `nextCursor` | string or null      | Pass it as cursor to read the next page; null on the last page. |
| `data`       | array of Invitation |                                                                 |

Headers it sends: `Link`.

#### Errors

| Status | Code                                                              | Meaning                                    |
| ------ | ----------------------------------------------------------------- | ------------------------------------------ |
| 400    | [`invalid_id`](https://taskloader.com/docs/api/errors.md#invalid_id)                       | The id is for a different kind of resource |
| 400    | [`invalid_cursor`](https://taskloader.com/docs/api/errors.md#invalid_cursor)               | The cursor is not valid                    |
| 403    | [`insufficient_scope`](https://taskloader.com/docs/api/errors.md#insufficient_scope)       | The credential lacks the required access   |
| 403    | [`credential_restricted`](https://taskloader.com/docs/api/errors.md#credential_restricted) | The credential is limited to some projects |
| 403    | [`forbidden_role`](https://taskloader.com/docs/api/errors.md#forbidden_role)               | Your role does not allow this              |
| 404    | [`not_found`](https://taskloader.com/docs/api/errors.md#not_found)                         | Not found                                  |

And the errors every operation can return: [`invalid_request`](https://taskloader.com/docs/api/errors.md#invalid_request), [`validation_failed`](https://taskloader.com/docs/api/errors.md#validation_failed), [`token_in_url`](https://taskloader.com/docs/api/errors.md#token_in_url), [`unauthenticated`](https://taskloader.com/docs/api/errors.md#unauthenticated), [`invalid_token`](https://taskloader.com/docs/api/errors.md#invalid_token), [`rate_limited`](https://taskloader.com/docs/api/errors.md#rate_limited), [`internal_error`](https://taskloader.com/docs/api/errors.md#internal_error), [`service_unavailable`](https://taskloader.com/docs/api/errors.md#service_unavailable).

#### Example

```curl
curl https://taskloader.com/api/v1/organizations/org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations \
  -H "Authorization: Bearer $TASKLOADER_API_KEY"
```

```js
const response = await fetch('https://taskloader.com/api/v1/organizations/org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations', {
  headers: {
    Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
  },
});
if (!response.ok) {
  const problem = await response.json();
  throw new Error(`${problem.code}: ${problem.detail}`);
}
const organizationInvitations = await response.json();
```

```python
import os

import requests

response = requests.get(
    "https://taskloader.com/api/v1/organizations/org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations",
    headers={
        "Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
    },
    timeout=30,
)
if not response.ok:
    problem = response.json()
    raise RuntimeError(f"{problem['code']}: {problem['detail']}")
organization_invitations = response.json()
```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
  "object": "list",
  "data": [
    {
      "object": "invitation",
      "id": "inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
      "target": "organization",
      "organizationId": "org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
      "projectId": null,
      "role": "member",
      "expiresAt": "2026-11-25T10:00:00.123Z",
      "createdAt": "2026-11-18T10:00:00.123Z",
      "createdBy": {
        "userId": "usr_kq3Xb1W9pZ0aLm7c",
        "name": "Ana Lima"
      }
    }
  ],
  "hasMore": false,
  "nextCursor": null
}
```

## Create an organization invitation {#create_organization_invitation}

Creates a single-use link that adds someone to the organization with a role.

```http
POST /api/v1/organizations/{organizationId}/invitations
```

- **Scopes:** `organizations:manage`
- **Who:** Organization admin or owner
- **[Project-limited credentials](https://taskloader.com/docs/authentication.md#project-limited-credentials):** refused with `credential_restricted`; use a credential with access to all projects
- **Retries:** send `Idempotency-Key` to make retries safe
- **Rate limit:** the `write` bucket, and the `invitation` daily cap (at most 100 in any 24 hours, at most 50 at once, per person)
- **MCP tool:** `invite_people`

Creates a link that adds whoever opens it to the organization, as a member (the default) or an admin. It works once and expires after seven days, and stops working if you stop being an owner or admin of the organization. `token` and `url` come only in this answer: a retry with the same `Idempotency-Key` answers without them (revoke that link and create another), and lists never show them. Share the link only with the person you mean to invite. At most 20 active links per organization (`too_many_invitations`) and 100 new invitations a day through the API and MCP (`daily_limit_reached`). Organization owner and admins.

#### Parameters

| Name              | In     | Type         | Required | Description                                                                                                                                                                                                                                                       |
| ----------------- | ------ | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `organizationId`  | path   | id (`org_…`) | Yes      | Organization id: org_ followed by 32 lowercase hex digits, for example org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718.                                                                                                                                                      |
| `Idempotency-Key` | header | string       | No       | Makes a retry safe: the same key with the same request within 24 hours returns the first answer (with `Idempotent-Replayed: true`) instead of acting twice. 1 to 255 printable ASCII characters; a UUID works well. Keys belong to the credential that sent them. |

#### Request body

A JSON object. Fields not listed are refused.

| Field  | Type                    | Required | Description                          |
| ------ | ----------------------- | -------- | ------------------------------------ |
| `role` | `"member"` or `"admin"` | No       | member or admin. Defaults to member. |

#### Response

`201` with the new `Invitation` object.

| Field            | Type                                                | Description                                                                                                                                                                                                                       |
| ---------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `object`         | `"invitation"`                                      |                                                                                                                                                                                                                                   |
| `id`             | id (`inv_…`)                                        | Invitation id: inv_ followed by 32 lowercase hex digits, for example inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718.                                                                                                                        |
| `target`         | `"project"` or `"organization"`                     | project: the person joins that project only; organization: the organization.                                                                                                                                                      |
| `organizationId` | id (`org_…`)                                        | Organization id: org_ followed by 32 lowercase hex digits, for example org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718.                                                                                                                      |
| `projectId`      | id (`prj_…`) or null                                |                                                                                                                                                                                                                                   |
| `role`           | `"viewer"` or `"editor"` or `"admin"` or `"member"` | The role the person gets: viewer, editor or admin in a project; member or admin in an organization.                                                                                                                               |
| `expiresAt`      | string (date-time)                                  | Seven days after it was created.                                                                                                                                                                                                  |
| `createdAt`      | string (date-time)                                  | RFC 3339 UTC with milliseconds, for example 2026-11-18T10:00:00.123Z.                                                                                                                                                             |
| `createdBy`      | object                                              |                                                                                                                                                                                                                                   |
| `token`          | string                                              | The secret part of the link. Returned once, by the call that creates the invitation (a retry with the same Idempotency-Key answers without it); Taskloader keeps only its hash. Share it only with the person you mean to invite. |
| `url`            | string                                              | The link to send (…/join#\<token>). Returned once, with token. Anyone with it can join with role until it is used, revoked or expires.                                                                                            |

Headers it sends: `Idempotent-Replayed`.

#### Errors

| Status | Code                                                                          | Meaning                                          |
| ------ | ----------------------------------------------------------------------------- | ------------------------------------------------ |
| 400    | [`invalid_id`](https://taskloader.com/docs/api/errors.md#invalid_id)                                   | The id is for a different kind of resource       |
| 400    | [`invalid_idempotency_key`](https://taskloader.com/docs/api/errors.md#invalid_idempotency_key)         | The Idempotency-Key header is not valid          |
| 403    | [`insufficient_scope`](https://taskloader.com/docs/api/errors.md#insufficient_scope)                   | The credential lacks the required access         |
| 403    | [`credential_restricted`](https://taskloader.com/docs/api/errors.md#credential_restricted)             | The credential is limited to some projects       |
| 403    | [`forbidden_role`](https://taskloader.com/docs/api/errors.md#forbidden_role)                           | Your role does not allow this                    |
| 404    | [`not_found`](https://taskloader.com/docs/api/errors.md#not_found)                                     | Not found                                        |
| 409    | [`idempotency_key_in_progress`](https://taskloader.com/docs/api/errors.md#idempotency_key_in_progress) | The original request is still running            |
| 413    | [`payload_too_large`](https://taskloader.com/docs/api/errors.md#payload_too_large)                     | The request body is too large                    |
| 415    | [`unsupported_media_type`](https://taskloader.com/docs/api/errors.md#unsupported_media_type)           | Unsupported media type                           |
| 422    | [`idempotency_key_reused`](https://taskloader.com/docs/api/errors.md#idempotency_key_reused)           | The Idempotency-Key was used for another request |
| 429    | [`too_many_invitations`](https://taskloader.com/docs/api/errors.md#too_many_invitations)               | Too many active invitations                      |
| 429    | [`daily_limit_reached`](https://taskloader.com/docs/api/errors.md#daily_limit_reached)                 | Daily limit reached                              |

And the errors every operation can return: [`invalid_request`](https://taskloader.com/docs/api/errors.md#invalid_request), [`validation_failed`](https://taskloader.com/docs/api/errors.md#validation_failed), [`token_in_url`](https://taskloader.com/docs/api/errors.md#token_in_url), [`unauthenticated`](https://taskloader.com/docs/api/errors.md#unauthenticated), [`invalid_token`](https://taskloader.com/docs/api/errors.md#invalid_token), [`rate_limited`](https://taskloader.com/docs/api/errors.md#rate_limited), [`internal_error`](https://taskloader.com/docs/api/errors.md#internal_error), [`service_unavailable`](https://taskloader.com/docs/api/errors.md#service_unavailable).

#### Example

```curl
curl https://taskloader.com/api/v1/organizations/org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations \
  -H "Authorization: Bearer $TASKLOADER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"role":"member"}'
```

```js
const response = await fetch('https://taskloader.com/api/v1/organizations/org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({ role: 'member' }),
});
if (!response.ok) {
  const problem = await response.json();
  throw new Error(`${problem.code}: ${problem.detail}`);
}
const organizationInvitation = await response.json();
```

```python
import os
import uuid

import requests

response = requests.post(
    "https://taskloader.com/api/v1/organizations/org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations",
    headers={
        "Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
        "Content-Type": "application/json",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={"role": "member"},
    timeout=30,
)
if not response.ok:
    problem = response.json()
    raise RuntimeError(f"{problem['code']}: {problem['detail']}")
organization_invitation = response.json()
```

```http
HTTP/1.1 201 Created
Content-Type: application/json

{
  "object": "invitation",
  "id": "inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
  "target": "organization",
  "organizationId": "org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
  "projectId": null,
  "role": "member",
  "expiresAt": "2026-11-25T10:00:00.123Z",
  "createdAt": "2026-11-18T10:00:00.123Z",
  "createdBy": {
    "userId": "usr_kq3Xb1W9pZ0aLm7c",
    "name": "Ana Lima"
  },
  "token": "3f9c2b7a1e4d8c6b5a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b",
  "url": "https://taskloader.com/join#3f9c2b7a1e4d8c6b5a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b"
}
```

## Revoke an organization invitation {#revoke_organization_invitation}

Stops an unused organization invitation link from working.

```http
DELETE /api/v1/organizations/{organizationId}/invitations/{invitationId}
```

- **Scopes:** `organizations:manage`
- **Who:** Organization admin or owner
- **[Project-limited credentials](https://taskloader.com/docs/authentication.md#project-limited-credentials):** refused with `credential_restricted`; use a credential with access to all projects
- **Retries:** naturally idempotent: repeating it changes nothing more
- **Rate limit:** the `write` bucket
- **MCP tool:** `revoke_invitation`

Revokes an unused link to the organization (owner and admins). Revoking one that is already revoked succeeds again. One that was already used is `409 invitation_used`: the person it let in stays, so remove them instead (`remove_organization_member`).

#### Parameters

| Name             | In   | Type         | Required | Description                                                                                                  |
| ---------------- | ---- | ------------ | -------- | ------------------------------------------------------------------------------------------------------------ |
| `organizationId` | path | id (`org_…`) | Yes      | Organization id: org_ followed by 32 lowercase hex digits, for example org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
| `invitationId`   | path | id (`inv_…`) | Yes      | Invitation id: inv_ followed by 32 lowercase hex digits, for example inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718.   |

#### Response

`200` with an `invitation` object.

| Field     | Type           | Description                                                                                                |
| --------- | -------------- | ---------------------------------------------------------------------------------------------------------- |
| `object`  | `"invitation"` |                                                                                                            |
| `id`      | id (`inv_…`)   | Invitation id: inv_ followed by 32 lowercase hex digits, for example inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
| `revoked` | `true`         |                                                                                                            |

#### Errors

| Status | Code                                                                  | Meaning                                    |
| ------ | --------------------------------------------------------------------- | ------------------------------------------ |
| 400    | [`invalid_id`](https://taskloader.com/docs/api/errors.md#invalid_id)                           | The id is for a different kind of resource |
| 400    | [`invalid_idempotency_key`](https://taskloader.com/docs/api/errors.md#invalid_idempotency_key) | The Idempotency-Key header is not valid    |
| 403    | [`insufficient_scope`](https://taskloader.com/docs/api/errors.md#insufficient_scope)           | The credential lacks the required access   |
| 403    | [`credential_restricted`](https://taskloader.com/docs/api/errors.md#credential_restricted)     | The credential is limited to some projects |
| 403    | [`forbidden_role`](https://taskloader.com/docs/api/errors.md#forbidden_role)                   | Your role does not allow this              |
| 404    | [`not_found`](https://taskloader.com/docs/api/errors.md#not_found)                             | Not found                                  |
| 409    | [`invitation_used`](https://taskloader.com/docs/api/errors.md#invitation_used)                 | The invitation was already used            |
| 413    | [`payload_too_large`](https://taskloader.com/docs/api/errors.md#payload_too_large)             | The request body is too large              |
| 415    | [`unsupported_media_type`](https://taskloader.com/docs/api/errors.md#unsupported_media_type)   | Unsupported media type                     |

And the errors every operation can return: [`invalid_request`](https://taskloader.com/docs/api/errors.md#invalid_request), [`validation_failed`](https://taskloader.com/docs/api/errors.md#validation_failed), [`token_in_url`](https://taskloader.com/docs/api/errors.md#token_in_url), [`unauthenticated`](https://taskloader.com/docs/api/errors.md#unauthenticated), [`invalid_token`](https://taskloader.com/docs/api/errors.md#invalid_token), [`rate_limited`](https://taskloader.com/docs/api/errors.md#rate_limited), [`internal_error`](https://taskloader.com/docs/api/errors.md#internal_error), [`service_unavailable`](https://taskloader.com/docs/api/errors.md#service_unavailable).

#### Example

```curl
curl -X DELETE https://taskloader.com/api/v1/organizations/org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations/inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718 \
  -H "Authorization: Bearer $TASKLOADER_API_KEY"
```

```js
const response = await fetch('https://taskloader.com/api/v1/organizations/org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations/inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
  },
});
if (!response.ok) {
  const problem = await response.json();
  throw new Error(`${problem.code}: ${problem.detail}`);
}
const organizationInvitation = await response.json();
```

```python
import os

import requests

response = requests.delete(
    "https://taskloader.com/api/v1/organizations/org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations/inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
    headers={
        "Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
    },
    timeout=30,
)
if not response.ok:
    problem = response.json()
    raise RuntimeError(f"{problem['code']}: {problem['detail']}")
organization_invitation = response.json()
```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
  "object": "invitation",
  "id": "inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
  "revoked": true
}
```

## List project invitations {#list_project_invitations}

Lists the project’s invitation links that can still be used, newest first.

```http
GET /api/v1/projects/{projectId}/invitations
```

- **Scopes:** `people:manage`
- **Who:** Admin or owner in the project
- **[Project-limited credentials](https://taskloader.com/docs/authentication.md#project-limited-credentials):** allowed inside the credential’s projects; anything else is `not_found`
- **Retries:** a read; safe to repeat
- **Rate limit:** the `read` bucket
- **MCP tool:** `list_invitations`

Returns the project’s links that are unused, unrevoked and unexpired, newest first (project owner and admins). Tokens are never listed: a link is shown once, when it is created.

#### Parameters

| Name        | In    | Type           | Required | Description                                                                                                                                                           |
| ----------- | ----- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `projectId` | path  | id (`prj_…`)   | Yes      | Project id: prj_ followed by 32 lowercase hex digits, for example prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718.                                                               |
| `limit`     | query | integer, 1–100 | No       | How many to return, 1–100, for example 50. Defaults to 50 (25 over MCP).                                                                                              |
| `cursor`    | query | string         | No       | The nextCursor from the previous page, to read the next one. Leave it out for the first page; start again without it when you change filters. Up to 2,048 characters. |

#### Response

`200` with a list of `Invitation` objects; while `hasMore` is true, pass `nextCursor` back as `cursor` (with the same filters) for the next page.

| Field        | Type                | Description                                                     |
| ------------ | ------------------- | --------------------------------------------------------------- |
| `object`     | `"list"`            |                                                                 |
| `hasMore`    | boolean             | True when there is a next page.                                 |
| `nextCursor` | string or null      | Pass it as cursor to read the next page; null on the last page. |
| `data`       | array of Invitation |                                                                 |

Headers it sends: `Link`.

#### Errors

| Status | Code                                                        | Meaning                                    |
| ------ | ----------------------------------------------------------- | ------------------------------------------ |
| 400    | [`invalid_id`](https://taskloader.com/docs/api/errors.md#invalid_id)                 | The id is for a different kind of resource |
| 400    | [`invalid_cursor`](https://taskloader.com/docs/api/errors.md#invalid_cursor)         | The cursor is not valid                    |
| 403    | [`insufficient_scope`](https://taskloader.com/docs/api/errors.md#insufficient_scope) | The credential lacks the required access   |
| 403    | [`forbidden_role`](https://taskloader.com/docs/api/errors.md#forbidden_role)         | Your role does not allow this              |
| 404    | [`not_found`](https://taskloader.com/docs/api/errors.md#not_found)                   | Not found                                  |

And the errors every operation can return: [`invalid_request`](https://taskloader.com/docs/api/errors.md#invalid_request), [`validation_failed`](https://taskloader.com/docs/api/errors.md#validation_failed), [`token_in_url`](https://taskloader.com/docs/api/errors.md#token_in_url), [`unauthenticated`](https://taskloader.com/docs/api/errors.md#unauthenticated), [`invalid_token`](https://taskloader.com/docs/api/errors.md#invalid_token), [`rate_limited`](https://taskloader.com/docs/api/errors.md#rate_limited), [`internal_error`](https://taskloader.com/docs/api/errors.md#internal_error), [`service_unavailable`](https://taskloader.com/docs/api/errors.md#service_unavailable).

#### Example

```curl
curl https://taskloader.com/api/v1/projects/prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations \
  -H "Authorization: Bearer $TASKLOADER_API_KEY"
```

```js
const response = await fetch('https://taskloader.com/api/v1/projects/prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations', {
  headers: {
    Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
  },
});
if (!response.ok) {
  const problem = await response.json();
  throw new Error(`${problem.code}: ${problem.detail}`);
}
const projectInvitations = await response.json();
```

```python
import os

import requests

response = requests.get(
    "https://taskloader.com/api/v1/projects/prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations",
    headers={
        "Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
    },
    timeout=30,
)
if not response.ok:
    problem = response.json()
    raise RuntimeError(f"{problem['code']}: {problem['detail']}")
project_invitations = response.json()
```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
  "object": "list",
  "data": [
    {
      "object": "invitation",
      "id": "inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
      "target": "project",
      "organizationId": "org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
      "projectId": "prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
      "role": "editor",
      "expiresAt": "2026-11-25T10:00:00.123Z",
      "createdAt": "2026-11-18T10:00:00.123Z",
      "createdBy": {
        "userId": "usr_kq3Xb1W9pZ0aLm7c",
        "name": "Ana Lima"
      }
    }
  ],
  "hasMore": false,
  "nextCursor": null
}
```

## Create a project invitation {#create_project_invitation}

Creates a single-use link that adds someone to the project with a role.

```http
POST /api/v1/projects/{projectId}/invitations
```

- **Scopes:** `people:manage`
- **Who:** Admin or owner in the project
- **[Project-limited credentials](https://taskloader.com/docs/authentication.md#project-limited-credentials):** allowed inside the credential’s projects; anything else is `not_found`
- **Retries:** send `Idempotency-Key` to make retries safe
- **Rate limit:** the `write` bucket, and the `invitation` daily cap (at most 100 in any 24 hours, at most 50 at once, per person)
- **MCP tool:** `invite_people`

Creates a link that adds whoever opens it to the project with a role (editor unless you say otherwise). They join that project only, and are a guest of its organization unless already a member. It works once and expires after seven days, and stops working if you stop being an owner or admin of the project. `token` and `url` come only in this answer: a retry with the same `Idempotency-Key` answers without them (revoke that link and create another), and lists never show them. Share the link only with the person you mean to invite. At most 20 active links per project (`too_many_invitations`) and 100 new invitations a day through the API and MCP (`daily_limit_reached`). Project owner and admins.

#### Parameters

| Name              | In     | Type         | Required | Description                                                                                                                                                                                                                                                       |
| ----------------- | ------ | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `projectId`       | path   | id (`prj_…`) | Yes      | Project id: prj_ followed by 32 lowercase hex digits, for example prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718.                                                                                                                                                           |
| `Idempotency-Key` | header | string       | No       | Makes a retry safe: the same key with the same request within 24 hours returns the first answer (with `Idempotent-Replayed: true`) instead of acting twice. 1 to 255 printable ASCII characters; a UUID works well. Keys belong to the credential that sent them. |

#### Request body

A JSON object. Fields not listed are refused.

| Field  | Type                                  | Required | Description                                  |
| ------ | ------------------------------------- | -------- | -------------------------------------------- |
| `role` | `"viewer"` or `"editor"` or `"admin"` | No       | viewer, editor or admin. Defaults to editor. |

#### Response

`201` with the new `Invitation` object.

| Field            | Type                                                | Description                                                                                                                                                                                                                       |
| ---------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `object`         | `"invitation"`                                      |                                                                                                                                                                                                                                   |
| `id`             | id (`inv_…`)                                        | Invitation id: inv_ followed by 32 lowercase hex digits, for example inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718.                                                                                                                        |
| `target`         | `"project"` or `"organization"`                     | project: the person joins that project only; organization: the organization.                                                                                                                                                      |
| `organizationId` | id (`org_…`)                                        | Organization id: org_ followed by 32 lowercase hex digits, for example org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718.                                                                                                                      |
| `projectId`      | id (`prj_…`) or null                                |                                                                                                                                                                                                                                   |
| `role`           | `"viewer"` or `"editor"` or `"admin"` or `"member"` | The role the person gets: viewer, editor or admin in a project; member or admin in an organization.                                                                                                                               |
| `expiresAt`      | string (date-time)                                  | Seven days after it was created.                                                                                                                                                                                                  |
| `createdAt`      | string (date-time)                                  | RFC 3339 UTC with milliseconds, for example 2026-11-18T10:00:00.123Z.                                                                                                                                                             |
| `createdBy`      | object                                              |                                                                                                                                                                                                                                   |
| `token`          | string                                              | The secret part of the link. Returned once, by the call that creates the invitation (a retry with the same Idempotency-Key answers without it); Taskloader keeps only its hash. Share it only with the person you mean to invite. |
| `url`            | string                                              | The link to send (…/join#\<token>). Returned once, with token. Anyone with it can join with role until it is used, revoked or expires.                                                                                            |

Headers it sends: `Idempotent-Replayed`.

#### Errors

| Status | Code                                                                          | Meaning                                          |
| ------ | ----------------------------------------------------------------------------- | ------------------------------------------------ |
| 400    | [`invalid_id`](https://taskloader.com/docs/api/errors.md#invalid_id)                                   | The id is for a different kind of resource       |
| 400    | [`invalid_idempotency_key`](https://taskloader.com/docs/api/errors.md#invalid_idempotency_key)         | The Idempotency-Key header is not valid          |
| 403    | [`insufficient_scope`](https://taskloader.com/docs/api/errors.md#insufficient_scope)                   | The credential lacks the required access         |
| 403    | [`forbidden_role`](https://taskloader.com/docs/api/errors.md#forbidden_role)                           | Your role does not allow this                    |
| 404    | [`not_found`](https://taskloader.com/docs/api/errors.md#not_found)                                     | Not found                                        |
| 409    | [`idempotency_key_in_progress`](https://taskloader.com/docs/api/errors.md#idempotency_key_in_progress) | The original request is still running            |
| 413    | [`payload_too_large`](https://taskloader.com/docs/api/errors.md#payload_too_large)                     | The request body is too large                    |
| 415    | [`unsupported_media_type`](https://taskloader.com/docs/api/errors.md#unsupported_media_type)           | Unsupported media type                           |
| 422    | [`idempotency_key_reused`](https://taskloader.com/docs/api/errors.md#idempotency_key_reused)           | The Idempotency-Key was used for another request |
| 429    | [`too_many_invitations`](https://taskloader.com/docs/api/errors.md#too_many_invitations)               | Too many active invitations                      |
| 429    | [`daily_limit_reached`](https://taskloader.com/docs/api/errors.md#daily_limit_reached)                 | Daily limit reached                              |

And the errors every operation can return: [`invalid_request`](https://taskloader.com/docs/api/errors.md#invalid_request), [`validation_failed`](https://taskloader.com/docs/api/errors.md#validation_failed), [`token_in_url`](https://taskloader.com/docs/api/errors.md#token_in_url), [`unauthenticated`](https://taskloader.com/docs/api/errors.md#unauthenticated), [`invalid_token`](https://taskloader.com/docs/api/errors.md#invalid_token), [`rate_limited`](https://taskloader.com/docs/api/errors.md#rate_limited), [`internal_error`](https://taskloader.com/docs/api/errors.md#internal_error), [`service_unavailable`](https://taskloader.com/docs/api/errors.md#service_unavailable).

#### Example

```curl
curl https://taskloader.com/api/v1/projects/prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations \
  -H "Authorization: Bearer $TASKLOADER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"role":"editor"}'
```

```js
const response = await fetch('https://taskloader.com/api/v1/projects/prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({ role: 'editor' }),
});
if (!response.ok) {
  const problem = await response.json();
  throw new Error(`${problem.code}: ${problem.detail}`);
}
const projectInvitation = await response.json();
```

```python
import os
import uuid

import requests

response = requests.post(
    "https://taskloader.com/api/v1/projects/prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations",
    headers={
        "Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
        "Content-Type": "application/json",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={"role": "editor"},
    timeout=30,
)
if not response.ok:
    problem = response.json()
    raise RuntimeError(f"{problem['code']}: {problem['detail']}")
project_invitation = response.json()
```

```http
HTTP/1.1 201 Created
Content-Type: application/json

{
  "object": "invitation",
  "id": "inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
  "target": "project",
  "organizationId": "org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
  "projectId": "prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
  "role": "editor",
  "expiresAt": "2026-11-25T10:00:00.123Z",
  "createdAt": "2026-11-18T10:00:00.123Z",
  "createdBy": {
    "userId": "usr_kq3Xb1W9pZ0aLm7c",
    "name": "Ana Lima"
  },
  "token": "3f9c2b7a1e4d8c6b5a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b",
  "url": "https://taskloader.com/join#3f9c2b7a1e4d8c6b5a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b"
}
```

## Revoke a project invitation {#revoke_project_invitation}

Stops an unused project invitation link from working.

```http
DELETE /api/v1/projects/{projectId}/invitations/{invitationId}
```

- **Scopes:** `people:manage`
- **Who:** Admin or owner in the project
- **[Project-limited credentials](https://taskloader.com/docs/authentication.md#project-limited-credentials):** allowed inside the credential’s projects; anything else is `not_found`
- **Retries:** naturally idempotent: repeating it changes nothing more
- **Rate limit:** the `write` bucket
- **MCP tool:** `revoke_invitation`

Revokes an unused link to the project (project owner and admins). Revoking one that is already revoked succeeds again. One that was already used is `409 invitation_used`: the person it let in stays, so remove them instead (`remove_project_member`). The invitation is looked for in the project from the path only.

#### Parameters

| Name           | In   | Type         | Required | Description                                                                                                |
| -------------- | ---- | ------------ | -------- | ---------------------------------------------------------------------------------------------------------- |
| `projectId`    | path | id (`prj_…`) | Yes      | Project id: prj_ followed by 32 lowercase hex digits, for example prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718.    |
| `invitationId` | path | id (`inv_…`) | Yes      | Invitation id: inv_ followed by 32 lowercase hex digits, for example inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |

#### Response

`200` with an `invitation` object.

| Field     | Type           | Description                                                                                                |
| --------- | -------------- | ---------------------------------------------------------------------------------------------------------- |
| `object`  | `"invitation"` |                                                                                                            |
| `id`      | id (`inv_…`)   | Invitation id: inv_ followed by 32 lowercase hex digits, for example inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
| `revoked` | `true`         |                                                                                                            |

#### Errors

| Status | Code                                                                  | Meaning                                    |
| ------ | --------------------------------------------------------------------- | ------------------------------------------ |
| 400    | [`invalid_id`](https://taskloader.com/docs/api/errors.md#invalid_id)                           | The id is for a different kind of resource |
| 400    | [`invalid_idempotency_key`](https://taskloader.com/docs/api/errors.md#invalid_idempotency_key) | The Idempotency-Key header is not valid    |
| 403    | [`insufficient_scope`](https://taskloader.com/docs/api/errors.md#insufficient_scope)           | The credential lacks the required access   |
| 403    | [`forbidden_role`](https://taskloader.com/docs/api/errors.md#forbidden_role)                   | Your role does not allow this              |
| 404    | [`not_found`](https://taskloader.com/docs/api/errors.md#not_found)                             | Not found                                  |
| 409    | [`invitation_used`](https://taskloader.com/docs/api/errors.md#invitation_used)                 | The invitation was already used            |
| 413    | [`payload_too_large`](https://taskloader.com/docs/api/errors.md#payload_too_large)             | The request body is too large              |
| 415    | [`unsupported_media_type`](https://taskloader.com/docs/api/errors.md#unsupported_media_type)   | Unsupported media type                     |

And the errors every operation can return: [`invalid_request`](https://taskloader.com/docs/api/errors.md#invalid_request), [`validation_failed`](https://taskloader.com/docs/api/errors.md#validation_failed), [`token_in_url`](https://taskloader.com/docs/api/errors.md#token_in_url), [`unauthenticated`](https://taskloader.com/docs/api/errors.md#unauthenticated), [`invalid_token`](https://taskloader.com/docs/api/errors.md#invalid_token), [`rate_limited`](https://taskloader.com/docs/api/errors.md#rate_limited), [`internal_error`](https://taskloader.com/docs/api/errors.md#internal_error), [`service_unavailable`](https://taskloader.com/docs/api/errors.md#service_unavailable).

#### Example

```curl
curl -X DELETE https://taskloader.com/api/v1/projects/prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations/inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718 \
  -H "Authorization: Bearer $TASKLOADER_API_KEY"
```

```js
const response = await fetch('https://taskloader.com/api/v1/projects/prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations/inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
  },
});
if (!response.ok) {
  const problem = await response.json();
  throw new Error(`${problem.code}: ${problem.detail}`);
}
const projectInvitation = await response.json();
```

```python
import os

import requests

response = requests.delete(
    "https://taskloader.com/api/v1/projects/prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/invitations/inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
    headers={
        "Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
    },
    timeout=30,
)
if not response.ok:
    problem = response.json()
    raise RuntimeError(f"{problem['code']}: {problem['detail']}")
project_invitation = response.json()
```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
  "object": "invitation",
  "id": "inv_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
  "revoked": true
}
```

## Preview an invitation {#preview_invitation}

Says what an invitation link offers, without accepting it.

```http
POST /api/v1/invitations/preview
```

- **Scopes:** `invitations:accept`
- **Who:** Any signed-in person
- **[Project-limited credentials](https://taskloader.com/docs/authentication.md#project-limited-credentials):** refused with `credential_restricted`; use a credential with access to all projects
- **Retries:** a read; safe to repeat
- **Rate limit:** the `read` bucket
- **MCP tool:** `accept_invitation`

Returns the organization and project an invitation is for, the role it grants and who sent it, so the person can decide before accepting. Send the token or the whole link in the body, never in the URL. An expired, used or revoked link is `404 invitation_unavailable`, and so is one whose creator is no longer an owner or admin where it leads. Needs `invitations:accept`; a credential limited to some projects cannot use it.

#### Request body

A JSON object. Fields not listed are refused.

| Field   | Type   | Required | Description                                                                                                                    |
| ------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `token` | string | No       | The invitation token: the 64 hex characters after /join# in the link. Send token or url, not both.                             |
| `url`   | string | No       | The whole invitation link, for example https://taskloader.com/join#3f9c…. Send token or url, not both. Up to 2,048 characters. |

#### Response

`200` with an `InvitationPreview` object.

| Field          | Type                                                | Description                                                                                         |
| -------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `object`       | `"invitation_preview"`                              |                                                                                                     |
| `organization` | object                                              |                                                                                                     |
| `project`      | object or null                                      | The project it invites to; null for an invitation to the organization.                              |
| `role`         | `"viewer"` or `"editor"` or `"admin"` or `"member"` | The role the person gets: viewer, editor or admin in a project; member or admin in an organization. |
| `invitedBy`    | object                                              |                                                                                                     |

#### Errors

| Status | Code                                                                  | Meaning                                    |
| ------ | --------------------------------------------------------------------- | ------------------------------------------ |
| 400    | [`invalid_idempotency_key`](https://taskloader.com/docs/api/errors.md#invalid_idempotency_key) | The Idempotency-Key header is not valid    |
| 403    | [`insufficient_scope`](https://taskloader.com/docs/api/errors.md#insufficient_scope)           | The credential lacks the required access   |
| 403    | [`credential_restricted`](https://taskloader.com/docs/api/errors.md#credential_restricted)     | The credential is limited to some projects |
| 404    | [`invitation_unavailable`](https://taskloader.com/docs/api/errors.md#invitation_unavailable)   | The invitation is no longer available      |
| 413    | [`payload_too_large`](https://taskloader.com/docs/api/errors.md#payload_too_large)             | The request body is too large              |
| 415    | [`unsupported_media_type`](https://taskloader.com/docs/api/errors.md#unsupported_media_type)   | Unsupported media type                     |

And the errors every operation can return: [`invalid_request`](https://taskloader.com/docs/api/errors.md#invalid_request), [`validation_failed`](https://taskloader.com/docs/api/errors.md#validation_failed), [`token_in_url`](https://taskloader.com/docs/api/errors.md#token_in_url), [`unauthenticated`](https://taskloader.com/docs/api/errors.md#unauthenticated), [`invalid_token`](https://taskloader.com/docs/api/errors.md#invalid_token), [`rate_limited`](https://taskloader.com/docs/api/errors.md#rate_limited), [`internal_error`](https://taskloader.com/docs/api/errors.md#internal_error), [`service_unavailable`](https://taskloader.com/docs/api/errors.md#service_unavailable).

#### Example

```curl
curl https://taskloader.com/api/v1/invitations/preview \
  -H "Authorization: Bearer $TASKLOADER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://taskloader.com/join#3f9c2b7a1e4d8c6b5a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b"
}'
```

```js
const response = await fetch('https://taskloader.com/api/v1/invitations/preview', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    url: 'https://taskloader.com/join#3f9c2b7a1e4d8c6b5a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b',
  }),
});
if (!response.ok) {
  const problem = await response.json();
  throw new Error(`${problem.code}: ${problem.detail}`);
}
const invitation = await response.json();
```

```python
import os

import requests

response = requests.post(
    "https://taskloader.com/api/v1/invitations/preview",
    headers={
        "Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "url": "https://taskloader.com/join#3f9c2b7a1e4d8c6b5a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b",
    },
    timeout=30,
)
if not response.ok:
    problem = response.json()
    raise RuntimeError(f"{problem['code']}: {problem['detail']}")
invitation = response.json()
```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
  "object": "invitation_preview",
  "organization": {
    "name": "Northwind"
  },
  "project": {
    "name": "Website launch"
  },
  "role": "editor",
  "invitedBy": {
    "name": "Ana Lima"
  }
}
```

## Accept an invitation {#accept_invitation}

Joins the project or organization an invitation link is for.

```http
POST /api/v1/invitations/accept
```

- **Scopes:** `invitations:accept`
- **Who:** Any signed-in person
- **[Project-limited credentials](https://taskloader.com/docs/authentication.md#project-limited-credentials):** refused with `credential_restricted`; use a credential with access to all projects
- **Retries:** send `Idempotency-Key` to make retries safe
- **Rate limit:** the `write` bucket
- **MCP tool:** `accept_invitation`

Joins the project (with the link’s role; you become a guest of its organization unless already a member) or the organization the invitation is for. Send the token or the whole link in the body, never in the URL. If you are already there, nothing changes: `alreadyMember: true`, your role stays, and an unused link stays usable for whoever it was meant for. A link someone else used, revoked or expired is `404 invitation_unavailable`, and so is an unused link whose creator is no longer an owner or admin where it leads. Accept only links the person gave you. Needs `invitations:accept`; a credential limited to some projects cannot use it.

#### Parameters

| Name              | In     | Type   | Required | Description                                                                                                                                                                                                                                                       |
| ----------------- | ------ | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Idempotency-Key` | header | string | No       | Makes a retry safe: the same key with the same request within 24 hours returns the first answer (with `Idempotent-Replayed: true`) instead of acting twice. 1 to 255 printable ASCII characters; a UUID works well. Keys belong to the credential that sent them. |

#### Request body

A JSON object. Fields not listed are refused.

| Field   | Type   | Required | Description                                                                                                                    |
| ------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `token` | string | No       | The invitation token: the 64 hex characters after /join# in the link. Send token or url, not both.                             |
| `url`   | string | No       | The whole invitation link, for example https://taskloader.com/join#3f9c…. Send token or url, not both. Up to 2,048 characters. |

#### Response

`200` with an `invitation_acceptance` object.

| Field            | Type                      | Description                                                                                                                        |
| ---------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `object`         | `"invitation_acceptance"` |                                                                                                                                    |
| `organizationId` | id (`org_…`)              | Organization id: org_ followed by 32 lowercase hex digits, for example org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718.                       |
| `projectId`      | id (`prj_…`) or null      |                                                                                                                                    |
| `memberId`       | id (`mem_…`) or null      | Your membership in the project; null for an invitation to the organization.                                                        |
| `alreadyMember`  | boolean                   | True when you were already there: nothing changed, your role stayed, and an unused link stays usable for whoever it was meant for. |

Headers it sends: `Idempotent-Replayed`.

#### Errors

| Status | Code                                                                          | Meaning                                          |
| ------ | ----------------------------------------------------------------------------- | ------------------------------------------------ |
| 400    | [`invalid_idempotency_key`](https://taskloader.com/docs/api/errors.md#invalid_idempotency_key)         | The Idempotency-Key header is not valid          |
| 403    | [`insufficient_scope`](https://taskloader.com/docs/api/errors.md#insufficient_scope)                   | The credential lacks the required access         |
| 403    | [`credential_restricted`](https://taskloader.com/docs/api/errors.md#credential_restricted)             | The credential is limited to some projects       |
| 404    | [`invitation_unavailable`](https://taskloader.com/docs/api/errors.md#invitation_unavailable)           | The invitation is no longer available            |
| 409    | [`idempotency_key_in_progress`](https://taskloader.com/docs/api/errors.md#idempotency_key_in_progress) | The original request is still running            |
| 413    | [`payload_too_large`](https://taskloader.com/docs/api/errors.md#payload_too_large)                     | The request body is too large                    |
| 415    | [`unsupported_media_type`](https://taskloader.com/docs/api/errors.md#unsupported_media_type)           | Unsupported media type                           |
| 422    | [`idempotency_key_reused`](https://taskloader.com/docs/api/errors.md#idempotency_key_reused)           | The Idempotency-Key was used for another request |
| 429    | [`too_many_projects`](https://taskloader.com/docs/api/errors.md#too_many_projects)                     | Too many projects                                |

And the errors every operation can return: [`invalid_request`](https://taskloader.com/docs/api/errors.md#invalid_request), [`validation_failed`](https://taskloader.com/docs/api/errors.md#validation_failed), [`token_in_url`](https://taskloader.com/docs/api/errors.md#token_in_url), [`unauthenticated`](https://taskloader.com/docs/api/errors.md#unauthenticated), [`invalid_token`](https://taskloader.com/docs/api/errors.md#invalid_token), [`rate_limited`](https://taskloader.com/docs/api/errors.md#rate_limited), [`internal_error`](https://taskloader.com/docs/api/errors.md#internal_error), [`service_unavailable`](https://taskloader.com/docs/api/errors.md#service_unavailable).

#### Example

```curl
curl https://taskloader.com/api/v1/invitations/accept \
  -H "Authorization: Bearer $TASKLOADER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "token": "3f9c2b7a1e4d8c6b5a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b"
}'
```

```js
const response = await fetch('https://taskloader.com/api/v1/invitations/accept', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({
    token: '3f9c2b7a1e4d8c6b5a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b',
  }),
});
if (!response.ok) {
  const problem = await response.json();
  throw new Error(`${problem.code}: ${problem.detail}`);
}
const invitation = await response.json();
```

```python
import os
import uuid

import requests

response = requests.post(
    "https://taskloader.com/api/v1/invitations/accept",
    headers={
        "Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
        "Content-Type": "application/json",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "token": "3f9c2b7a1e4d8c6b5a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b",
    },
    timeout=30,
)
if not response.ok:
    problem = response.json()
    raise RuntimeError(f"{problem['code']}: {problem['detail']}")
invitation = response.json()
```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
  "object": "invitation_acceptance",
  "organizationId": "org_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
  "projectId": "prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
  "memberId": "mem_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
  "alreadyMember": false
}
```
