Create or change an alias
Makes an address deliver to mailboxes of the workspace, replacing its targets if it exists. The address must be on a domain of the workspace with email on and not be a mailbox (409 `address_taken`). Forwarding to outside addresses isn't available yet: a target that isn't a mailbox of the workspace answers 400 `bad_target`. Needs the admin role.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/workspaces/string/mail/aliases/string" \ -H "Content-Type: application/json" \ -d '{ "targets": [ "string" ] }'{ "address": "string", "targets": [ "string" ], "type": "alias"}Delete an alias DELETE
Deletes an alias or forward; mail to it bounces unless a catch-all takes it. Needs the admin role.
Query a workspace's email log GET
Runs a LogQL query over the workspace's email log, kept for 30 days, and returns Loki's answer unchanged. Streams carry `kind` (`delivery` or `auth`), and delivery lines `dir` (`in` or `out`) and `status` (`queued`, `delivered`, `deferred`, `bounced`, `rejected` or `spam`); auth lines `status` `ok` or `failed`. Each line is JSON with `from`, `to`, `subject`, `mailbox`, `code` and `reply` (the SMTP reply), `host` (the other server), `tls`, `size`, `score` (spam score) and `queue`. The path is Loki's own, so a Grafana data source can point here too. Needs the admin role.