Skip to content

GitHub: Users schemas

10 GitHub schemas with complete fields and constraints.

← Users operations · All schemas

Add an email address for the authenticated user — response body — item

FieldTypePresenceDescription and constraints
$objectRootEmail
emailstringRequired within parentFormat: email
primarybooleanRequired within parent
verifiedbooleanRequired within parent
visibilityJSONRequired within parent
visibility (anyOf 1)stringAlternative
visibility (anyOf 2)nullAlternative

Get a GPG key for the authenticated user — response body

FieldTypePresenceDescription and constraints
$objectRootA unique encryption key
can_certifybooleanRequired within parent
can_encrypt_commsbooleanRequired within parent
can_encrypt_storagebooleanRequired within parent
can_signbooleanRequired within parent
created_atstringRequired within parentFormat: date-time
emailsarrayRequired within parent
emails[]objectEach item
emails[].emailstringOptional
emails[].verifiedbooleanOptional
expires_atJSONRequired within parent
expires_at (anyOf 1)stringAlternativeFormat: date-time
expires_at (anyOf 2)nullAlternative
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
key_idstringRequired within parent
nameJSONOptional
name (anyOf 1)stringAlternative
name (anyOf 2)nullAlternative
primary_key_idJSONRequired within parent
primary_key_id (anyOf 1)JSONAlternative
primary_key_id (anyOf 1) (anyOf 1)integerAlternative
primary_key_id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
primary_key_id (anyOf 2)nullAlternative
public_keystringRequired within parent
raw_keyJSONRequired within parent
raw_key (anyOf 1)stringAlternative
raw_key (anyOf 2)nullAlternative
revokedbooleanRequired within parent
subkeysarrayRequired within parent
subkeys[]objectEach item
subkeys[].can_certifybooleanOptional
subkeys[].can_encrypt_commsbooleanOptional
subkeys[].can_encrypt_storagebooleanOptional
subkeys[].can_signbooleanOptional
subkeys[].created_atstringOptional
subkeys[].emailsarrayOptional
subkeys[].emails[]objectEach item
subkeys[].emails[].emailstringOptional
subkeys[].emails[].verifiedbooleanOptional
subkeys[].expires_atJSONOptional
subkeys[].expires_at (anyOf 1)stringAlternative
subkeys[].expires_at (anyOf 2)nullAlternative
subkeys[].idJSONOptional
subkeys[].id (anyOf 1)integerAlternativeFormat: int64
subkeys[].id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
subkeys[].key_idstringOptional
subkeys[].primary_key_idJSONOptional
subkeys[].primary_key_id (anyOf 1)integerAlternative
subkeys[].primary_key_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
subkeys[].public_keystringOptional
subkeys[].raw_keyJSONOptional
subkeys[].raw_key (anyOf 1)stringAlternative
subkeys[].raw_key (anyOf 2)nullAlternative
subkeys[].revokedbooleanOptional
subkeys[].subkeysarrayOptional
subkeys[].subkeys[]JSONEach item

Get a public SSH key for the authenticated user — response body

FieldTypePresenceDescription and constraints
$objectRootKey
created_atstringRequired within parentFormat: date-time
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
keystringRequired within parent
last_usedJSONOptional
last_used (anyOf 1)stringAlternativeFormat: date-time
last_used (anyOf 2)nullAlternative
read_onlybooleanRequired within parent
titlestringRequired within parent
urlstringRequired within parent
verifiedbooleanRequired within parent

Get a user — response body — Public User

