Skip to main content

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
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Body Params
optional
application/jsonobject
bio string
optional

The new short biography of the user.

blog string
optional

The new blog URL of the user.

Example: blog.example.com

company string
optional

The new company of the user.

Example: Acme corporation

email string
optional

The publicly visible email address of the user.

Example: [email protected]

hireable boolean
optional

The new hiring availability of the user.

location string
optional

The new location of the user.

Example: Berlin, Germany

name string
optional

The new name of the user.

Example: Omar Jahandar

twitter_username string
optionalnullable

The new Twitter username of the user.

Example: therealomarj

Responses

application/json Private User object

Response

avatar_url string<uri>
required

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

bio string
requirednullable

Example: There once was...

blog string
requirednullable

Example: https://github.com/blog

business_plus boolean
optional
collaborators integer
required

Example: 8

company string
requirednullable

Example: GitHub

created_at string<date-time>
required

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

disk_usage integer
required

Example: 10000

email string<email>
requirednullable

Example: [email protected]

events_url string
required

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

followers integer
required

Example: 20

followers_url string<uri>
required

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

following integer
required

Example: 0

following_url string
required

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

gists_url string
required

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

gravatar_id string
requirednullable

Example: 41d064eb2195891e12d0413f63227ea7

hireable boolean
requirednullable
html_url string<uri>
required

Example: https://github.com/octocat

id integer
required

Example: 1

ldap_dn string
optional
location string
requirednullable

Example: San Francisco

login string
required

Example: octocat

name string
requirednullable

Example: monalisa octocat

node_id string
required

Example: MDQ6VXNlcjE=

organizations_url string<uri>
required

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

owned_private_repos integer
required

Example: 100

plan object
optional
collaborators integer
required
name string
required
private_repos integer
required
space integer
required
private_gists integer
required

Example: 81

public_gists integer
required

Example: 1

public_repos integer
required

Example: 2

received_events_url string<uri>
required

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

repos_url string<uri>
required

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

site_admin boolean
required
starred_url string
required

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

subscriptions_url string<uri>
required

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

suspended_at string<date-time>
optionalnullable
total_private_repos integer
required

Example: 100

two_factor_authentication boolean
required

Example: true

type string
required

Example: User

updated_at string<date-time>
required

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

url string<uri>
required

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

Not modified

application/json Basic Error object

Requires authentication

documentation_url string
optional
message string
optional
status string
optional
url string
optional
application/json Basic Error object

Forbidden

documentation_url string
optional
message string
optional
status string
optional
url string
optional
application/json Basic Error object

Resource not found

documentation_url string
optional
message string
optional
status string
optional
url string
optional
application/json Validation Error object

Validation failed

documentation_url string
required
errors array[object]
optional
items object
code string
required
field string
optional
index integer
optional
message string
optional
resource string
optional
value
optional
message string
required