# Accept account invitation

```http
POST /accounts/-/invitations/accept
```

Accept account invitation.

## Request body

| Field   | Type   | Required | Description                                                                                                                                                                                                                                                                                                                                                                                             |
| ------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `token` | string | Yes      | Invitation acceptance token. Requires a user session; API keys are refused. Fresh acceptance requires the matching current email. Repeating acceptance returns the existing membership for the same accepting user, if that membership still exists. Unknown or revoked tokens return 404; a fresh request with a mismatched email returns 403. Expired or no longer authorized invitations return 409. |

## Responses

| Status | Description                               |
| ------ | ----------------------------------------- |
| 200    | Already a member; the existing membership |
| 201    | Membership created                        |
| 400    | Bad request                               |
| 401    | Unauthorized                              |
| 403    | Forbidden                                 |
| 404    | Not found                                 |
| 409    | Conflict                                  |
| 500    | Server error                              |
