v1

latestSwagger 2.0Apache 2.02026-07-1334102.9 MB
Users

Add a New Email Address

Adds a new unconfirmed email address to the user's account. Once added, the system will send a confirmation email to the specified address.

Returns

Returns a JSON object with a data key containing the newly added (unconfirmed) email address.

Errors

If the request is unsuccessful, an errors key containing information about the failure will be returned. Refer to the list of error codes to understand why this request may have failed.

post/users/{user_id}/settings/emails/

Path parameters

user_idstring required

The unique identifier of the user to whom the email will be added. Example: abc123

Request body

Example request

{
  "data": {
    "type": "user-emails",
    "attributes": {
      "email_address": "newemail@example.com"
    }
  }
}

Response

The email address was successfully added and is pending confirmation.

idstring required

The unique identifier of the user entity.

typestring required

The type identifier of the user entity (users).

Example response

{
  "data": {
    "type": "users",
    "id": "{user_id}",
    "attributes": {
      "full_name": "Casey M. Rollins",
      "middle_names": "Marie",
      "social": {
        "github": [
          "https://github.com/caseyrollins"
        ],
        "twitter": [
          "https://twitter.com/crollins"
        ]
      },
      "employment": [
        {
          "title": "Data Scientist",
          "institution": "Open Science Framework",
          "department": "Engineering",
          "startYear": 2018,
          "startMonth": 5,
          "ongoing": true
        }
      ],
      "education": [
        {
          "degree": "MS in Computer Science",
          "institution": "University of Somewhere",
          "department": "Computer Science",
          "startYear": 2014,
          "startMonth": 9,
          "endYear": 2016,
          "endMonth": 6,
          "ongoing": false
        }
      ]
    }
  }
}