Upload a file
Begins an upload in three steps: this call answers the file, uploading, and an upload_url; PUT the bytes there; then call POST /knowledge/files/{file_id}/complete.
Scope: knowledge:write.
bearerAuthAuthorizationBearer <token>An organization API key, rky_live_…, created in Settings → API. Send it only from a server.
Idempotency-Key?stringOptional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as order-10482-ready. Retrying with the same key and body replays the first response instead of repeating the write.
8 <= length <= 200application/json- body
Begins an upload. Ricky answers where to PUT the bytes.
title*stringTitle the agents see.
1 <= length <= 160description?stringWhen the agents should use it.
length <= 2000""filename*stringFile name, with its extension.
1 <= length <= 255mime_type*stringFile type: PDF, Word or Excel up to 100 MB; JPEG or PNG up to 5 MB.
"application/pdf""application/vnd.openxmlformats-officedocument.wordprocessingml.document""application/vnd.openxmlformats-officedocument.spreadsheetml.sheet""image/jpeg""image/png"size_bytes*integerExact size of the file you will upload.
1 <= value <= 9007199254740991Success.
application/json- response
data*A file waiting for its bytes, and where to put them.
curl -X POST 'https://getricky.ai/api/v1/knowledge/files' \ -H 'Idempotency-Key: order-10482-ready' \ -H 'Content-Type: application/json' \ -d '{ "title": "Catálogo de lentes 2026", "filename": "catalogo-2026.pdf", "mime_type": "application/pdf", "size_bytes": 482133}'{ "data": { "file": { "id": "f1a2b3c4-d5e6-4f7a-8b9c-0d1e2f3a4b5c", "title": "Catálogo de lentes 2026", "description": "Precios y modelos vigentes.", "filename": "catalogo-2026.pdf", "mime_type": "application/pdf", "size_bytes": 482133, "status": "uploading", "consult_enabled": true, "send_enabled": true, "page_count": 12, "preview": "Catálogo 2026. Lentes de sol…", "extraction_error": null, "download_url": null, "created_at": "2026-10-14T15:30:00.000Z", "updated_at": "2026-10-14T15:30:00.000Z" }, "upload_url": "https://storage.example.com/upload/sign/media/d9e0f1a2-b3c4-4d5e-8f6a-7b8c9d0e1f2a/knowledge/f1a2b3c4-d5e6-4f7a-8b9c-0d1e2f3a4b5c.pdf?token=…" }}