Create mail accounts by API
Solved
Support
-
Hi,
I would like to build my own Anonaddy, etc service and create a unique mail account for each website I register It shall be their own accounts, not just aliases. Is it possible to create them with the Cloudron API? If so, how can I do that?
Best
Jay -
via api you can do that.
POST
{{baseUrl}}/mail/:domain/mailboxes
note:domain
is a variable for the mail domain.
note{{baseUrl}}
is the Cloudron api url e.g.https://my.DOMAIN.TLD/api/v1
with body:
{ "name": "webmaster", "ownerId": "uid-be9dcf57-ad65-40e0-a3f8-d1c75974bf01", "ownerType": "user" }
The
ownerType
can beuser
orgroup
. and theownerId
you need to get via either/users
and for groups/groups
.The API and the API Doc is currently being reworked.
https://git.cloudron.io/cloudron/docs/-/blob/master/api/cloudron_api_swagger.yaml?ref_type=heads -
-