Page redirects

Update a page redirect

Changes a page redirect; fields you leave out keep their value. To point it at a category, send type and target_id together.

PATCH
/sites/{site_id}/page-redirects/{redirect_id}
cURL
curl --request PATCH \
  --url 'https://api.notiondesk.so/sites/{site_id}/page-redirects/{redirect_id}' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "article",
  "source_path": "string",
  "target_id": "string",
  "locale": "string"
}'

Authorizations

  • Authorizationstringheader

    api_key · http · bearer

    write
  • Authorizationstringheader

    oauth · oauth2

    write

Path parameters

  • site_idstringrequired

    The id of a site from List sites.

  • redirect_idstringrequired

    The id of a redirect from List page redirects.

Headers

  • nd-versionstring

    The contract version your integration was written against. Without it, the request uses the current version. An unknown value answers 400 invalid_version.

  • Idempotency-Keystring

    Makes a write safe to retry: the same key and body replay the first response with X-Idempotent-Replay: true. A different body answers 422 idempotency_key_reused; keys last at least 24 hours.

Body

application/jsonrequired
  • typestring
  • source_pathstring

    The path to redirect. No other redirect of the site may use it.

  • target_idstring

    The id of the target article or category.

  • localestring

    The language of the target.

Responses

The updated redirect.

Headers

  • nd-versionstring

    The contract version that answered the request.

  • X-Idempotent-Replaystring

    true when the response replays an earlier request sent with the same Idempotency-Key, otherwise false.

  • X-RateLimit-Limitinteger

    Requests allowed per minute: 120 for GET, 20 for writes, per key or OAuth grant.

  • X-RateLimit-Remaininginteger

    Requests left in the current window.

  • Retry-Afterinteger

    Seconds until the next request is accepted; 0 while requests remain.

  • idstringrequired

    The redirect identifier.

  • localestringrequired

    The language of the target.

  • typestringrequired
  • originstringrequired

    manual for a redirect someone created, system for one Notiondesk created when a slug changed.

  • source_pathstringrequired

    The path that redirects.

  • target_idstring | nullrequired

    The id of the target article or category.

  • target_titlestring | nullrequired

    The target's title in locale.

  • target_slugstring | nullrequired

    The target's path segment in locale.

  • target_statusstring | nullrequired

    The target's status, such as published or draft; a redirect works only while its target is published.