Domains
Create Domain
Section titled “Create Domain”POST /domains/Register a new email domain.
Request Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Domain name (e.g. mycompany.com). Auto-lowercased. |
Example
Section titled “Example”curl -X POST https://api.emboux.com/domains/ \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "mycompany.com"}'Response 201 Created
Section titled “Response 201 Created”{ "id": 1, "name": "mycompany.com", "created_at": "2025-01-15T10:30:00"}Errors
Section titled “Errors”| Status | Detail |
|---|---|
400 | Domain already exists |
403 | Domain quota exceeded |
List Domains
Section titled “List Domains”GET /domains/Returns all domains visible to the authenticated key.
- Master token: returns all domains
- Client token: returns only domains belonging to that partner
Example
Section titled “Example”curl https://api.emboux.com/domains/ \ -H "Authorization: Bearer YOUR_API_KEY"Response 200 OK
Section titled “Response 200 OK”[ { "id": 2, "name": "example.org", "created_at": "2025-01-16T08:00:00" }, { "id": 1, "name": "mycompany.com", "created_at": "2025-01-15T10:30:00" }]Delete Domain
Section titled “Delete Domain”DELETE /domains/{domain_name}Permanently removes a domain and all its mailboxes and aliases (cascade delete).
Path Parameters
Section titled “Path Parameters”| Parameter | Type | Description |
|---|---|---|
domain_name | string | The domain name to delete |
Example
Section titled “Example”curl -X DELETE https://api.emboux.com/domains/mycompany.com \ -H "Authorization: Bearer YOUR_API_KEY"Response 204 No Content
Section titled “Response 204 No Content”No response body.
Errors
Section titled “Errors”| Status | Detail |
|---|---|
404 | Domain not found |