# DOMAINS

domains endpoints.

**Base URL:** `https://api.trustpager.com/functions/v1/api/v1`

## Endpoints

### POST /domains

Connect a shortlink hostname. Returns a fresh ownership TXT record, a CNAME record and a seven day claim. A verified hostname in another workspace cannot be claimed. Secure connection setup is waiting until it is enabled. Manage website and email uses in Growth > Websites and Settings > Email.

**Scopes:** `domains:write` — [full detail](./domains/post-domains.md)

### POST /domains/:hostname/check

Check ownership through the TXT record and run the existing website, redirect and email checks. Returns one combined result, with a message for each part still waiting. Does not register the hostname for a secure connection.

**Scopes:** `domains:write` — [full detail](./domains/post-domains-hostname-check.md)

### GET /domains/:hostname

Get one connected hostname with all of its uses, DNS records and shortlink ownership and secure connection status.

**Scopes:** `domains:read` — [full detail](./domains/get-domains-hostname.md)

### GET /domains

List every connected hostname in this workspace, grouped by root domain, with website, redirect, email sending and shortlink uses and DNS records. Includes the shared shortlink domain as read-only.

**Scopes:** `domains:read` — [full detail](./domains/get-domains.md)

### DELETE /domains/:hostname

Start removing a shortlink hostname, with removal after 30 days. Its links and history are kept, but the links are switched off. Website and email uses stay unchanged and must be managed in Growth > Websites and Settings > Email.

**Scopes:** `domains:delete` — [full detail](./domains/delete-domains-hostname.md)

### PATCH /domains/:hostname

Switch only the shortlinks use on or off for a hostname. Website and email uses are read-only here. Change them in Growth > Websites and Settings > Email.

**Scopes:** `domains:write` — [full detail](./domains/patch-domains-hostname.md)
