Skip to main content
curl

Authorizations

Authorization
string
header
required

A management token: ds_mgmt_ followed by 40 lowercase hexadecimal characters, created by an owner in Settings → Management tokens. Opaque: send it as is, in the Authorization header only.

Path Parameters

domain
string
required

The site's bare domain, normalized like the console form (trimmed, lowercase). www.news-site.example and news-site.example are two different sites. A domain that is not a site of this organisation — absent, another organisation's, or not a valid domain — is 404, except on PUT /v1/sites/{domain}, which creates the site and answers 422 for an invalid domain.

Body

application/json

Send Content-Type: application/json and a JSON object of at most 262,144 bytes.

Both fields are optional; {} creates the site without a name, or changes nothing on an existing one. domain is not a field: the domain is the address.

name
string

Absent: the current name is kept (none on creation). Trimmed; "" or a blank name clears it.

default_fragment_ref
string

Absent: the current default is kept. Present: the reference of an active fragment of this site, exact and case-sensitive (not trimmed), which becomes the default — so it is refused on the call that creates the site.

Pattern: ^[A-Za-z0-9/_.:-]{1,200}$

Response

The site existed and was updated (or left unchanged).

A site: a domain the organisation publishes on.

id
string
required

Stable site id (sit_…).

account_id
string
required

The organisation id (acc_…).

domain
string
required

The bare domain, normalized: lowercase, without scheme, path or port. www. and the apex are two sites.

name
string | null
required

Display name, or null.

favicon_url
string | null
required

The site icon. Null for a site created through this API until the site is first opened in the console.

default_fragment_id
string | null
required

The site default fragment id (frg_…), or null when the site has no default.

default_fragment_ref
string | null
required

The site default fragment reference; null when the site has no default, or when that fragment has no reference.

created_at
string<date-time>
required

Creation time, UTC.