# Accept an invitation

`POST /v1/invitations/accept`

Accepts an invitation. The email link sends `token`. Someone with no organization yet may instead send `invitation_id` from `Me.pending_claims` for an owner claim already addressed to their verified email. Exactly one of the two is set.

## Request body

- `token` (string): Secret from the invitation or claim link
- `invitation_id` (string (uuid)): A pending owner claim for the signed-in email, from Me.pending_claims

```json
{
  "token": "inv_tok_8f2c…",
  "invitation_id": "7c1e9a52-4b0d-4f6e-9a31-2d5c8e7f0b14"
}
```

Errors: invitation_inactive, invitation_email_mismatch, email_not_verified

```bash
curl -X POST "https://sandbox-api.payezy.io/v1/invitations/accept" \
  -H "Authorization: Bearer $PAYEZY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "token": "inv_tok_8f2c…",
  "invitation_id": "7c1e9a52-4b0d-4f6e-9a31-2d5c8e7f0b14"
}'
```
