Reputation: 49
We have a Plesk panel for managing our mail accounts. We want to create new accounts by using the (new) REST json API in Plesk. The documentation is unclear about this: https://[host]:8443/api/v2 (swagger docs)
It is possible to create domains with a simple call though.
How can we add a new mailaccount and update the password of an existing mailaccount with de Plesk REST API (non-xml)?
Upvotes: 0
Views: 705
Reputation: 21
Like this:
curl -k -X POST -u admin:password "https://your-domain:8443/api/v2/cli/mail/call" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"params\": [ \"--create\", \"[email protected]\",\"-mailbox\", \"true\", \"-passwd\", \"1qazXSW@\" ]}"
result should be:
{
"code": 0,
"stdout": "SUCCESS: Creation of mailname '[email protected]' complete",
"stderr": ""
}
Upvotes: 0