v68

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,21696712.3 MB
enterprise-team-memberships

Add team member

Add a team member to an enterprise team.

put/enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}

Path parameters

enterprisestring required

The slug version of the enterprise name.

enterprise-teamstring required

The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.

usernamestring required

The handle for the GitHub user account.

Response

Successfully added team member

namestring nullable
emailstring nullable
loginstring required
idinteger required
node_idstring required
avatar_urlstring uri required
gravatar_idstring nullable required
urlstring uri required
html_urlstring uri required
followers_urlstring uri required
following_urlstring required
gists_urlstring required
starred_urlstring required
subscriptions_urlstring uri required
organizations_urlstring uri required
repos_urlstring uri required
events_urlstring required
received_events_urlstring uri required
typestring required
site_adminboolean required
starred_atstring
user_view_typestring

Example response

{
  "login": "octocat",
  "id": 1,
  "node_id": "MDQ6VXNlcjE=",
  "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
  "url": "https://api.github.com/users/octocat",
  "html_url": "https://github.com/octocat",
  "followers_url": "https://api.github.com/users/octocat/followers",
  "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  "organizations_url": "https://api.github.com/users/octocat/orgs",
  "repos_url": "https://api.github.com/users/octocat/repos",
  "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  "received_events_url": "https://api.github.com/users/octocat/received_events",
  "type": "User",
  "starred_at": "\"2020-07-09T00:17:55Z\"",
  "user_view_type": "public"
}