Sample - Box Platform API
POST/users/{user_id}/email_aliases

Create an email alias

Creates a new email alias for a user account. Supply email for the alias, and ensure its domain is registered to the enterprise before adding it. A 201 response returns the newly created email alias object.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 1 body field
user_idstringrequired
The unique identifier of the user account to add the email alias to.

Email alias details for the user account.

emailstringrequired
The email address to add to the account as an alias. Note: The domain of the email alias needs to be registered to your enterprise. See the [domain verification guide]( https://support.box.com/hc/en-us/articles/4408619650579-Domain-Verification ) for steps to add a new domain.

2 status codes
201Returns the newly created email alias object, including its identifier, email address, confirmation state, and `email_alias` type.
idstringoptional
The unique identifier for this object.
typestringoptional
The value will always be `email_alias`.
Allowed:email_alias
emailstringoptional
The email address.
is_confirmedbooleanoptional
Whether the email address has been confirmed.
defaultReturned when an unexpected client error occurs.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.

Error handling

email is required and must contain the email address to add as an alias. The email alias domain must be registered to the enterprise, and user_id must identify the user account receiving the alias.