Page redirects

Create a page redirect

Creates a page redirect from source_path to an article or category in one language. Requires a plan with page redirects.

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

Authorizations

  • Authorizationstringheader

    api_key · http · bearer

    write
  • Authorizationstringheader

    oauth · oauth2

    write

Path parameters

  • site_idstringrequired

    The id of a site from List sites.

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
  • typestringrequired
  • source_pathstringrequired

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

  • target_idstringrequired

    The id of an article from List articles or of a category from List categories.

  • localestringrequired

    The language of the target; the target must have a translation in it.

Responses

The new 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.