Create email alias

post
https://api.box.com/2.0
/users/:user_id/email_aliases

Adds a new email alias to a user account..

Request

application/json

Path Parameters

stringin pathrequired
12345

The ID of the user.

Request Body

stringin bodyrequired
alias@example.com

The email address to add to the account as an alias.

Response

application/jsonEmail Alias

Returns the newly created email alias object.

You can now try out some of our APIs live, right here in the documentation.
Log In

Request Example

cURL
curl -X POST https://api.box.com/2.0/users/12345/email_aliases \
     -H "Authorization: Bearer <ACCESS_TOKEN>" \
     -H "Content-Type: application/json" \
     -d '{
       "email": "alias@example.com"
     }'
.NET
BoxEmailAlias alias = await client.UsersManager
    .AddEmailAliasAsync(userId: "33333", email: "user+foo@example.com");
Java
BoxUser user = new BoxUser(api, "0");
user.addEmailAlias("user+alias@example.com");
Python
user_id = '33333'
user = client.user(user_id)
email_alias = user.add_email_alias('alias@example.com')
Node
client.users.addEmailAlias('33333', 'user+baz@example.com')
    .then(alias => {
        /* alias -> {
            type: 'email_alias',
            id: '12345',
            is_confirmed: false,
            email: 'user+baz@example.com' }
        */
    });

Response Example

{
  "id": 11446498,
  "type": "email_alias",
  "email": "alias@example.com",
  "is_confirmed": true
}