Skip to main content
PATCH
/
api
/
kb
/
documents
/
{document_id}
/
move
Move a document
curl --request PATCH \
  --url https://api.morphic.io/api/kb/documents/{document_id}/move \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "type": "<string>",
  "title": "<string>",
  "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "slug": "<string>",
  "content": {},
  "content_markdown": "<string>",
  "visibility": "private",
  "parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "position": 0,
  "children_count": 123
}

Authorizations

X-API-Key
string
header
required

API key (sk_xxx) from Developer Settings. No X-Account-ID needed.

Headers

x-account-id
string | null

Path Parameters

document_id
string<uuid>
required

Body

application/json

Request body for PATCH /kb/documents/{id}/move.

parent_id
string<uuid> | null

New parent folder UUID; null = move to root

Response

Successful Response

id
string<uuid>
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
type
string
required
title
string
required

Document title

Maximum string length: 255
account_id
string<uuid>
required
slug
string | null

URL-friendly slug (auto-generated if not provided)

Maximum string length: 255
content
Content · object

BlockNote block structure (JSON); null for folders

content_markdown
string | null

Rendered markdown for AI context; null for folders

visibility
string
default:private

Document visibility: 'private' or 'public'

parent_id
string<uuid> | null
position
integer
default:0

Position for ordering

children_count
integer | null

For folders, number of direct children (only in list/get)