Users
Download SpecInteract with and view information about users and also current user.
Get the authenticated user
If the authenticated user is authenticated with an OAuth token with the user
scope, then the response lists public and private profile information.
If the authenticated user is authenticated through OAuth without the user
scope, then the response lists only public profile information.
Response
Response
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"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",
"site_admin": false,
"name": "monalisa octocat",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"hireable": false,
"bio": "There once was...",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"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,
"plan": {
"name": "Medium",
"space": 400,
"private_repos": 20,
"collaborators": 0
}
}
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"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",
"site_admin": false,
"name": "monalisa octocat",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"hireable": false,
"bio": "There once was...",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2008-01-14T04:33:35Z"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
One Of
- Content Type
- application/json
Private User
object (Private User)
Private User
- Content Type
- application/json
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
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}"
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"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
name
string or null
required
- Example
- "monalisa octocat"
company
string or null
required
- Example
- "GitHub"
blog
string or null
required
- Example
- "https://github.com/blog"
location
string or null
required
- Example
- "San Francisco"
string or null
required
- Example
- "octocat@github.com"
hireable
boolean or null
required
bio
string or null
required
- Example
- "There once was..."
twitter_username
string or null
- Example
- "monalisa"
public_repos
int
required
- Example
- 2
public_gists
int
required
- Example
- 1
followers
int
required
- Example
- 20
following
int
required
- Example
- 0
created_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
updated_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
private_gists
int
required
- Example
- 81
total_private_repos
int
required
- Example
- 100
owned_private_repos
int
required
- Example
- 100
disk_usage
int
required
- Example
- 10000
collaborators
int
required
- Example
- 8
two_factor_authentication
boolean
required
- Example
- true
plan
object (plan)
collaborators
int
required
name
string
required
space
int
required
private_repos
int
required
suspended_at
string or null
date-time
business_plus
boolean
ldap_dn
string
Public User
object (Public User)
Public User
- Content Type
- application/json
login
string
required
id
int
required
node_id
string
required
avatar_url
string
uri
required
gravatar_id
string or null
required
url
string
uri
required
html_url
string
uri
required
followers_url
string
uri
required
following_url
string
required
gists_url
string
required
starred_url
string
required
subscriptions_url
string
uri
required
organizations_url
string
uri
required
repos_url
string
uri
required
events_url
string
required
received_events_url
string
uri
required
type
string
required
site_admin
boolean
required
name
string or null
required
company
string or null
required
blog
string or null
required
location
string or null
required
string or null
required
hireable
boolean or null
required
bio
string or null
required
twitter_username
string or null
public_repos
int
required
public_gists
int
required
followers
int
required
following
int
required
created_at
string
date-time
required
updated_at
string
date-time
required
plan
object (plan)
collaborators
int
required
name
string
required
space
int
required
private_repos
int
required
suspended_at
string or null
date-time
private_gists
int
- Example
- 1
total_private_repos
int
- Example
- 2
owned_private_repos
int
- Example
- 2
disk_usage
int
- Example
- 1
collaborators
int
- Example
- 3
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.
name
string
The new name of the user.
- Example
- "Omar Jahandar"
string
The publicly visible email address of the user.
- Example
- "omar@example.com"
blog
string
The new blog URL of the user.
- Example
- "blog.example.com"
twitter_username
string or null
The new Twitter username of the user.
- Example
- "therealomarj"
company
string
The new company of the user.
- Example
- "Acme corporation"
location
string
The new location of the user.
- Example
- "Berlin, Germany"
hireable
boolean
The new hiring availability of the user.
bio
string
The new short biography of the user.
Request
{
"blog": "https://github.com/blog",
"name": "monalisa octocat"
}
Response
Response
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"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",
"site_admin": false,
"name": "monalisa octocat",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"hireable": false,
"bio": "There once was...",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"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,
"plan": {
"name": "Medium",
"space": 400,
"private_repos": 20,
"collaborators": 0
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
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}"
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"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
name
string or null
required
- Example
- "monalisa octocat"
company
string or null
required
- Example
- "GitHub"
blog
string or null
required
- Example
- "https://github.com/blog"
location
string or null
required
- Example
- "San Francisco"
string or null
required
- Example
- "octocat@github.com"
hireable
boolean or null
required
bio
string or null
required
- Example
- "There once was..."
twitter_username
string or null
- Example
- "monalisa"
public_repos
int
required
- Example
- 2
public_gists
int
required
- Example
- 1
followers
int
required
- Example
- 20
following
int
required
- Example
- 0
created_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
updated_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
private_gists
int
required
- Example
- 81
total_private_repos
int
required
- Example
- 100
owned_private_repos
int
required
- Example
- 100
disk_usage
int
required
- Example
- 10000
collaborators
int
required
- Example
- 8
two_factor_authentication
boolean
required
- Example
- true
plan
object (plan)
collaborators
int
required
name
string
required
space
int
required
private_repos
int
required
suspended_at
string or null
date-time
business_plus
boolean
ldap_dn
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
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.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
[
{
"email": "octocat@github.com",
"verified": true,
"primary": true,
"visibility": "public"
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (Email)]
- Content Type
- application/json
object (Email)
string
required
- Example
- "octocat@github.com"
primary
boolean
required
- Example
- true
verified
boolean
required
- Example
- true
visibility
string or null
required
- Example
- "public"
Link
string
Add an email address for the authenticated user
This endpoint is accessible with the user
scope.
One Of
- Content Type
- application/json
object
- Content Type
- application/json
- Example
- { "emails": [ "octocat@github.com", "mona@github.com" ] }
emails
array[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.
- Example
- []
string
- Example
- "username@example.com"
array[string]
- Content Type
- application/json
string
- Example
- "username@example.com"
string
- Content Type
- application/json
Request
{
"emails": [
"octocat@github.com",
"mona@github.com",
"octocat@octocat.org"
]
}
Response
Response
[
{
"email": "octocat@octocat.org",
"primary": false,
"verified": false,
"visibility": "public"
},
{
"email": "octocat@github.com",
"primary": false,
"verified": false,
"visibility": null
},
{
"email": "mona@github.com",
"primary": false,
"verified": false,
"visibility": null
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
array[object (Email)]
- Content Type
- application/json
object (Email)
string
required
- Example
- "octocat@github.com"
primary
boolean
required
- Example
- true
verified
boolean
required
- Example
- true
visibility
string or null
required
- Example
- "public"
Delete an email address for the authenticated user
This endpoint is accessible with the user
scope.
One Of
- Content Type
- application/json
object
Deletes one or more email addresses from 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.
- Content Type
- application/json
- Example
- { "emails": [ "octocat@github.com", "mona@github.com" ] }
emails
array[string]
required
Email addresses associated with the GitHub user account.
string
- Example
- "username@example.com"
array[string]
- Content Type
- application/json
string
- Example
- "username@example.com"
string
- Content Type
- application/json
Request
{
"emails": [
"octocat@github.com",
"mona@github.com"
]
}
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
List followers of the authenticated user
Lists the people following the authenticated user.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"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",
"site_admin": false
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (Simple User)]
- Content Type
- application/json
Simple User
object (Simple User)
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
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}"
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"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
Link
string
List the people the authenticated user follows
Lists the people who the authenticated user follows.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"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",
"site_admin": false
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (Simple User)]
- Content Type
- application/json
Simple User
object (Simple User)
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
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}"
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"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
Link
string
username
string
required
The handle for the GitHub user account.
Response
if the person is followed by the authenticated user
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
if the person is not followed by the authenticated user
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Not modified
Empty response
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Follow a user
Note that you'll need to set Content-Length
to zero when calling out to this endpoint. For more information, see "HTTP verbs."
Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow
scope.
username
string
required
The handle for the GitHub user account.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Unfollow a user
Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow
scope.
username
string
required
The handle for the GitHub user account.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
List GPG keys for the authenticated user
Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least read:gpg_key
scope.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
[
{
"id": 3,
"name": "Octocat's GPG Key",
"primary_key_id": 2,
"key_id": "3262EFF25BA0D270",
"public_key": "xsBNBFayYZ...",
"emails": [
{
"email": "octocat@users.noreply.github.com",
"verified": true
}
],
"subkeys": [
{
"id": 4,
"primary_key_id": 3,
"key_id": "4A595D4C72EE49C7",
"public_key": "zsBNBFayYZ...",
"emails": [],
"can_sign": false,
"can_encrypt_comms": true,
"can_encrypt_storage": true,
"can_certify": false,
"created_at": "2016-03-24T11:31:04-06:00",
"expires_at": "2016-03-24T11:31:04-07:00",
"revoked": false
}
],
"can_sign": true,
"can_encrypt_comms": false,
"can_encrypt_storage": false,
"can_certify": true,
"created_at": "2016-03-24T11:31:04-06:00",
"expires_at": "2016-03-24T11:31:04-07:00",
"revoked": false,
"raw_key": "string"
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (GPG Key)]
- Content Type
- application/json
GPG Key
object (GPG Key)
A unique encryption key
id
int
required
- Example
- 3
name
string or null
- Example
- "Octocat's GPG Key"
primary_key_id
int or null
required
key_id
string
required
- Example
- "3262EFF25BA0D270"
public_key
string
required
- Example
- "xsBNBFayYZ..."
emails
array[object]
required
- Example
- [ { "email": "octocat@users.noreply.github.com", "verified": true } ]
object
string
verified
boolean
subkeys
array[object]
required
- Example
- [ { "id": 4, "primary_key_id": 3, "key_id": "4A595D4C72EE49C7", "public_key": "zsBNBFayYZ...", "emails": [], "can_sign": false, "can_encrypt_comms": true, "can_encrypt_storage": true, "can_certify": false, "created_at": "2016-03-24T11:31:04-06:00", "expires_at": null, "revoked": false } ]
object
id
int
primary_key_id
int
key_id
string
public_key
string
emails
array[object]
object
string
verified
boolean
subkeys
array[]
can_sign
boolean
can_encrypt_comms
boolean
can_encrypt_storage
boolean
can_certify
boolean
created_at
string
expires_at
string or null
raw_key
string or null
revoked
boolean
can_sign
boolean
required
- Example
- true
can_encrypt_comms
boolean
required
can_encrypt_storage
boolean
required
can_certify
boolean
required
- Example
- true
created_at
string
date-time
required
- Example
- "2016-03-24T11:31:04-06:00"
expires_at
string or null
date-time
required
revoked
boolean
required
- Example
- true
raw_key
string or null
required
Link
string
Create a GPG key for the authenticated user
Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least write:gpg_key
scope.
name
string
A descriptive name for the new key.
armored_public_key
string
required
A GPG key in ASCII-armored format.
Request
{
"name": "Octocat's GPG Key",
"armored_public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG v1\n\nmQINBFnZ2ZIBEADQ2Z7Z7\n-----END PGP PUBLIC KEY BLOCK-----"
}
Response
Response
{
"id": 3,
"name": "Octocat's GPG Key",
"primary_key_id": 2,
"key_id": "3262EFF25BA0D270",
"public_key": "xsBNBFayYZ...",
"emails": [
{
"email": "octocat@users.noreply.github.com",
"verified": true
}
],
"subkeys": [
{
"id": 4,
"primary_key_id": 3,
"key_id": "4A595D4C72EE49C7",
"public_key": "zsBNBFayYZ...",
"emails": [],
"can_sign": false,
"can_encrypt_comms": true,
"can_encrypt_storage": true,
"can_certify": false,
"created_at": "2016-03-24T11:31:04-06:00",
"expires_at": "2016-03-24T11:31:04-07:00",
"revoked": false
}
],
"can_sign": true,
"can_encrypt_comms": false,
"can_encrypt_storage": false,
"can_certify": true,
"created_at": "2016-03-24T11:31:04-06:00",
"expires_at": "2016-03-24T11:31:04-07:00",
"revoked": false,
"raw_key": "\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\nVersion: GnuPG v2\\n\\n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\\nIts/HFYRLiFgDLmTlxo=\\n=+OzK\\n-----END PGP PUBLIC KEY BLOCK-----\""
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
id
int
required
- Example
- 3
name
string or null
- Example
- "Octocat's GPG Key"
primary_key_id
int or null
required
key_id
string
required
- Example
- "3262EFF25BA0D270"
public_key
string
required
- Example
- "xsBNBFayYZ..."
emails
array[object]
required
- Example
- [ { "email": "octocat@users.noreply.github.com", "verified": true } ]
object
string
verified
boolean
subkeys
array[object]
required
- Example
- [ { "id": 4, "primary_key_id": 3, "key_id": "4A595D4C72EE49C7", "public_key": "zsBNBFayYZ...", "emails": [], "can_sign": false, "can_encrypt_comms": true, "can_encrypt_storage": true, "can_certify": false, "created_at": "2016-03-24T11:31:04-06:00", "expires_at": null, "revoked": false } ]
object
id
int
primary_key_id
int
key_id
string
public_key
string
emails
array[object]
object
string
verified
boolean
subkeys
array[]
can_sign
boolean
can_encrypt_comms
boolean
can_encrypt_storage
boolean
can_certify
boolean
created_at
string
expires_at
string or null
raw_key
string or null
revoked
boolean
can_sign
boolean
required
- Example
- true
can_encrypt_comms
boolean
required
can_encrypt_storage
boolean
required
can_certify
boolean
required
- Example
- true
created_at
string
date-time
required
- Example
- "2016-03-24T11:31:04-06:00"
expires_at
string or null
date-time
required
revoked
boolean
required
- Example
- true
raw_key
string or null
required
Get a GPG key for the authenticated user
View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least read:gpg_key
scope.
gpg_key_id
int
required
The unique identifier of the GPG key.
Response
Response
{
"id": 3,
"name": "Octocat's GPG Key",
"primary_key_id": 2,
"key_id": "3262EFF25BA0D270",
"public_key": "xsBNBFayYZ...",
"emails": [
{
"email": "octocat@users.noreply.github.com",
"verified": true
}
],
"subkeys": [
{
"id": 4,
"primary_key_id": 3,
"key_id": "4A595D4C72EE49C7",
"public_key": "zsBNBFayYZ...",
"emails": [],
"can_sign": false,
"can_encrypt_comms": true,
"can_encrypt_storage": true,
"can_certify": false,
"created_at": "2016-03-24T11:31:04-06:00",
"expires_at": "2016-03-24T11:31:04-07:00",
"revoked": false
}
],
"can_sign": true,
"can_encrypt_comms": false,
"can_encrypt_storage": false,
"can_certify": true,
"created_at": "2016-03-24T11:31:04-06:00",
"expires_at": "2016-03-24T11:31:04-07:00",
"revoked": false,
"raw_key": "\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\nVersion: GnuPG v2\\n\\n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\\nIts/HFYRLiFgDLmTlxo=\\n=+OzK\\n-----END PGP PUBLIC KEY BLOCK-----\""
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Not modified
Empty response
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
id
int
required
- Example
- 3
name
string or null
- Example
- "Octocat's GPG Key"
primary_key_id
int or null
required
key_id
string
required
- Example
- "3262EFF25BA0D270"
public_key
string
required
- Example
- "xsBNBFayYZ..."
emails
array[object]
required
- Example
- [ { "email": "octocat@users.noreply.github.com", "verified": true } ]
object
string
verified
boolean
subkeys
array[object]
required
- Example
- [ { "id": 4, "primary_key_id": 3, "key_id": "4A595D4C72EE49C7", "public_key": "zsBNBFayYZ...", "emails": [], "can_sign": false, "can_encrypt_comms": true, "can_encrypt_storage": true, "can_certify": false, "created_at": "2016-03-24T11:31:04-06:00", "expires_at": null, "revoked": false } ]
object
id
int
primary_key_id
int
key_id
string
public_key
string
emails
array[object]
object
string
verified
boolean
subkeys
array[]
can_sign
boolean
can_encrypt_comms
boolean
can_encrypt_storage
boolean
can_certify
boolean
created_at
string
expires_at
string or null
raw_key
string or null
revoked
boolean
can_sign
boolean
required
- Example
- true
can_encrypt_comms
boolean
required
can_encrypt_storage
boolean
required
can_certify
boolean
required
- Example
- true
created_at
string
date-time
required
- Example
- "2016-03-24T11:31:04-06:00"
expires_at
string or null
date-time
required
revoked
boolean
required
- Example
- true
raw_key
string or null
required
Delete a GPG key for the authenticated user
Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:gpg_key
scope.
gpg_key_id
int
required
The unique identifier of the GPG key.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Not modified
Empty response
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
List public SSH keys for the authenticated user
Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least read:public_key
scope.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
[
{
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
"id": 2,
"url": "https://api.github.com/user/keys/2",
"title": "ssh-rsa AAAAB3NzaC1yc2EAAA",
"created_at": "2020-06-11T21:31:57Z",
"verified": false,
"read_only": false
},
{
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJy931234",
"id": 3,
"url": "https://api.github.com/user/keys/3",
"title": "ssh-rsa AAAAB3NzaC1yc2EAAB",
"created_at": "2020-07-11T21:31:57Z",
"verified": false,
"read_only": false
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (Key)]
- Content Type
- application/json
Key
object (Key)
Key
key
string
required
id
int
required
url
string
required
title
string
required
created_at
string
date-time
required
verified
boolean
required
read_only
boolean
required
Link
string
Create a public SSH key for the authenticated user
Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least write:public_key
scope.
title
string
A descriptive name for the new key.
- Example
- "Personal MacBook Air"
key
string
^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521)
required
The public SSH key to add to your GitHub account.
Request
{
"title": "ssh-rsa AAAAB3NzaC1yc2EAAA",
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234"
}
Response
Response
{
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
"id": 2,
"url": "https://api.github.com/user/keys/2",
"title": "ssh-rsa AAAAB3NzaC1yc2EAAA",
"created_at": "2020-06-11T21:31:57Z",
"verified": false,
"read_only": false
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
key
string
required
id
int
required
url
string
required
title
string
required
created_at
string
date-time
required
verified
boolean
required
read_only
boolean
required
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
Get a public SSH key for the authenticated user
View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least read:public_key
scope.
key_id
int
required
The unique identifier of the key.
Response
Response
{
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
"id": 2,
"url": "https://api.github.com/user/keys/2",
"title": "ssh-rsa AAAAB3NzaC1yc2EAAA",
"created_at": "2020-06-11T21:31:57Z",
"verified": false,
"read_only": false
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
key
string
required
id
int
required
url
string
required
title
string
required
created_at
string
date-time
required
verified
boolean
required
read_only
boolean
required
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Not modified
Empty response
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Delete a public SSH key for the authenticated user
Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:public_key
scope.
key_id
int
required
The unique identifier of the key.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
List public email addresses for the authenticated user
Lists your publicly visible email address, which you can set with the Set primary email visibility for the authenticated user endpoint. This endpoint is accessible with the user:email
scope.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
[
{
"email": "octocat@github.com",
"verified": true,
"primary": true,
"visibility": "public"
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (Email)]
- Content Type
- application/json
object (Email)
string
required
- Example
- "octocat@github.com"
primary
boolean
required
- Example
- true
verified
boolean
required
- Example
- true
visibility
string or null
required
- Example
- "public"
Link
string
List social accounts for the authenticated user
Lists all of your social accounts.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
[
{
"provider": "twitter",
"url": "https://twitter.com/github"
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (Social account)]
- Content Type
- application/json
Social account
object (Social account)
Social media account
provider
string
required
- Example
- "linkedin"
url
string
required
- Example
- "https://www.linkedin.com/company/github/"
Link
string
Add social accounts for the authenticated user
Add one or more social accounts to the authenticated user's profile. This endpoint is accessible with the user
scope.
account_urls
array[string]
required
Full URLs for the social media profiles to add.
- Example
- []
string
- Example
- "https://twitter.com/github"
Request
{
"account_urls": [
"https://facebook.com/GitHub",
"https://www.youtube.com/@GitHub"
]
}
Response
Response
[
{
"provider": "twitter",
"url": "https://twitter.com/github"
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
array[object (Social account)]
- Content Type
- application/json
Social account
object (Social account)
Social media account
provider
string
required
- Example
- "linkedin"
url
string
required
- Example
- "https://www.linkedin.com/company/github/"
Delete social accounts for the authenticated user
Deletes one or more social accounts from the authenticated user's profile. This endpoint is accessible with the user
scope.
account_urls
array[string]
required
Full URLs for the social media profiles to delete.
- Example
- []
string
- Example
- "https://twitter.com/github"
Request
{
"account_urls": [
"https://facebook.com/GitHub",
"https://www.youtube.com/@GitHub"
]
}
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
List SSH signing keys for the authenticated user
Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least read:ssh_signing_key
scope. For more information, see "Understanding scopes for OAuth apps."
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
[
{
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
"id": 2,
"url": "https://api.github.com/user/keys/2",
"title": "ssh-rsa AAAAB3NzaC1yc2EAAA",
"created_at": "2020-06-11T21:31:57Z"
},
{
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJy931234",
"id": 3,
"url": "https://api.github.com/user/keys/3",
"title": "ssh-rsa AAAAB3NzaC1yc2EAAB",
"created_at": "2020-07-11T21:31:57Z"
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (SSH Signing Key)]
- Content Type
- application/json
SSH Signing Key
object (SSH Signing Key)
A public SSH key used to sign Git commits
key
string
required
id
int
required
title
string
required
created_at
string
date-time
required
Link
string
Create a SSH signing key for the authenticated user
Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least write:ssh_signing_key
scope. For more information, see "Understanding scopes for OAuth apps."
title
string
A descriptive name for the new key.
- Example
- "Personal MacBook Air"
key
string
^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) |^(sk-ssh-ed25519|sk-ecdsa-sha2-nistp256)@openssh.com
required
The public SSH key to add to your GitHub account. For more information, see "Checking for existing SSH keys."
Request
{
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
"title": "ssh-rsa AAAAB3NzaC1yc2EAAA"
}
Response
Response
{
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
"id": 2,
"url": "https://api.github.com/user/keys/2",
"title": "ssh-rsa AAAAB3NzaC1yc2EAAA",
"created_at": "2020-06-11T21:31:57Z"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
key
string
required
id
int
required
title
string
required
created_at
string
date-time
required
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
Get an SSH signing key for the authenticated user
Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least read:ssh_signing_key
scope. For more information, see "Understanding scopes for OAuth apps."
ssh_signing_key_id
int
required
The unique identifier of the SSH signing key.
Response
Response
{
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
"id": 2,
"url": "https://api.github.com/user/keys/2",
"title": "ssh-rsa AAAAB3NzaC1yc2EAAA",
"created_at": "2020-06-11T21:31:57Z"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
key
string
required
id
int
required
title
string
required
created_at
string
date-time
required
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Not modified
Empty response
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Delete an SSH signing key for the authenticated user
Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least admin:ssh_signing_key
scope. For more information, see "Understanding scopes for OAuth apps."
ssh_signing_key_id
int
required
The unique identifier of the SSH signing key.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Requires authentication
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
List users
Lists all users, in the order that they signed up on GitHub Enterprise Server. This list includes personal user accounts and organization accounts.
Note: Pagination is powered exclusively by the since
parameter. Use the Link header to get the URL for the next page of users.
since
int
A user ID. Only return users with an ID greater than this ID.
per_page
int
The number of results per page (max 100).
- Default
- 30
Response
Response
[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"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",
"site_admin": false
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Not modified
Empty response
array[object (Simple User)]
- Content Type
- application/json
Simple User
object (Simple User)
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
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}"
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"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
Link
string
Get a user
Provides publicly available information about someone with a GitHub account.
GitHub Apps with the Plan
user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See "Identifying and authorizing users for GitHub Apps" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server plan information' below"
The email
key in the following response is the publicly visible email address from your GitHub Enterprise Server profile page. When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for email
, then it will have a value of null
. You only see publicly visible email addresses when authenticated with GitHub Enterprise Server. For more information, see Authentication.
The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "Emails API".
username
string
required
The handle for the GitHub user account.
Response
Response
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"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",
"site_admin": false,
"name": "monalisa octocat",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"hireable": false,
"bio": "There once was...",
"twitter_username": "monatheoctocat",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2008-01-14T04:33:35Z"
}
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"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",
"site_admin": false,
"name": "monalisa octocat",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"hireable": false,
"bio": "There once was...",
"twitter_username": "monatheoctocat",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2008-01-14T04:33:35Z",
"plan": {
"name": "pro",
"space": 976562499,
"collaborators": 0,
"private_repos": 9999
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
One Of
- Content Type
- application/json
Private User
object (Private User)
Private User
- Content Type
- application/json
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
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}"
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"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
name
string or null
required
- Example
- "monalisa octocat"
company
string or null
required
- Example
- "GitHub"
blog
string or null
required
- Example
- "https://github.com/blog"
location
string or null
required
- Example
- "San Francisco"
string or null
required
- Example
- "octocat@github.com"
hireable
boolean or null
required
bio
string or null
required
- Example
- "There once was..."
twitter_username
string or null
- Example
- "monalisa"
public_repos
int
required
- Example
- 2
public_gists
int
required
- Example
- 1
followers
int
required
- Example
- 20
following
int
required
- Example
- 0
created_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
updated_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
private_gists
int
required
- Example
- 81
total_private_repos
int
required
- Example
- 100
owned_private_repos
int
required
- Example
- 100
disk_usage
int
required
- Example
- 10000
collaborators
int
required
- Example
- 8
two_factor_authentication
boolean
required
- Example
- true
plan
object (plan)
collaborators
int
required
name
string
required
space
int
required
private_repos
int
required
suspended_at
string or null
date-time
business_plus
boolean
ldap_dn
string
Public User
object (Public User)
Public User
- Content Type
- application/json
login
string
required
id
int
required
node_id
string
required
avatar_url
string
uri
required
gravatar_id
string or null
required
url
string
uri
required
html_url
string
uri
required
followers_url
string
uri
required
following_url
string
required
gists_url
string
required
starred_url
string
required
subscriptions_url
string
uri
required
organizations_url
string
uri
required
repos_url
string
uri
required
events_url
string
required
received_events_url
string
uri
required
type
string
required
site_admin
boolean
required
name
string or null
required
company
string or null
required
blog
string or null
required
location
string or null
required
string or null
required
hireable
boolean or null
required
bio
string or null
required
twitter_username
string or null
public_repos
int
required
public_gists
int
required
followers
int
required
following
int
required
created_at
string
date-time
required
updated_at
string
date-time
required
plan
object (plan)
collaborators
int
required
name
string
required
space
int
required
private_repos
int
required
suspended_at
string or null
date-time
private_gists
int
- Example
- 1
total_private_repos
int
- Example
- 2
owned_private_repos
int
- Example
- 2
disk_usage
int
- Example
- 1
collaborators
int
- Example
- 3
List followers of a user
Lists the people following the specified user.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
username
string
required
The handle for the GitHub user account.
Response
Response
[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"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",
"site_admin": false
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (Simple User)]
- Content Type
- application/json
Simple User
object (Simple User)
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
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}"
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"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
Link
string
List the people a user follows
Lists the people who the specified user follows.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
username
string
required
The handle for the GitHub user account.
Response
Response
[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"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",
"site_admin": false
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (Simple User)]
- Content Type
- application/json
Simple User
object (Simple User)
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
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}"
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"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
Link
string
username
string
required
The handle for the GitHub user account.
target_user
string
required
Response
if the user follows the target user
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
if the user does not follow the target user
Empty response
List GPG keys for a user
Lists the GPG keys for a user. This information is accessible by anyone.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
username
string
required
The handle for the GitHub user account.
Response
Response
[
{
"id": 3,
"name": "Octocat's GPG Key",
"primary_key_id": 2,
"key_id": "3262EFF25BA0D270",
"public_key": "xsBNBFayYZ...",
"emails": [
{
"email": "octocat@users.noreply.github.com",
"verified": true
}
],
"subkeys": [
{
"id": 4,
"primary_key_id": 3,
"key_id": "4A595D4C72EE49C7",
"public_key": "zsBNBFayYZ...",
"emails": [],
"can_sign": false,
"can_encrypt_comms": true,
"can_encrypt_storage": true,
"can_certify": false,
"created_at": "2016-03-24T11:31:04-06:00",
"expires_at": "2016-03-24T11:31:04-07:00",
"revoked": false
}
],
"can_sign": true,
"can_encrypt_comms": false,
"can_encrypt_storage": false,
"can_certify": true,
"created_at": "2016-03-24T11:31:04-06:00",
"expires_at": "2016-03-24T11:31:04-07:00",
"revoked": false,
"raw_key": "string"
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (GPG Key)]
- Content Type
- application/json
GPG Key
object (GPG Key)
A unique encryption key
id
int
required
- Example
- 3
name
string or null
- Example
- "Octocat's GPG Key"
primary_key_id
int or null
required
key_id
string
required
- Example
- "3262EFF25BA0D270"
public_key
string
required
- Example
- "xsBNBFayYZ..."
emails
array[object]
required
- Example
- [ { "email": "octocat@users.noreply.github.com", "verified": true } ]
object
string
verified
boolean
subkeys
array[object]
required
- Example
- [ { "id": 4, "primary_key_id": 3, "key_id": "4A595D4C72EE49C7", "public_key": "zsBNBFayYZ...", "emails": [], "can_sign": false, "can_encrypt_comms": true, "can_encrypt_storage": true, "can_certify": false, "created_at": "2016-03-24T11:31:04-06:00", "expires_at": null, "revoked": false } ]
object
id
int
primary_key_id
int
key_id
string
public_key
string
emails
array[object]
object
string
verified
boolean
subkeys
array[]
can_sign
boolean
can_encrypt_comms
boolean
can_encrypt_storage
boolean
can_certify
boolean
created_at
string
expires_at
string or null
raw_key
string or null
revoked
boolean
can_sign
boolean
required
- Example
- true
can_encrypt_comms
boolean
required
can_encrypt_storage
boolean
required
can_certify
boolean
required
- Example
- true
created_at
string
date-time
required
- Example
- "2016-03-24T11:31:04-06:00"
expires_at
string or null
date-time
required
revoked
boolean
required
- Example
- true
raw_key
string or null
required
Link
string
Get contextual information for a user
Provides hovercard information when authenticated through basic auth or OAuth with the repo
scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.
The subject_type
and subject_id
parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about octocat
who owns the Spoon-Knife
repository via cURL, it would look like this:
curl -u username:token
https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192
subject_type
string
Identifies which additional information you'd like to receive about the person's hovercard. Can be organization
, repository
, issue
, pull_request
. Required when using subject_id
.
- Enum
-
- organization
- repository
- issue
- pull_request
subject_id
string
Uses the ID for the subject_type
you specified. Required when using subject_type
.
username
string
required
The handle for the GitHub user account.
Response
Response
{
"contexts": [
{
"message": "Owns this repository",
"octicon": "repo"
}
]
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
contexts
array[object]
required
object
message
string
required
octicon
string
required
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
List public keys for a user
Lists the verified public SSH keys for a user. This is accessible by anyone.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
username
string
required
The handle for the GitHub user account.
Response
Response
[
{
"id": 1,
"key": "ssh-rsa AAA..."
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (Key Simple)]
- Content Type
- application/json
Key Simple
object (Key Simple)
Key Simple
id
int
required
key
string
required
Link
string
List social accounts for a user
Lists social media accounts for a user. This endpoint is accessible by anyone.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
username
string
required
The handle for the GitHub user account.
Response
Response
[
{
"provider": "twitter",
"url": "https://twitter.com/github"
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (Social account)]
- Content Type
- application/json
Social account
object (Social account)
Social media account
provider
string
required
- Example
- "linkedin"
url
string
required
- Example
- "https://www.linkedin.com/company/github/"
Link
string
List SSH signing keys for a user
Lists the SSH signing keys for a user. This operation is accessible by anyone.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
username
string
required
The handle for the GitHub user account.
Response
Response
[
{
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
"id": 2,
"url": "https://api.github.com/user/keys/2",
"title": "ssh-rsa AAAAB3NzaC1yc2EAAA",
"created_at": "2020-06-11T21:31:57Z"
},
{
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJy931234",
"id": 3,
"url": "https://api.github.com/user/keys/3",
"title": "ssh-rsa AAAAB3NzaC1yc2EAAB",
"created_at": "2020-07-11T21:31:57Z"
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (SSH Signing Key)]
- Content Type
- application/json
SSH Signing Key
object (SSH Signing Key)
A public SSH key used to sign Git commits
key
string
required
id
int
required
title
string
required
created_at
string
date-time
required
Link
string
Was this page helpful?