{
  "topic": "custom-domain",
  "section": {
    "n": 5,
    "name": "Manage"
  },
  "title": "Own domain",
  "covers": "Using the person's own domain, including the DNS step they have to do",
  "summary": "Point a domain or subdomain at the app. HTTPS is set up automatically once DNS is in place.",
  "done_when": "https://{their domain} opens the app.",
  "available": true,
  "who": {
    "connector": "update_app · register_domain / verify_domain; app_danger_zone · delete_domain; read_app · domains",
    "api": "https://ship.embarko.ai/api/apps/{app-name}/domains",
    "dashboard": "https://embarko.ai/app/projects/{project-id}/domain",
    "needs_human": "Adding one DNS record wherever their domain is managed."
  },
  "steps": {
    "connector": [
      "Call update_app { action: \"register_domain\", appName, domain }. The reply's instructions field is the DNS record.",
      "Give the person that one record in plain words (type, name, value) and where it goes (\"your domain provider's DNS settings\").",
      "When they say it is done, call update_app { action: \"verify_domain\", appName, domain }. A 422 means DNS has not reached Embarko yet: try again in a few minutes."
    ],
    "http_api": [
      "POST https://ship.embarko.ai/api/apps/{app-name}/domains with the token and the body {domain}. The reply's instructions field is the one DNS record the person must add.",
      "Once the record is added: POST https://ship.embarko.ai/api/apps/{app-name}/domains/{domain}/verify. Safe to repeat."
    ],
    "dashboard": [
      "For any app in the person's account, including one they uploaded in the dashboard, and when you cannot reach the API: they do it themselves in the dashboard.",
      "Tell them: open https://embarko.ai/app, choose the app, open the Domain tab, and enter the domain.",
      "The page shows the one DNS record to add at their domain provider. After adding it they press Verify; if DNS is not ready yet, they wait a few minutes and press it again. It works the same as the API route above."
    ]
  },
  "limits": [
    "A root domain gets an A record, a subdomain a CNAME.",
    "One domain belongs to one app."
  ],
  "errors": [
    {
      "code": "domain_taken",
      "status": 409,
      "retry": "No",
      "do": "Another app has it."
    },
    {
      "code": "domain_reserved",
      "status": 400,
      "retry": "No",
      "do": "An Embarko address (*.embarko.app) cannot be registered."
    },
    {
      "code": "invalid_domain",
      "status": 400,
      "retry": "No",
      "do": "Not a valid domain name."
    },
    {
      "code": "(DNS not ready)",
      "status": 422,
      "retry": "Later",
      "do": "On verify: wait a few minutes and verify again."
    },
    {
      "code": "permission_denied",
      "status": 403,
      "retry": "No",
      "do": "The person who made this token is not allowed to do this. The reply names the permission and their access to the app (or their role). Nothing changed. Tell the person (say_to_user.no_permission); do not try another way round it."
    }
  ],
  "say_to_user": {
    "ask_dns": "To use {domain}, add this one record in your domain provider's DNS settings: {type} {name} → {value}. Tell me when it's done.",
    "done": "{domain} now opens your app."
  },
  "prerequisites": {
    "read_first": "https://embarko.ai/docs/prerequisites",
    "user": "The person is usually not a developer. They want to know if the app is live, not how.",
    "talk": "Reply in 1-3 short plain sentences: what happened, and what the person needs to do only if something is needed. Do not show commands, API names, tokens, headers or logs, or describe the steps you took, unless the person asks for technical details. If the person is clearly a developer (uses technical terms, asks what you ran), talk to them that way for the rest of the conversation. Never show a token. Never invent a link, name or code: use only what Embarko's replies, this guide or the person give you.",
    "route": "Connector first if it is in your tools, then the HTTP API, then the upload page as a last resort.",
    "domains": "ship.embarko.ai (API), embarko.ai (website), {app-name}.embarko.app (apps): all Embarko.",
    "requires": [
      {
        "topic": "claim",
        "why": "Over HTTP the app must be claimed first; connector apps already are",
        "url": "https://embarko.ai/docs/claim",
        "only": "over HTTP only"
      }
    ]
  },
  "next": "Register the domain, give the person the DNS record, verify when they are done.",
  "related": [
    {
      "topic": "resume",
      "why": "Domain states: pending_dns, active or failed",
      "url": "https://embarko.ai/docs/resume"
    },
    {
      "topic": "rename",
      "why": "A custom domain keeps working through a rename",
      "url": "https://embarko.ai/docs/rename"
    }
  ],
  "links": {
    "register": "https://ship.embarko.ai/api/apps/{app-name}/domains",
    "verify": "https://ship.embarko.ai/api/apps/{app-name}/domains/{domain}/verify"
  },
  "url": "https://embarko.ai/docs/custom-domain",
  "contents": "https://embarko.ai/docs",
  "version": "2026-11-24"
}