---
title: "POST /teams/{team_name}/invitations/accept"
method: POST
path: "/teams/{team_name}/invitations/accept"
tags: ["teams"]
---

# POST /teams/{team_name}/invitations/accept

`POST /teams/{team_name}/invitations/accept`

Accept an invitation to the team, creating a user membership

## Path parameters

- `team_name` string, required — The unique name for the team.

## Request body

- object
  - `token` string, uuid, required

## Response `201`

The invitation has been accepted and the authenticated user is now a member of the team.

- MembershipWithTeam
  - `role` string, required
  - `team` Team, required — CloudQuery Team
    - `created_at` string, date-time
    - `name` string, required — The unique name for the team.
    - `plan` 'free' | 'paid' | 'enterprise' | 'trial', required — The plan the team is on (trial is deprecated)
    - `plan_end_time` string, date-time
    - `is_trial_active` boolean, required
    - `trial_end_time` string, date-time
    - `display_name` string, required — The team's display name
    - `internal` boolean, required

## Other responses

- `303` — The authenticated user is already a member of this team.
- `403` — Forbidden
- `500` — Internal Error

---

[API](https://skmtc.net/cloudquery/apis/cloudquery-openapi-spec.md) · [All operations](https://skmtc.net/cloudquery/apis/cloudquery-openapi-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cloudquery/cloudquery-openapi-spec/versions/4af580f9023b/schema)
