Skip to the page

Add a custom domain to a service; answers the TXT record to create

POST/v1/organisations/{id}/environments/{envId}/domains

Operation domains.add · since 2026-11-05 · stable

Needs a session withwritescopeAnswers201 Created

The domain and the TXT record that proves it is yours, then the address record.

Path parameters

idstring (uuid)required
The organisation id.
envIdstring (uuid)required
The environment id.

Body (JSON)

Fields not listed here are refused.

hostnamestringrequired
The hostname, like shop.example.com.
servicestringrequired
The public web service it points at, by name.

Errors

Every error is { "error", "message", "detail"? } (Errors and references). Besides the codes any route can answer.

POST/v1/organisations/{id}/environments/{envId}/domains
curl -X POST "https://api.rykloud.com/v1/organisations/$ORG_ID/environments/$ENV_ID/domains" \
  -H "Authorization: Bearer $RYKLOUD_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "hostname": "shop.example.com",
  "service": "web"
}'
With the rykloud CLI
rykloud domains add HOSTNAME [flags]

Command reference: rykloud domains add