# Move documents (/reference/api/documents/move-documents)

```json
[
  {
    "method": "PATCH",
    "path": "/api/v1/documents",
    "operationId": "moveDocuments",
    "tags": [
      "Documents"
    ],
    "summary": "Move documents",
    "description": "Moves documents into a folder, or out of their folder when `folderId` is null. Moving keeps generated audio.",
    "x-required-scope": "documents:write",
    "security": [
      {
        "oauth": [
          "documents:write"
        ]
      },
      {
        "sessionCookie": []
      },
      {
        "secureSessionCookie": []
      }
    ],
    "responses": {
      "200": {
        "description": "Updated document metadata.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentMetadata"
                  }
                }
              },
              "required": [
                "data"
              ]
            }
          }
        }
      },
      "429": {
        "description": "Compute admission or usage is limited.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "Retry-After": {
            "description": "Seconds until retry.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        }
      },
      "default": {
        "description": "Request failed. Inspect error.code and error.message.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "requestBody": {
      "required": true,
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "minItems": 1,
                "maxItems": 200
              },
              "folderId": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "ids",
              "folderId"
            ]
          },
          "examples": {
            "move": {
              "summary": "Move into a folder",
              "value": {
                "ids": [
                  "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
                ],
                "folderId": "research"
              }
            }
          }
        }
      }
    }
  }
]
```

## Components

```json
{
  "#/components/schemas/DocumentMetadata": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "pattern": "^[a-f0-9]{64}$"
      },
      "name": {
        "type": "string"
      },
      "size": {
        "type": "integer"
      },
      "lastModified": {
        "type": "number"
      },
      "type": {
        "type": "string",
        "enum": [
          "pdf",
          "epub",
          "docx",
          "html"
        ]
      },
      "scope": {
        "type": "string",
        "enum": [
          "user"
        ]
      },
      "folderId": {
        "type": "string"
      },
      "recentlyOpenedAt": {
        "type": "number"
      },
      "contentVersion": {
        "type": "string"
      },
      "author": {
        "type": "string"
      },
      "language": {
        "type": "string"
      },
      "readingProgress": {
        "type": "object",
        "properties": {
          "fraction": {
            "type": [
              "number",
              "null"
            ]
          },
          "updatedAtMs": {
            "type": "number"
          }
        },
        "required": [
          "fraction",
          "updatedAtMs"
        ]
      }
    },
    "required": [
      "id",
      "name",
      "size",
      "lastModified",
      "type"
    ]
  },
  "#/components/schemas/Error": {
    "type": "object",
    "properties": {
      "error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "retryAfterMs": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "code",
          "message"
        ]
      }
    },
    "required": [
      "error"
    ]
  }
}
```