Skip to content

Get contextual information for a user

GET
/users/{username}/hovercard

Provides hovercard information. 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, you would use a subject_type value of repository and a subject_id value of 1300192 (the ID of the Spoon-Knife repository).

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.

API method documentation

username
required
string

The handle for the GitHub user account.

subject_type
string
Allowed values: organization repository issue pull_request

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.

subject_id
string

Uses the ID for the subject_type you specified. Required when using subject_type.

Response

Media type application/json
Hovercard

Hovercard

object
contexts
required
Array<object>
object
message
required
string
octicon
required
string
Examples
Example default
{
"contexts": [
{
"message": "Owns this repository",
"octicon": "repo"
}
]
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Validation failed, or the endpoint has been spammed.

Media type application/json
Validation Error

Validation Error

object
message
required
string
documentation_url
required
string
errors
Array<object>
object
resource
string
field
string
message
string
code
required
string
index
integer
value
One of:
string
nullable
Example generated
{
"message": "example",
"documentation_url": "example",
"errors": [
{
"resource": "example",
"field": "example",
"message": "example",
"code": "example",
"index": 1,
"value": [
"example"
]
}
]
}