---
title: "Accept an invitation (existing user)"
method: POST
path: "/v1/company_memberships/user_accept_invitation"
tags: ["Company membership"]
---

# Accept an invitation (existing user)

`POST /v1/company_memberships/user_accept_invitation`

## Request

- Base URL: `https://api.cardda.com`
- URL: `https://api.cardda.com/v1/company_memberships/user_accept_invitation`
- Auth: HTTP bearer

Accepts all pending invitations bound to the given `invitation_token` for the
already-authenticated user, activating the memberships (sets the user, clears
the token, marks them `active`). Use this when the invitee already has a
Cardda account and is logged in.

## Parameters

- `#/paths/~1v1~1users/get/parameters/0` (unresolved $ref)

## Request body

- object
  - `invitation_token` string, required

## Response `200`

The activated memberships.

- CompanyMembership[]
  - `id` string, uuid, required
  - `user_id` string, nullable: Firebase UID of the member. Null while the invitation is still pending.
  - `company_id` string, uuid, required
  - `email` string, nullable
  - `role` string: Role name (e.g. `owner`, `admin`, `member`, or a custom company role name).
  - `status` 'pending' | 'active' | 'canceled'
  - `legal_representative` boolean
  - `has_powers_to_act` boolean, nullable
  - `partner` boolean
  - `partner_type` integer, nullable
  - `participation_rate` number, nullable: Ownership participation percentage (0-100).
  - `is_indirect_participation_corporate` boolean, nullable
  - `company_role_id` string, uuid, nullable
  - `permissions` object[]: Permissions granted to the membership (only `id` and `name` are returned). **Only included by the list endpoint** (`GET /v1/company_memberships`); the create/update/destroy/resend/create_many responses do not embed it.
    - `id` string, uuid
    - `name` string
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `401`: Unauthorized
- `404`: Invitation not found
- `422`: Could not activate one of the invited memberships.

---

[API](https://skmtc.dev/cardda/apis/banking-api.md) - [All operations](https://skmtc.dev/cardda/apis/banking-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cardda/apis/banking-api/revisions/ff1aeb3fda8b?raw)
