Create Document from File
Create a document by uploading a file up to 100 MB in size.
Only these file types are allowed: txt, md, rtf, pdf, ppt, pptx, pptm, doc, docx, docm
Body
-
folder_id string
-
key string
The key you receive after uploading a file. See /uploads/signed-url
Responses
-
Request is accepted and a document will be created after the file is converted into readable format, which can take from couple minutes to up to an hour.
-
422 application/json
Request validation errors.
-
429 application/json
Reached limit for pending file imports. Try again after old imports are finished, or they timeout after an hour due to file conversion failures.
POST /documents/file
curl \
-X POST https://getcody.ai/api/v1/documents/file \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"folder_id":"string","key":"string"}'
Request example
{
"folder_id": "string",
"key": "string"
}
Response examples (422)
{
"message": "string",
"errors": {
"folder_id": [
"string"
],
"key": [
"string"
],
"file_size": [
"string"
],
"file_name": [
"string"
],
"content_type": [
"string"
]
}
}
Response examples (429)
{
"message": "You have reached the limit of files that can be processed simultaneously. Please try again in few minutes."
}