# Domain model

A domain that share links can use, with how many users use it.

## Fields

| Field | Type | Present | Notes |
|---|---|---|---|
| `id` | `integer` |  |  |
| `name` | `string` |  |  |
| `userId` | `integer` |  |  |
| `createdAt` | `date-time` |  |  |
| `updatedAt` | `date-time` |  |  |
| `cloudflareZoneId` | `string \| null` |  |  |
| `status` | `enum` |  | One of `AwaitingNameservers`, `AwaitingDNS`, `Working`, `Failed`. |
| `availability` | `enum` |  | One of `Public`, `Premium`, `Shared`, `Private`. |
| `supportsSubdomain` | `boolean` |  |  |
| `supportsPath` | `boolean` |  |  |
| `official` | `boolean` |  |  |
| `failedAt` | `date-time \| null` |  |  |
| `uses` | `number` |  |  |

## Returned by

The endpoints whose `data` holds a Domain as it is, and where.

- [`POST /domains`](https://hematite.gg/docs/developers/reference/domains#post-domains), in `data`
- [`GET /domains/:domainId`](https://hematite.gg/docs/developers/reference/domains#get-domains-domainid), in `data`
- [`PATCH /domains/:domainId`](https://hematite.gg/docs/developers/reference/domains#patch-domains-domainid), in `data`
- [`GET /domains/discovery`](https://hematite.gg/docs/developers/reference/domains#get-domains-discovery), in `data[]`
- [`GET /users/:userId/domains`](https://hematite.gg/docs/developers/reference/users#get-users-userid-domains), in `data[]`

## Example

```json
{
  "id": 1,
  "name": "yourdomain.com",
  "userId": 1,
  "createdAt": "2026-11-10T18:24:00.000Z",
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "cloudflareZoneId": "string",
  "status": "AwaitingNameservers",
  "availability": "Public",
  "supportsSubdomain": false,
  "supportsPath": false,
  "official": false,
  "failedAt": null,
  "uses": 0
}
```