FieldTypePresenceDescription and constraints
$objectRootPublic User
Additional keys: not allowed
avatar_urlstringRequired within parentFormat: uri
bioJSONRequired within parent
bio (anyOf 1)stringAlternative
bio (anyOf 2)nullAlternative
blogJSONRequired within parent
blog (anyOf 1)stringAlternative
blog (anyOf 2)nullAlternative
collaboratorsJSONOptional
collaborators (anyOf 1)integerAlternative
collaborators (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
companyJSONRequired within parent
company (anyOf 1)stringAlternative
company (anyOf 2)nullAlternative
created_atstringRequired within parentFormat: date-time
disk_usageJSONOptional
disk_usage (anyOf 1)integerAlternative
disk_usage (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
emailJSONRequired within parent
email (anyOf 1)stringAlternativeFormat: email
email (anyOf 2)nullAlternative
events_urlstringRequired within parent
followersJSONRequired within parent
followers (anyOf 1)integerAlternative
followers (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
followers_urlstringRequired within parentFormat: uri
followingJSONRequired within parent
following (anyOf 1)integerAlternative
following (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
following_urlstringRequired within parent
gists_urlstringRequired within parent
gravatar_idJSONRequired within parent
gravatar_id (anyOf 1)stringAlternative
gravatar_id (anyOf 2)nullAlternative
hireableJSONRequired within parent
hireable (anyOf 1)booleanAlternative
hireable (anyOf 2)nullAlternative
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
locationJSONRequired within parent
location (anyOf 1)stringAlternative
location (anyOf 2)nullAlternative
loginstringRequired within parent
nameJSONRequired within parent
name (anyOf 1)stringAlternative
name (anyOf 2)nullAlternative
node_idstringRequired within parent
notification_emailJSONOptional
notification_email (anyOf 1)stringAlternativeFormat: email
notification_email (anyOf 2)nullAlternative
organizations_urlstringRequired within parentFormat: uri
owned_private_reposJSONOptional
owned_private_repos (anyOf 1)integerAlternative
owned_private_repos (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
planobjectOptional
plan.collaboratorsJSONRequired within parent
plan.collaborators (anyOf 1)integerAlternative
plan.collaborators (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
plan.namestringRequired within parent
plan.private_reposJSONRequired within parent
plan.private_repos (anyOf 1)integerAlternative
plan.private_repos (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
plan.spaceJSONRequired within parent
plan.space (anyOf 1)integerAlternative
plan.space (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
private_gistsJSONOptional
private_gists (anyOf 1)integerAlternative
private_gists (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
public_gistsJSONRequired within parent
public_gists (anyOf 1)integerAlternative
public_gists (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
public_reposJSONRequired within parent
public_repos (anyOf 1)integerAlternative
public_repos (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
received_events_urlstringRequired within parentFormat: uri
repos_urlstringRequired within parentFormat: uri
site_adminbooleanRequired within parent
starred_urlstringRequired within parent
subscriptions_urlstringRequired within parentFormat: uri
total_private_reposJSONOptional
total_private_repos (anyOf 1)integerAlternative
total_private_repos (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
twitter_usernameJSONOptional
twitter_username (anyOf 1)stringAlternative
twitter_username (anyOf 2)nullAlternative
typestringRequired within parent
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri
user_view_typestringOptional

Get an SSH signing key for the authenticated user — response body

FieldTypePresenceDescription and constraints
$objectRootA public SSH key used to sign Git commits
created_atstringRequired within parentFormat: date-time
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
keystringRequired within parent
titlestringRequired within parent

Get contextual information for a user — response body

FieldTypePresenceDescription and constraints
$objectRootHovercard
contextsarrayRequired within parent
contexts[]objectEach item
contexts[].messagestringRequired within parent
contexts[].octiconstringRequired within parent

List public keys for a user — response body — item

FieldTypePresenceDescription and constraints
$objectRootKey Simple
created_atstringOptionalFormat: date-time
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
keystringRequired within parent
last_usedJSONOptional
last_used (anyOf 1)stringAlternativeFormat: date-time
last_used (anyOf 2)nullAlternative

List social accounts for a user — response body — item

FieldTypePresenceDescription and constraints
$objectRootSocial media account
providerstringRequired within parent
urlstringRequired within parent

List users — response body — item

FieldTypePresenceDescription and constraints
$objectRootA GitHub user.
avatar_urlstringRequired within parentFormat: uri
emailJSONOptional
email (anyOf 1)stringAlternative
email (anyOf 2)nullAlternative
events_urlstringRequired within parent
followers_urlstringRequired within parentFormat: uri
following_urlstringRequired within parent
gists_urlstringRequired within parent
gravatar_idJSONRequired within parent
gravatar_id (anyOf 1)stringAlternative
gravatar_id (anyOf 2)nullAlternative
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
loginstringRequired within parent
nameJSONOptional
name (anyOf 1)stringAlternative
name (anyOf 2)nullAlternative
node_idstringRequired within parent
organizations_urlstringRequired within parentFormat: uri
received_events_urlstringRequired within parentFormat: uri
repos_urlstringRequired within parentFormat: uri
site_adminbooleanRequired within parent
starred_atstringOptional
starred_urlstringRequired within parent
subscriptions_urlstringRequired within parentFormat: uri
typestringRequired within parent
urlstringRequired within parentFormat: uri
user_view_typestringOptional

Update the authenticated user — response body

FieldTypePresenceDescription and constraints
$objectRootPrivate User
avatar_urlstringRequired within parentFormat: uri
bioJSONRequired within parent
bio (anyOf 1)stringAlternative
bio (anyOf 2)nullAlternative
blogJSONRequired within parent
blog (anyOf 1)stringAlternative
blog (anyOf 2)nullAlternative
business_plusbooleanOptional
collaboratorsJSONRequired within parent
collaborators (anyOf 1)integerAlternative
collaborators (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
companyJSONRequired within parent
company (anyOf 1)stringAlternative
company (anyOf 2)nullAlternative
created_atstringRequired within parentFormat: date-time
disk_usageJSONRequired within parent
disk_usage (anyOf 1)integerAlternative
disk_usage (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
emailJSONRequired within parent
email (anyOf 1)stringAlternativeFormat: email
email (anyOf 2)nullAlternative
events_urlstringRequired within parent
followersJSONRequired within parent
followers (anyOf 1)integerAlternative
followers (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
followers_urlstringRequired within parentFormat: uri
followingJSONRequired within parent
following (anyOf 1)integerAlternative
following (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
following_urlstringRequired within parent
gists_urlstringRequired within parent
gravatar_idJSONRequired within parent
gravatar_id (anyOf 1)stringAlternative
gravatar_id (anyOf 2)nullAlternative
hireableJSONRequired within parent
hireable (anyOf 1)booleanAlternative
hireable (anyOf 2)nullAlternative
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
ldap_dnstringOptional
locationJSONRequired within parent
location (anyOf 1)stringAlternative
location (anyOf 2)nullAlternative
loginstringRequired within parent
nameJSONRequired within parent
name (anyOf 1)stringAlternative
name (anyOf 2)nullAlternative
node_idstringRequired within parent
notification_emailJSONOptional
notification_email (anyOf 1)stringAlternativeFormat: email
notification_email (anyOf 2)nullAlternative
organizations_urlstringRequired within parentFormat: uri
owned_private_reposJSONRequired within parent
owned_private_repos (anyOf 1)integerAlternative
owned_private_repos (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
planobjectOptional
plan.collaboratorsJSONRequired within parent
plan.collaborators (anyOf 1)integerAlternative
plan.collaborators (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
plan.namestringRequired within parent
plan.private_reposJSONRequired within parent
plan.private_repos (anyOf 1)integerAlternative
plan.private_repos (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
plan.spaceJSONRequired within parent
plan.space (anyOf 1)integerAlternative
plan.space (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
private_gistsJSONRequired within parent
private_gists (anyOf 1)integerAlternative
private_gists (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
public_gistsJSONRequired within parent
public_gists (anyOf 1)integerAlternative
public_gists (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
public_reposJSONRequired within parent
public_repos (anyOf 1)integerAlternative
public_repos (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
received_events_urlstringRequired within parentFormat: uri
repos_urlstringRequired within parentFormat: uri
site_adminbooleanRequired within parent
starred_urlstringRequired within parent
subscriptions_urlstringRequired within parentFormat: uri
total_private_reposJSONRequired within parent
total_private_repos (anyOf 1)integerAlternative
total_private_repos (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
twitter_usernameJSONOptional
twitter_username (anyOf 1)stringAlternative
twitter_username (anyOf 2)nullAlternative
two_factor_authenticationbooleanRequired within parent
typestringRequired within parent
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri
user_view_typestringOptional

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.