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.

path_prefix
string
required

A path. Surrounding whitespace is trimmed first; the trimmed path is at most 512 characters (UTF-16 code units), and its stored canonical form at most 200: lowercase, wrapped in /, with canonical percent-encoding. No query, hash, inner whitespace, backslash, dot segment, repeated slash or invalid percent-encoding. Anything else is refused with 422.

match
string
required

exact or prefix. Surrounding whitespace is ignored; any other value is refused with 422. Stored and returned without the whitespace.

Examples:

"prefix"

"exact"

ref
string
required

The reference of a fragment of this site — a paused one is accepted — as a plain JSON string, exact and case-sensitive: it is not trimmed.

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

Response

The rule was added.

A routing rule of a site: a path and a match mode that resolve to one fragment of the site.

id
string
required

The rule id. PUT …/routes gives every rule a new id.

path_prefix
string
required

The canonical path: lowercase, starting and ending with /, each segment percent-encoded (Actualite/ is stored as /actualite/).

match
enum<string>
required
Available options:
exact,
prefix
fragment_ref
string | null
required

The target fragment reference, or null when that fragment has no reference.

fragment_id
string
required

The target fragment id (frg_…).