---
title: "Bind a custom domain to an owned node's app"
method: PUT
path: "/api/nodes/{node_id}/services/{service}/domains/{domain}"
tags: ["nodes"]
---

# Bind a custom domain to an owned node's app

`PUT /api/nodes/{node_id}/services/{service}/domains/{domain}`

## Request

- Base URL: `https://app.nerdit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.nerdit.ai/api/nodes/{node_id}/services/{service}/domains/{domain}`
- Auth: none declared

Bind one name, on the node, and report the row as the node now has it.

Refused, in this order: a node that is not the caller's own (404); a name
outside the service grammar (422); a segment this router cannot put on a
frame (422, the transport class — never a judgement about the name); an
account that is not in good standing (403); a node that is offline (409,
because its domains keep serving and only *managing* them is
unavailable). Past that the node's own refusal is forwarded, with the two
ACME cases rendered as remedies.

## Path parameters

- `service` string, required
- `domain` string, required
- `node_id` string, uuid, required

## Request body

- DomainBindRequest: The body beside the path id: the one decision that is not the identity.
  - `acme` boolean, nullable

## Response `200`

Successful Response

- DomainBoundView: ``PUT`` answer: the row as it now stands, plus whether this call made it.
  - `domain` string, required
  - `acme` boolean, required
  - `created_at` string, date-time, required
  - `url` string, required
  - `state` 'ready' | 'withheld', required
  - `cert_state` 'internal' | 'disabled' | 'pending' | 'issued' | 'expired', required
  - `cert_not_after` string, date-time, nullable
  - `created` boolean, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Content
- `502`: Bad Gateway

---

[API](https://skmtc.dev/nerdit/apis/nerdit-cloud-web.md) · [All operations](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/llms.txt) · [OpenAPI document](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/revisions/06e3b44b58be?raw)
