---
title: "Accept an invitation link."
method: POST
path: "/accounts/accept-invitation/{uidb64}/{token}/"
tags: ["accounts"]
---

# Accept an invitation link.

`POST /accounts/accept-invitation/{uidb64}/{token}/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/accounts/accept-invitation/{uidb64}/{token}/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

GET  — validate the token without consuming it. Returns org info so the
       frontend can render a "Set Password" page.
POST — set the user's password, activate the account, accept the invite,
       and return JWT tokens for auto-login.

## Request body

- AcceptInvitationRequest
  - `new_password` string, required
  - `repeat_password` string, required

## Response `200`

OK

- AccountsTokenPairResponse
  - `access` string
  - `refresh` string
  - `requires_two_factor` boolean
  - `challenge_token` string, uuid
  - `methods` string[]
  - `requires_org_setup` boolean
  - `message` string
  - `new_org` boolean
  - `org_name` string
  - `is_first_login` boolean
  - `recovery_codes_warning` string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error
- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
