POST
/user/emailsAdd an email address for the authenticated user
OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
emailsarray<string>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.
201Response
emailstringrequired
primarybooleanrequired
verifiedbooleanrequired
visibilitystringrequired
304Not modified
401Requires authentication
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
Error handling
A 401 is returned: Requires authentication. A 403 is returned: Forbidden. A 404 is returned: Resource not found. A 422 is returned: Validation failed, or the endpoint has been spammed.
Was this helpful?