Skip to content

Domains

Manage the email domains that MXHook accepts mail for.

List Domains

GET /domains

Returns all registered domains.

Response 200 OK

json
[
  {
    "id": "d-1710806400",
    "name": "yourdomain.com",
    "created_at": "2025-03-19T00:00:00Z"
  }
]

Create Domain

POST /domains

Register a new domain.

Request Body

FieldTypeRequiredDescription
namestringYesThe domain name (e.g., yourdomain.com)
json
{
  "name": "yourdomain.com"
}

Response 201 Created

json
{
  "id": "d-1710806400",
  "name": "yourdomain.com",
  "created_at": "2025-03-19T00:00:00Z"
}

Errors

StatusReason
400Missing or empty name field
401Invalid or missing API key

Delete Domain

DELETE /domains/{id}

Remove a registered domain.

Parameters

ParameterInTypeRequiredDescription
idpathstringYesDomain ID

Response 204 No Content

Errors

StatusReason
401Invalid or missing API key
404Domain not found

Domain Object

FieldTypeDescription
idstringUnique identifier (format: d-{timestamp})
namestringDomain name
created_atstring (ISO 8601)Creation timestamp

Released under the Apache 2.0 License.