Median

POST /site/domain

Updated Oct 1, 20261 minute read

Connect a custom domain

Connects a hostname like help.example.com, replacing any other. Add the returned records at your DNS provider; the domain goes live once they are in place. Needs the Site add-on or Pro. Admins and owners only.

Part of Site.

Request body

application/json, required.

FieldTypeRequiredDescription
domainstringYes

Responses

StatusDescription
200The domain, with the records to add.
401The bearer token is missing, revoked, or expired.
429Too many requests. Wait the seconds in Retry-After. Limits depend on the plan. See rate limits.

200 body

FieldTypeRequiredDescription
domainobject | nullNo

Example request

curl -X POST https://api.median.sh/v1/site/domain \
  -H "Authorization: Bearer $BEARER_AUTH"

Still need help?

    Esc