v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2023-07-147873273.9 MB
users

Update the authenticated user

Note: If your email is set to private and you send an email parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API.

patch/user

Request body

namestring

The new name of the user.

emailstring

The publicly visible email address of the user.

blogstring

The new blog URL of the user.

twitter_usernamestring nullable

The new Twitter username of the user.

companystring

The new company of the user.

locationstring

The new location of the user.

hireableboolean

The new hiring availability of the user.

biostring

The new short biography of the user.

Example request

{
  "name": "Omar Jahandar",
  "email": "omar@example.com",
  "blog": "blog.example.com",
  "twitter_username": "therealomarj",
  "company": "Acme corporation",
  "location": "Berlin, Germany"
}

Response

Response

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
namestring nullable required
companystring nullable required
blogstring nullable required
locationstring nullable required
emailstring email nullable required
hireableboolean nullable required
biostring nullable required
twitter_usernamestring nullable
public_reposinteger required
public_gistsinteger required
followersinteger required
followinginteger required
created_atstring date-time required
updated_atstring date-time required
private_gistsinteger required
total_private_reposinteger required
owned_private_reposinteger required
disk_usageinteger required
collaboratorsinteger required
two_factor_authenticationboolean required
suspended_atstring date-time nullable
business_plusboolean
ldap_dnstring

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",
  "name": "monalisa octocat",
  "company": "GitHub",
  "blog": "https://github.com/blog",
  "location": "San Francisco",
  "email": "octocat@github.com",
  "bio": "There once was...",
  "twitter_username": "monalisa",
  "public_repos": 2,
  "public_gists": 1,
  "followers": 20,
  "created_at": "2008-01-14T04:33:35Z",
  "updated_at": "2008-01-14T04:33:35Z",
  "private_gists": 81,
  "total_private_repos": 100,
  "owned_private_repos": 100,
  "disk_usage": 10000,
  "collaborators": 8,
  "two_factor_authentication": true
}