| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Use the REST API to manage email addresses of authenticated users.
If a request URL does not include a {username} parameter then the response will be for the signed-in user (and you must pass authentication information with your request). Additional private information, such as whether a user has two-factor authentication enabled, is included when authenticated through OAuth with the user scope.
Sets the visibility for your primary email addresses.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
visibility string Required Denotes whether an email is publicly visible. Can be one of: public, private |
| Status code | Description |
|---|---|
| 200 | OK |
| 304 | Not modified |
| 401 | Requires authentication |
| 403 | Forbidden |
| 404 | Resource not found |
| 422 | Validation failed, or the endpoint has been spammed. |
Response
Lists all of your email addresses, and specifies which one is visible to the public.
OAuth app tokens and personal access tokens (classic) need the user:email scope to use this endpoint.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Default: 30 |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Default: 1 |
| Status code | Description |
|---|---|
| 200 | OK |
| 304 | Not modified |
| 401 | Requires authentication |
| 403 | Forbidden |
| 404 | Resource not found |
Response
OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
emails array of strings 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. |
| Status code | Description |
|---|---|
| 201 | Created |
| 304 | Not modified |
| 401 | Requires authentication |
| 403 | Forbidden |
| 404 | Resource not found |
| 422 | Validation failed, or the endpoint has been spammed. |
Response
OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
emails array of strings Required Email addresses associated with the GitHub user account. |
| Status code | Description |
|---|---|
| 204 | No Content |
| 304 | Not modified |
| 401 | Requires authentication |
| 403 | Forbidden |
| 404 | Resource not found |
| 422 | Validation failed, or the endpoint has been spammed. |
Response
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.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
This endpoint can be used without authentication or the aforementioned permissions if only public resources are requested.
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Default: 30 |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Default: 1 |
| Status code | Description |
|---|---|
| 200 | OK |
| 304 | Not modified |
| 401 | Requires authentication |
| 403 | Forbidden |
| 404 | Resource not found |
Response
| Back | FazBrowse Home | New Git URL |