Skip to content

Documentation

Update an own domain

PATCH/v1/domains/{domain}Domains

Changes where the bare domain sends visitors.

Parameters

ParameterTypeRequiredDescription
domainstring, in the pathrequiredThe domain's id or its hostname.

Request body

JSON, sent with Content-Type: application/json.

FieldTypeRequiredDescription
root_urlstring, nulloptionalA new root URL, or null to answer 404 on the bare domain.
not_found_urlstring, nulloptionalA new address for unknown endings, or null for the plain not-found page.

Example request

Terminal
curl "https://snip.link/v1/domains/go.example.com" \
  -X PATCH \
  -H "Authorization: Bearer $SNIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Example response

Response
{
  "domain": {
    "id": "dom_3c1f0a9e2b7d4c55",
    "hostname": "go.example.com",
    "status": "active",
    "detail": null,
    "cname_target": "customers.snip.link",
    "verification": null,
    "root_url": "https://example.com",
    "not_found_url": null,
    "links": 42,
    "created_at": "2026-10-20T12:00:00.000Z"
  }
}

Response fields

FieldTypeDescription
domainDomain
domain.idstringStable id. Every domain route accepts it, or the hostname.
domain.hostnamestringThe domain links live on, without a scheme.
domain.statuspending | active | failedpending until the account-specific TXT proof is verified, the CNAME points at us and the certificate is issued; active once links on it answer; failed when certificate verification gave up.
domain.detailstring, nullWhat a pending domain is waiting for, or why it failed. Null once active.
domain.cname_targetstringThe DNS record to add at your DNS provider: a CNAME from the hostname to this target (customers.snip.link).
domain.verificationobject, nullPublish this TXT record to prove control for this account's connection. Poll Get a domain to check it. A removed and re-added domain gets a new proof; old CNAMEs and TXT values cannot activate it. Null for domains connected before this requirement.
domain.root_urlstring, nullWhere the bare domain (https://go.example.com/) sends visitors. Null answers 404.
domain.not_found_urlstring, nullWhere an ending that does not exist on this domain sends visitors (a 302). Null shows a plain not-found page (404).
domain.linksintegerLinks on this domain.
domain.created_atstring

Errors

StatusMeaning
400The body or query is invalid. details names each field.
401The API key is missing, malformed or revoked.
404No domain by that id or hostname in this account.
429Either the key exceeded its requests-per-second limit (honor Retry-After), or a daily or plan quota is used up (details.reason).

Back to getting started