---
title: "Accept a team invitation"
method: POST
path: "/v1/team-invitations/{invitationId}/accept"
tags: ["Teams"]
---

# Accept a team invitation

`POST /v1/team-invitations/{invitationId}/accept`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/team-invitations/{invitationId}/accept`
- Auth: HTTP bearer

Accepts a pending team invitation by its id for the calling user. Adds the caller to the team with the invited role. The invitation must be pending, unexpired, and addressed to the caller's email. Each invitation is single-use. Requires a user principal; machine and team-scoped credentials cannot accept invitations.

## Path parameters

- `invitationId` string, required: The invitation id (the token from the invite link).

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object, required
    - `teamId` string, required: The id of the team the caller joined.
    - `teamSlug` string, required: URL-safe slug of the joined team.
    - `userId` string, required: The id of the user that accepted the invitation.
    - `role` 'owner' | 'admin' | 'member', required: Role granted by the invitation.

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

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