GET user/…/email-address/…

GET Retrieves the details of a single email address linked to a user account.

Users are always permitted to retrieve the details of their own user account. Retrieving the details of another user account is only permitted if the calling user is a member of the same organization as the requested user.

Resource URL

https://www.drillster.com/api/2/user/self/email-address/{email}

or

https://www.drillster.com/api/2/user/{user_id}/email-address/{email}

Parameters

Field Description
user_id
required

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

email
required

The email address to retrieve. The email address must be linked to the given user account.

Example value: john%40example.com

Response

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

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

Response

{
  "address" : "thomas@example.com",
  "verified" : 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 Caller 403 (Forbidden) does not have access to requested user