teams

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.

post/v2/teams/{teamId}/members

Request

  • Base URL: https://api.vercel.com
  • URL: https://api.vercel.com/v2/teams/{teamId}/members
  • Auth: HTTP bearer

Path parameters

teamIdstring required
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

Query parameters

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Request body

emailstring 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

Example request

[
  {
    "email": "john@example.com",
    "role": "VIEWER",
    "projects": [
      {
        "projectId": "prj_ndlgr43fadlPyCtREAqxxdyFK",
        "role": "ADMIN"
      }
    ]
  }
]

Response

emailstring 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

teamPermissionsstring[]

The team permissions of the user

teamRolesstring[]

The team roles of the user

uidstring required

The ID of the invited user

usernamestring required

The username of the invited user

Example response

{
  "email": "john@user.co",
  "role": "MEMBER",
  "teamPermissions": [
    "CreateProject"
  ],
  "teamRoles": [
    "MEMBER"
  ],
  "uid": "kr1PsOIzqEL5Xg6M4VZcZosf",
  "username": "john-doe"
}

Changes

    • info

      added the non-success response with the status

    • warning

      added the new AiGatewayUser enum value to the / response property for the response status

    • info

      removed the AiGatewayApiKeyOwnedBySelf enum value from the / response property for the response status