Update Alias

Description

This API endpoint can be used to modify secondary email addresses for users.

Pre-requisites

  • In order to successfully use this endpoint the logged in user must be a Mimecast administrator with at least the Directories | Groups | Edit permission.

URI

To use this endpoint you send a POST request to:

  • /api/user/update-alias

Request Headers

The following request headers must be included in your request:

Field Description
Authorization Please see the Authorization guide for more information on building the Authorization header.
x-mc-req-id

A randomly generated GUID, for example,

8578FCFC-A305-4D9A-99CB-F4D5ECEFE297
x-mc-app-id The Application ID provided with your Registered API Application.
x-mc-date

The current date and time in the following format, for example,

Tue, 24 Nov 2015 12:50:11 UTC

Request Body

{
"data": [
{
"aliasFor": "String",
"alias": "String"
}
]
}
data
Field Type Required Description
aliasFor String Required The primary email address to set the alias for.
alias String Required The email address to set as an alias address.

Response

{
"fail": [],
"meta": {
"status": Number
},
"data": [
{
"domain": "String",
"isInternal": Boolean,
"alias": "String",
"aliasDisplayName": "String",
"aliasFor": "String",
"type": "String"
}
]
}
meta object
Field Type Description
status Number The function level status of the request.
data array
Field Type Description
domain String The domain of the alias address.
isInternal Boolean If the alias is internal (true) or external (false).
alias String The alias email address.
aliasDisplayName String The display name of the alias address.
aliasFor String The primary email address that the alias was associated to.
type String The Mimecast address type of the alias address.
fail array

When a request is successful the fail array will be empty.

Field Type Description
errors Array of error objects An array of error objects describing the error returned from the API.
errors object
Field Type Description
message String The error message.
code String The Mimecast code associated with the error.
retryable Boolean If the error is retryable

Sample Code

Sample code is provided to demonstrate how to use the API and is not representative of a production application. To use the sample code; complete the required variables as described, populate the desired values in the request body, and execute in your favorite IDE.  Please see the Global Base URL's page to find the correct base URL to use for your account.

POST {base_url}/api/user/update-alias
Authorization: MC {accesskKey}:{Base64 encoded signed Data To Sign}
x-mc-date: {dateTime}
x-mc-req-id: {unique id}
x-mc-app-id: {applicationId}
Content-Type: application/json
Accept: application/json
{
"data": [
{
"aliasFor": "String",
"alias": "String"
}
]
}
Back to Top