- List all email addresses
- List all email addresses for a user
- Get details on an email address
- Add an email address
- Add an email address for a user
- Delete an email address
- Delete an email address for a user
User email addresses API
Use this API to interact with email addresses for user accounts. For more information, see User account.
List all email addresses
Lists all email addresses for your user account.
Prerequisites:
- You must be authenticated.
GET /user/emails
Example response:
[
{
"id": 1,
"email": "email@example.com",
"confirmed_at" : "2021-03-26T19:07:56.248Z"
},
{
"id": 3,
"email": "email2@example.com",
"confirmed_at" : null
}
]
List all email addresses for a user
Lists all email addresses for a given user account.
Prerequisites:
- You must have administrator access to the instance.
GET /users/:id/emails
Supported attributes:
Attribute | Type | Required | Description |
---|---|---|---|
id
| integer | yes | ID of user account |
Get details on an email address
Gets details on a given email address for your user account.
GET /user/emails/:email_id
Supported attributes:
Attribute | Type | Required | Description |
---|---|---|---|
email_id
| integer | yes | ID of email address |
Example response:
{
"id": 1,
"email": "email@example.com",
"confirmed_at" : "2021-03-26T19:07:56.248Z"
}
Add an email address
Adds an email address for your user account.
POST /user/emails
Supported attributes:
Attribute | Type | Required | Description |
---|---|---|---|
email
| string | yes | Email address |
{
"id": 4,
"email": "email@example.com",
"confirmed_at" : "2021-03-26T19:07:56.248Z"
}
Returns a created email with status 201 Created
on success. If an
error occurs a 400 Bad Request
is returned with a message explaining the error:
{
"message": {
"email": [
"has already been taken"
]
}
}
Add an email address for a user
Adds an email address for a given user account.
Prerequisites:
- You must have administrator access to the instance.
POST /users/:id/emails
Supported attributes:
Attribute | Type | Required | Description |
---|---|---|---|
id
| string | yes | ID of user account |
email
| string | yes | Email address |
skip_confirmation
| boolean | no | Skip confirmation and assume email is verified. Possible values: true , false . Default value: false .
|
Delete an email address
Deletes an email address for your user account. You cannot delete a primary email address.
Any future emails sent to the deleted email address are sent to the primary email address instead.
Prerequisites:
- You must be authenticated.
DELETE /user/emails/:email_id
Supported attributes:
Attribute | Type | Required | Description |
---|---|---|---|
email_id
| integer | yes | ID of email address |
Returns:
-
204 No Content
if the operation was successful. -
404
if the resource was not found.
Delete an email address for a user
Deletes an email address for a given user account. You cannot delete a primary email address.
Prerequisites:
- You must have administrator access to the instance.
DELETE /users/:id/emails/:email_id
Supported attributes:
Attribute | Type | Required | Description |
---|---|---|---|
id
| integer | yes | ID of user account |
email_id
| integer | yes | ID of email address |