---
search:
  tags:
    - Account
    - POST
seo:
  description: >-
    Joins the organisation an invitation is for, using the code from its link.
    The… Reference for the POST /_luna/auth/invites/accept endpoint in the Luna
    API.
sidebar:
  label: Accept an invitation by code
  badge: POST
title: Accept an invitation by code
type: openapi-operation
---
Joins the organisation an invitation is for, using the code from its link. The invitation must be for your account's email address.

`POST /_luna/auth/invites/accept`

**Request body** (`application/json`, required)

- `invite` (string, required) — The code from the invitation link.

Request body example:

```json
{
  "invite": "string"
}
```

**Responses**

- `200` — The account joined the organisation.
- `default` — The request failed. The status says how and \`error.message\` says why.

Response example, 200:

```json
{
  "ok": true,
  "org": "string"
}
```
