Box Developer Documentation
Latest version

Remove email alias

delete
https://api.box.com/2.0
/users/:user_id/email_aliases/:email_alias_id

Removes an email alias from a user.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
23432

The ID of the email alias.

stringin pathrequired
12345

The ID of the user.

Response

none

Removes the alias and returns an empty response.

application/jsonClient error

An unexpected client error.

delete
Remove email alias
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X DELETE "https://api.box.com/2.0/users/12345/email_aliases/23432" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.emailAliases.deleteUserEmailAliasById(newUser.id, newAlias.id!);
Python Gen
client.email_aliases.delete_user_email_alias_by_id(new_user.id, new_alias.id)
.NET Gen
await client.EmailAliases.DeleteUserEmailAliasByIdAsync(userId: newUser.Id, emailAliasId: NullableUtils.Unwrap(newAlias.Id));
Swift Gen (Beta)
try await client.emailAliases.deleteUserEmailAliasById(userId: newUser.id, emailAliasId: newAlias.id!)
Java
BoxUser user = new BoxUser(api, "0");
user.deleteEmailAlias("123");
Python
user_id = '33333'
email_alias_id = '12345'

user = client.user(user_id)
email_alias = client.email_alias(email_alias_id)

user.remove_email_alias(email_alias)
.NET
await client.UsersManager.DeleteEmailAliasAsync(userId: "33333", emailAliasId: "12345");
Node
var userID = '33333';
var aliasID = '12345';
client.users.removeEmailAlias(userID, aliasID)
    .then(() => {
        // removal successful — no value returned
    });