Add --role flag to vercel teams invite for automated member onboarding

Hello Vercel team,

I’d like to request support for assigning a team member role directly from the CLI when inviting users to a team.

Problem

Currently, the vercel teams invite command does not support specifying a role, which complicates automation flows.

Current Behavior

vercel teams invite user@example.com --scope my-team

Proposed Behavior

vercel teams invite user@example.com --scope my-team --role DEVELOPER

This would help with onboarding and automation flows where the invited user needs a specific non-default team role immediately.

Workaround

At the moment, the workaround is to call the Team Members API directly instead of using the CLI. For example:

curl -X POST \
  -H "Authorization: Bearer $VERCEL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","role":"DEVELOPER"}' \
  "https://api.vercel.com/v1/teams/my-team/members"

I prepared a draft PR for this here:

Would this be the right direction for the CLI?

If the command shape looks acceptable, I’m happy to keep iterating on the PR.

Thanks!

1 Like

Hi @shige, thanks for taking the initiative for this with a PR. I’ll share it with our team.

If you are confident about the PR feel free to make it ready so maintainers can review.

1 Like

Thanks, @anshumanb san!
I’ve marked the PR as ready for review. Looking forward to the team’s feedback.

1 Like