cloadyDocs
API ReferenceEndpointsWorkspaces

Turn on email for a domain

Turns email on for one of the workspace's domains, or changes it: `mailboxes` hosts mailboxes and takes the domain's mail, `send` only signs and sends from it. The domain must be registered here, or carry the `_cloady` TXT record verifyDomain asks for (pointing it at Cloady's nameservers alone isn't enough), else 409 `unverified` with the record in `details.verification`; sending from it pauses whenever that record is gone. Turning email on needs a card on the workspace owner's account (402 `payment_required`); receiving mail stays free. On Cloady's nameservers, or at the registrar on Automatic DNS, the MX, SPF, DKIM and DMARC records are published for you; elsewhere `records` lists what to add. A domain of the workspace's apps that isn't a workspace domain yet is added as one. Answers 409 `reserved` for an address under cloady.io or cloady.com, `taken` when another workspace holds it, and `not_available` for `send`, which isn't available yet. Needs the admin role.

PUT
/api/workspaces/{workspaceSlug}/mail/domains/{domain}
AuthorizationBearer <token>

Personal API token (cldy_…)

In: header

Path Parameters

workspaceSlug*string
domain*string

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

application/json

curl -X PUT "https://example.com/api/workspaces/string/mail/domains/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "domain": {    "domain": "string",    "state": "mailboxes",    "dns": "cloady",    "verified": true,    "mailboxes": -9007199254740991,    "aliases": -9007199254740991,    "catchAll": "string",    "subAddressing": true,    "records": [      {        "kind": "mx",        "type": "MX",        "name": "string",        "value": "string",        "prio": -9007199254740991,        "state": "ok",        "managed": true      }    ]  }}