PUT user/…/email-address

PUT Adds an email address to a user account.

Resource URL



Field Description

The user ID of the user to retrieve details for. To retrieve the details of the own user account, the value self may be used as well.

Example value: 7OuHq-RcQO_snGWR58TnBw


The email address to be added.

Example value: john%40example.com

If a PUT request has no body (i.e. the body is empty), it is still mandatory to include a Content-Length header (i.e. Content-Length: 0). Not all HTTP clients do this automatically. For more information, please see RFC 2616.


An HTTP 200 (OK) response containing a 2.0 UserEmailAddress object with the details of the requested email address stored for the requested user account.

Example request

PUT https://www.drillster.com/api/2/user/self/email-address/thomas%40example.com


  "emailAddress" : {
    "address" : "thomas@example.com",
    "verified" : false
  "primary" : false

Error responses

The following error situations are possible:

ID Response code Description
not_authenticated 401 (Unauthorized) User was not authenticated
invalid_user_id 400 (Bad request) Given user ID is not valid
nonexistent_user 404 (Not found) Requested user not found
no_access 403 (Forbidden) Caller does not have access to requested user
missing_input 400 (Bad request) Email address is required
email_not_added 400 (Bad request) Given email address could not be added to the account
invalid_email_address 400 (Bad request) The given email address is not valid
email_address_in_use 409 (Conflict) The given email address is already in use by another account