WayloAIWaylo Docs
APIReferenceDocuments

Upload a document

POST
/documents

Upload a document. The API stores it and queues it for chunking and embedding; poll the document for its processing status.

Access: workspace_admin · API key documents:write

Authorization

api-key
headerAuthorizationBearer <sk_waylo_<lookup><secret><checksum>>

Header Parameters

Authorization*string

Your API key.

Request Body

multipart/form-data
  1. body
file*unknown
workspaceId*string
Formatuuid
name?string
Lengthlength <= 100
description?string
Lengthlength <= 500

Response Body

Created

application/json
  1. response
id*string
workspaceId*string
name*string
description*string|null
active*boolean
filename*string
contentType*string
sizeBytes*number
status*string
Value in"uploaded""processing""ready""failed"
error*string|null
chunkCount*number
embeddedChunkCount*number
createdByUserId*|
Formatuuid
createdByUserName*string|null
updatedByUserId*|
Formatuuid
updatedByUserName*string|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.poc.app.waylovoice.ai/documents' \  -H 'Authorization: Bearer sk_waylo_...' \  -F 'file=null' \  -F 'workspaceId=ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c'
Example Response
{  "id": "string",  "workspaceId": "string",  "name": "string",  "description": "string",  "active": true,  "filename": "string",  "contentType": "string",  "sizeBytes": 0,  "status": "uploaded",  "error": "string",  "chunkCount": 0,  "embeddedChunkCount": 0,  "createdByUserId": "4d2aef9a-17b0-44e6-902e-616812033620",  "createdByUserName": "string",  "updatedByUserId": "b38eaad7-8efa-49e7-b0aa-619916a3821e",  "updatedByUserName": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}