---
title: "Invite a user"
method: POST
path: "/v2/teams/{teamId}/members"
tags: ["teams"]
---

# Invite a user

`POST /v2/teams/{teamId}/members`

Invite a user to join the team specified in the URL. The authenticated user needs to be an `OWNER` in order to successfully invoke this endpoint. The user to be invited must be specified by email.

## Path parameters

- `teamId` string, required

## Query parameters

- `slug` string

## Request body

- object[]
  - `email` string, email, required — The email address of the user to invite
  - `role` 'OWNER' | 'MEMBER' | 'DEVELOPER' | 'SECURITY' | 'BILLING' | 'VIEWER' | 'VIEWER_FOR_PLUS' | 'CONTRIBUTOR' — The role of the user to invite
  - `projects` object[]
    - `projectId` string, required — The ID of the project.
    - `role` 'ADMIN' | 'PROJECT_VIEWER' | 'PROJECT_DEVELOPER' | 'PROJECT_GUEST', required — Sets the project roles for the invited user

## Response `200`

- InvitedTeamMember — The member was successfully added to the team.
  - `uid` string, required — The ID of the invited user
  - `username` string, required — The username of the invited user
  - `email` string, required — The email of the invited user.
  - `role` 'BILLING' | 'CONTRIBUTOR' | 'DEVELOPER' | 'MEMBER' | 'OWNER' | 'SECURITY' | 'VIEWER' | 'VIEWER_FOR_PLUS', required — The role used for the invitation
  - `teamRoles` string[] — The team roles of the user
  - `teamPermissions` string[] — The team permissions of the user

## Other responses

- `400` — One of the provided values in the request body is invalid. One of the provided values in the request query is invalid.
- `401` — The request is not authorized.
- `403` — You do not have permission to access this resource. The authenticated user must be a team owner to perform the action
- `410`
- `503`

---

[API](https://skmtc.net/vercel/apis/api.md) · [All operations](https://skmtc.net/vercel/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vercel/api/versions/b4d86a3e3479/schema)
