Skip to content
Documentation/API reference
API · domains

Add domain

POST /api/v2/domains

Authorization

Owner/admin user session (use inboxit login). Use the CLI login flow; a workspace API key cannot call this operation.

Parameters

All resource access is checked against the selected workspace and user permissions.

NameTypeContract
namestring · requiredPublic domain or subdomain, no URL/path/email, maximum 253 characters

Request

Run inboxit login first. The CLI supplies authenticated user credentials.

Example
inboxit domains add --data @request.json

JSON body

Save this JSON as request.json for the request above. Replace example values with your own.

Example
{
  "name": "mail.yourbrand.com"
}

Response

HTTP 201. Example values are illustrative; excerpts are marked.

Example
{
  "id": "DOMAIN_UUID",
  "name": "mail.yourbrand.com",
  "status": "pending",
  "records": [
    {
      "purpose": "ownership",
      "type": "TXT",
      "host": "_inboxit.mail.yourbrand.com",
      "value": "inboxit-verification=GENERATED_TOKEN",
      "required": true
    }
  ]
}

Behavior & errors

Response excerpt: actual records also include generated DKIM and recommended DMARC. Copy returned values, never example tokens. Existing workspace domain returns its record; exhausted plan or conflicting domain returns 409. Common errors: 400 invalid input, 401 unauthenticated, 403 insufficient permission, 404 missing/inaccessible resource, 409 conflict, 429 rate/usage limit, 503 service unavailable. See Errors & retries for recovery guidance.