---
title: "Move document"
method: POST
path: "/api/v1/move_document"
---

# Move document

`POST /api/v1/move_document`

## Request

- Base URL: `https://offprint.io`
- URL: `https://offprint.io/api/v1/move_document`
- Auth: HTTP bearer

Move a document to another project and/or directory you can write to. Purely organizational: URLs, revisions, and sharing are untouched (though project membership of the destination then applies). Documents can only live in projects owned by the document's owner.

## Request body

- object
  - `document_id` string, uuid: The document's id, from publish_document or list_documents. Pass this or slug.
  - `slug` string: The document's slug, e.g. 'roadmap-k3n8qz'. Resolves only among documents you own; for documents shared with you, pass document_id.
  - `project` string: Destination project (name or id). Defaults to your Default project.
  - `directory_path` string: Destination directory path; missing directories are created. Omit for the project root.

## Response `200`

Success.

- object
  - `document_id` string, required
  - `moved` boolean, required
  - `project` string, nullable, required: Name of the project the document is filed in.
  - `directory_path` string, nullable, required: Directory path inside the project; null at the project root.

## Other responses

- `400`: Invalid arguments.
- `401`: Missing, expired or revoked API key.
- `403`: The key's scope, restriction or role does not allow this.
- `404`: Not found, or outside the key's restriction.
- `409`: The document changed since expected_revision.
- `429`: A plan limit or daily quota was reached.

---

[API](https://skmtc.dev/offprint/apis/offprint-api.md) · [All operations](https://skmtc.dev/offprint/apis/offprint-api/llms.txt) · [OpenAPI document](https://skmtc.dev/offprint/apis/offprint-api/revisions/d50a825280d2?raw)
