Skip to main content
PUT
/
api
/
kb
/
documents
/
reorder
Reorder documents
curl --request PUT \
  --url https://api.morphic.io/api/kb/documents/reorder \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "document_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

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

Body

application/json

Request body for PUT /kb/documents/reorder. Sets position to index for each id.

document_ids
string<uuid>[]
required

Ordered list of document UUIDs (siblings under parent)

Minimum array length: 1
parent_id
string<uuid> | null

Parent folder UUID; null = root level

Response

Successful Response