Retrieves all email aliases for a user. The collection does not include the primary login for the user.
This operation is performed by calling function getUserEmailAliases
.
See the endpoint docs at API Reference.
await client.emailAliases.getUserEmailAliases(newUser.id);
- userId
string
- The ID of the user. Example: "12345"
This function returns a value of type EmailAliases
.
Returns a collection of email aliases.
Adds a new email alias to a user account..
This operation is performed by calling function createUserEmailAlias
.
See the endpoint docs at API Reference.
await client.emailAliases.createUserEmailAlias(newUser.id, {
email: newAliasEmail,
} satisfies CreateUserEmailAliasRequestBody);
- userId
string
- The ID of the user. Example: "12345"
- requestBody
CreateUserEmailAliasRequestBody
- Request body of createUserEmailAlias method
This function returns a value of type EmailAlias
.
Returns the newly created email alias object.
Removes an email alias from a user.
This operation is performed by calling function deleteUserEmailAliasById
.
See the endpoint docs at API Reference.
await client.emailAliases.deleteUserEmailAliasById(newUser.id, newAlias.id!);
- userId
string
- The ID of the user. Example: "12345"
- emailAliasId
string
- The ID of the email alias. Example: "23432"
This function returns a value of type undefined
.
Removes the alias and returns an empty response.