Skip to main content
POST /openapi/memorylake/api/v1/projects/{id}/documents/quick-add
Adds an uploaded file to the project as a document in one step. The file must be uploaded first via the Upload API. Duplicate file names are handled automatically by appending a numeric suffix. The document will be queued for processing immediately after creation.

Path Parameters

id
string
required
Project ID

Request Body

object_key
string
required
Storage key of the uploaded file (from create-multipart response)
file_name
string
required
Display name for the document
curl -X POST 'https://app.memorylake.ai/openapi/memorylake/api/v1/projects/proj-a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6/documents/quick-add' \
  -H 'Authorization: Bearer sk_xxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "object_key": "documents/report.pdf",
    "file_name": "my-document.pdf"
  }'

Response

data
object
{
  "success": true,
  "data": {
    "drive_item_id": "sc-5c6bf0f82d624a20a6fa4696997bdd46:7d8cf1e93f634b31b5",
    "file_name": "my-document.pdf",
    "datasource_id": "ds-a1b2c3d4e5f6g7h8",
    "document_id": "doc-a1b2c3d4e5f6g7h8",
    "created_at": "2024-01-15T10:30:00Z"
  }
}