Set document URL

Change a document's address: a new readable slug, with or without the random suffix. The old URL keeps redirecting, and the stable /d/ link never changes. Owner only, and only on plans with custom URLs (on Free, a document keeps the URL it was published at).

post/api/v1/set_document_url

Request

  • Base URL: https://offprint.io
  • URL: https://offprint.io/api/v1/set_document_url
  • Auth: HTTP bearer

Request body

document_idstring uuid

The document's id, from publish_document or list_documents. Pass this or slug.

slugstring

The document's current slug, to identify it.

new_slugstring required

The new readable stem for the address. A random suffix is appended unless clean_url is set.

clean_urlboolean

Use new_slug exactly, with no random suffix.

Response

Success.

urlstring required

Absolute URL of the document's page.

stable_urlstring required

Permanent /d/ link that survives renames and moves.

slugstring required

Changes

No recorded changes to this operation across all 1 revision of this API.