---
title: "Accept invitation"
method: POST
path: "/invitations/{token}/accept"
tags: ["invitations"]
---

# Accept invitation

`POST /invitations/{token}/accept`

## Request

- Base URL: `http://localhost:3001`
- URL: `http://localhost:3001/invitations/{token}/accept`
- Auth: HTTP bearer

Accept a group invitation using the invitation token, optionally taking over one of the group's guests (claimGuestUserId)

## Path parameters

- `token` string, required

## Request body

- AcceptInvitationRequestDto
  - `token` string: Deprecated: the token in the path is used
  - `claimGuestUserId` string, uuid: Guest member of the group the joiner is. Their expenses and balance move to the joining account.

## Response `200`

Invitation accepted successfully

- object
  - `data` AcceptInvitationResponseDto
    - `message` string, required
    - `groupId` string, required: Group the user is now a member of
    - `claimedGuestName` string, nullable: Display name of the guest the user took over, when they claimed one
  - `success` boolean
  - `message` string

## Other responses

- `400`: Bad Request - Invalid input or validation failed
- `401`: Unauthorized - Authentication required or invalid token
- `403`: Forbidden - Insufficient permissions to access this resource
- `404`: Not Found - The requested resource does not exist
- `500`: Internal Server Error - An unexpected error occurred

---

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