Update an alias
PATCH
/api/v1/aliases/{address}
const url = 'https://app.shroud.email/api/v1/aliases/deadbeef%40fog.shroud.email';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"enabled":false,"notes":"Receipts and order updates","title":"Acme shopping"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://app.shroud.email/api/v1/aliases/deadbeef%40fog.shroud.email \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "enabled": false, "notes": "Receipts and order updates", "title": "Acme shopping" }'Updates an alias’s settings. OAuth scope: aliases:edit.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” address
required
string
Exact alias address. URL-encode it, e.g. deadbeef%40fog.shroud.email.
Example
deadbeef@fog.shroud.emailRequest Body
Section titled “ Request Body ”Fields to update
Media type application/json
UpdateAlias
Omitted fields remain unchanged.
object
enabled
False stops all forwarding, including password-reset emails.
boolean
notes
Set to null to clear the notes.
string
title
Set to null to clear the label.
string
Example
{ "enabled": false, "notes": "Receipts and order updates", "title": "Acme shopping"}Responses
Section titled “ Responses ”Updated alias
Media type application/json
EmailAlias
object
address
required
string format: email
blocked
required
integer
blocked_addresses
required
Array<string>
enabled
required
boolean
forwarded
required
integer
notes
required
string
title
required
string
Example
{ "address": "deadbeef@fog.shroud.email", "blocked": 33, "blocked_addresses": [ "spammer@example.com" ], "enabled": true, "forwarded": 26, "notes": "Used for webshop newsletters etc.", "title": "Newsletters"}Invalid token
Media type application/json
Error
object
error
required
string
Example
{ "error": "Invalid token"}Insufficient scope or unconfirmed account
Media type application/json
Error
object
error
required
string
Example
{ "error": "Invalid token"}Alias not found
Media type application/json
Error
object
error
required
string
Example
{ "error": "Alias not found"}Invalid values
Media type application/json
Error
object
error
required
string
Example
{ "error": "is invalid"}