GitHub v3 REST API

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
{protocol}://{hostname}/api/v3/user

Body

application/json
namestring

The new name of the user.

Example:Omar Jahandar

emailstring

The publicly visible email address of the user.

Example:omar@example.com

blogstring

The new blog URL of the user.

Example:blog.example.com

twitter_usernamestring | null

The new Twitter username of the user.

Example:therealomarj

companystring

The new company of the user.

Example:Acme corporation

locationstring

The new location of the user.

Example:Berlin, Germany

hireableboolean

The new hiring availability of the user.

biostring

The new short biography of the user.

Response

application/json

Response

Private User

Private User

loginstringrequired

Example:octocat

idintegerrequired

Example:1

node_idstringrequired

Example:MDQ6VXNlcjE=

avatar_urlstring(uri)required

Example:https://github.com/images/error/octocat_happy.gif

gravatar_idstring | nullrequired

Example:41d064eb2195891e12d0413f63227ea7

urlstring(uri)required

Example:https://api.github.com/users/octocat

html_urlstring(uri)required

Example:https://github.com/octocat

followers_urlstring(uri)required

Example:https://api.github.com/users/octocat/followers

following_urlstringrequired

Example:https://api.github.com/users/octocat/following{/other_user}

gists_urlstringrequired

Example:https://api.github.com/users/octocat/gists{/gist_id}

starred_urlstringrequired

Example:https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_urlstring(uri)required

Example:https://api.github.com/users/octocat/subscriptions

organizations_urlstring(uri)required

Example:https://api.github.com/users/octocat/orgs

repos_urlstring(uri)required

Example:https://api.github.com/users/octocat/repos

events_urlstringrequired

Example:https://api.github.com/users/octocat/events{/privacy}

received_events_urlstring(uri)required

Example:https://api.github.com/users/octocat/received_events

typestringrequired

Example:User

site_adminbooleanrequired
namestring | nullrequired

Example:monalisa octocat

companystring | nullrequired

Example:GitHub

blogstring | nullrequired

Example:https://github.com/blog

locationstring | nullrequired

Example:San Francisco

emailstring | null(email)required

Example:octocat@github.com

hireableboolean | nullrequired
biostring | nullrequired

Example:There once was...

public_reposintegerrequired

Example:2

public_gistsintegerrequired

Example:1

followersintegerrequired

Example:20

followingintegerrequired

Example:0

created_atstring(date-time)required

Example:2008-01-14T04:33:35Z

updated_atstring(date-time)required

Example:2008-01-14T04:33:35Z

private_gistsintegerrequired

Example:81

total_private_reposintegerrequired

Example:100

owned_private_reposintegerrequired

Example:100

disk_usageintegerrequired

Example:10000

collaboratorsintegerrequired

Example:8

two_factor_authenticationbooleanrequired

Example:true

planobject
Show Child Parameters
suspended_atstring | null(date-time)
business_plusboolean
ldap_dnstring
patch/user

Body

{}
 
application/json

List email addresses for the authenticated user

Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the user:email scope.

get
{protocol}://{hostname}/api/v3/user/emails

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Response

application/json

Response

Email

emailstring(email)required

Example:octocat@github.com

primarybooleanrequired

Example:true

verifiedbooleanrequired

Example:true

visibilitystring | nullrequired

Example:public

get/user/emails
 
application/json

Add an email address for the authenticated user

This endpoint is accessible with the user scope.

post
{protocol}://{hostname}/api/v3/user/emails

Body

application/json
One Of
emailsarray[string]required

Adds one or more email addresses to your GitHub account. Must contain at least one email address. Note: Alternatively, you can pass a single email address or an array of emails addresses directly, but we recommend that you pass an object using the emails key.

>= 1 items

Example:username@example.com

Response

application/json

Response

Email

emailstring(email)required

Example:octocat@github.com

primarybooleanrequired

Example:true

verifiedbooleanrequired

Example:true

visibilitystring | nullrequired

Example:public

post/user/emails

Body

{ "emails": [ "username@example.com" ] }
 
application/json

Delete an email address for the authenticated user

This endpoint is accessible with the user scope.

delete
{protocol}://{hostname}/api/v3/user/emails

Body

application/json
One Of
emailsarray[string]required

Email addresses associated with the GitHub user account.

>= 1 items

Example:username@example.com

Response

Response

delete/user/emails

Body

{ "emails": [ "username@example.com" ] }
 

List followers of the authenticated user

Lists the people following the authenticated user.

get
{protocol}://{hostname}/api/v3/user/followers

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Response

application/json

Response

Simple User

namestring | null
emailstring | null
loginstringrequired

Example:octocat

idintegerrequired

Example:1

node_idstringrequired

Example:MDQ6VXNlcjE=

avatar_urlstring(uri)required

Example:https://github.com/images/error/octocat_happy.gif

gravatar_idstring | nullrequired

Example:41d064eb2195891e12d0413f63227ea7

urlstring(uri)required

Example:https://api.github.com/users/octocat

html_urlstring(uri)required

Example:https://github.com/octocat

followers_urlstring(uri)required

Example:https://api.github.com/users/octocat/followers

following_urlstringrequired

Example:https://api.github.com/users/octocat/following{/other_user}

gists_urlstringrequired

Example:https://api.github.com/users/octocat/gists{/gist_id}

starred_urlstringrequired

Example:https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_urlstring(uri)required

Example:https://api.github.com/users/octocat/subscriptions

organizations_urlstring(uri)required

Example:https://api.github.com/users/octocat/orgs

repos_urlstring(uri)required

Example:https://api.github.com/users/octocat/repos

events_urlstringrequired

Example:https://api.github.com/users/octocat/events{/privacy}

received_events_urlstring(uri)required

Example:https://api.github.com/users/octocat/received_events

typestringrequired

Example:User

site_adminbooleanrequired
starred_atstring

Example:"2020-07-09T00:17:55Z"

get/user/followers
 
application/json