Skip to main content

public_emails

Creates, updates, deletes, gets or lists a public_emails resource.

Overview

Namepublic_emails
TypeResource
Idgithub.users.public_emails

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
emailstring (email) (example: octocat@github.com)
primaryboolean
verifiedboolean
visibilitystring (example: public)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_public_emails_for_authenticated_userselectper_page, pageLists your publicly visible email address, which you can set with the
Set primary email visibility for the authenticated user
endpoint.

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

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

Lists your publicly visible email address, which you can set with the
Set primary email visibility for the authenticated user
endpoint.

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

SELECT
email,
primary,
verified,
visibility
FROM github.users.public_emails
WHERE per_page = '{{ per_page }}'
AND page = '{{ page }}'
;