*Cloud*

# The custom domain object

Your own domain in front of a service: a subdomain (a CNAME) or a zone apex (A records). Dispra checks the DNS records, proves you own the domain and issues its certificate.

## Attributes

- `dom` (string): The domain's id.
- `domain` (string): The domain name.
- `svc` (string): The service it reaches.
- `status` (string): pending_dns, verifying, issuing_certificate, active or failed.
- `port` (number): The container port it forwards to, or null for the port the image exposes.
- `records` (array): The DNS records to create, each with what the last check found.
- `certificate` (string): none, issuing or active.

## Example

```json
{
  "data": {
    "dom": "dom_01jdk5g7h9j1k3l5z7x9c1v3bn",
    "domain": "api.acme.com",
    "svc": "svc_01jdk3n2f4g6h8j0k2l4z6x8ca",
    "status": "active",
    "port": 3000,
    "records": [{"type":"CNAME","name":"api.acme.com","value":"x8ca.global.dispracloud.app","ok":true}],
    "certificate": "active"
  }
}
```

## Endpoints

- `POST` [Add a custom domain](https://docs.dispralabs.com/api/add-a-custom-domain.md)
- `POST` [Connect a custom domain](https://docs.dispralabs.com/api/connect-a-custom-domain.md)
- `DELETE` [Delete a custom domain](https://docs.dispralabs.com/api/delete-a-custom-domain.md)
- `GET` [Get a custom domain](https://docs.dispralabs.com/api/get-a-custom-domain.md)
- `POST` [Preview a custom domain](https://docs.dispralabs.com/api/preview-a-custom-domain.md)
- `POST` [Verify a custom domain](https://docs.dispralabs.com/api/verify-a-custom-domain.md)
