Sample - GitHub REST API
POST/enterprises/{enterprise}/teams/{enterprise-team}/memberships/add

Bulk add team members

Adds multiple GitHub users to an enterprise team. Supply the user handles in the required usernames array, using enterprise and enterprise-team to identify the target team.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 1 body field
enterprisestringrequired
The enterprise slug.
enterprise-teamstringrequired
The enterprise team slug, or the enterprise team ID.

The GitHub user handles to add to the enterprise team.

usernamesarray<string>required
The GitHub user handles to add to the team.

1 status code
200Returns an array of the GitHub user objects added to the enterprise team.
namestringoptional
emailstringoptional
loginstringrequired
idintegerrequired
node_idstringrequired
avatar_urlstringrequired
gravatar_idstringrequired
urlstringrequired
html_urlstringrequired
followers_urlstringrequired
following_urlstringrequired
gists_urlstringrequired
starred_urlstringrequired
subscriptions_urlstringrequired
organizations_urlstringrequired
repos_urlstringrequired
events_urlstringrequired
received_events_urlstringrequired
typestringrequired
site_adminbooleanrequired
starred_atstringoptional
user_view_typestringoptional

Error handling

enterprise, enterprise-team, and usernames must identify the target enterprise team and the GitHub users to add. usernames must be an array containing GitHub user handles, and each array item must be a string.