DELETE/user/emails

Delete email addresses from the authenticated user's account

Removes one or more email addresses from the authenticated user's account. Supply at least one address in emails; the request can also be a direct email string or array instead of an object. OAuth app tokens and personal access tokens (classic) need the user scope.

1 body field

Email addresses to remove. Send an object with an emails array, a direct array, or a single email string.

emailsarray<string>required
Email addresses associated with the GitHub user account.

6 status codes
204Confirms that the email address or addresses were removed.
304Indicates that the resource has not changed.
401Returned when authentication is required but missing or invalid.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Returned when access to the operation is forbidden.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Returned when the resource is not found.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Returned when validation fails or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional

Error handling

A 401 is returned when authentication is missing or invalid. A 403 is returned when access is forbidden, including when an OAuth app token or personal access token (classic) lacks the user scope. A 404 indicates the resource was not found, and a 422 is returned when validation fails or the endpoint has been spammed; provide at least one address in emails when using the object form.