Files
Create File
API Reference
Collections
Records
Workflows
- GETDiscover Workflows
- GETGet Discoverable Workflow
- GETGet Discoverable Workflow Version
- POSTRun Discoverable Workflow
- POSTCancel a Discoverable Workflow Run
- GETGet Workflows
- GETGet a Workflow
- GETGet Workflow Runs
- POSTRun a Workflow
- POSTReplay a Workflow Run
- GETGet a Workflow Run
- POSTCancel a Workflow Run
- GETGet Workflow Versions
- GETGet a Workflow Version
Tests
Variables
Files
Create File
Upload a new file to the app.
POST
/
apps
/
{app_id}
/
files
curl --request POST \
--url https://api.withcortex.ai/apps/{app_id}/files \
--header 'Content-Type: application/json' \
--data '{
"document_extract_contents": true,
"document_extract_images": true
}'
{
"id": "<string>",
"file_id": "<string>",
"file_filename": "<string>",
"file_size": 123,
"file_mimetype": "<string>",
"file_url": "<string>",
"file_format": "DOCUMENT",
"document": {
"filename": "<string>",
"filetype": "<string>",
"contents": [
{
"id": "<string>",
"type": "TITLE",
"content": "<string>",
"page": 123,
"parent": "<string>"
}
],
"images": [
{
"id": "<string>",
"file_id": "<string>",
"image_url": "<string>",
"page": 123,
"height": 123,
"width": 123
}
],
"time": 123
},
"document_extract_contents": true,
"document_extract_images": true,
"created_at": "2023-12-25"
}
Path Parameters
Response
200 - application/json
Available options:
DOCUMENT
Available options:
TITLE
, TEXT
, UNCATEGORIZED_TEXT
, NARRATIVETEXT
, BULLETEDTEXT
, ABSTRACT
, THREADING
, FORM
, FIELD-NAME
, VALUE
, LINK
, COMPOSITEELEMENT
, IMAGE
, PICTURE
, FIGURECAPTION
, FIGURE
, CAPTION
, LIST
, LISTITEM
, LIST-ITEM
, CHECKED
, UNCHECKED
, ADDRESS
, EMAILADDRESS
, PAGEBREAK
, FORMULA
, TABLE
, HEADER
, HEADLINE
, SUBHEADLINE
, PAGE-HEADER
, SECTION-HEADER
, FOOTER
, FOOTNOTE
, PAGE-FOOTER
Was this page helpful?
curl --request POST \
--url https://api.withcortex.ai/apps/{app_id}/files \
--header 'Content-Type: application/json' \
--data '{
"document_extract_contents": true,
"document_extract_images": true
}'
{
"id": "<string>",
"file_id": "<string>",
"file_filename": "<string>",
"file_size": 123,
"file_mimetype": "<string>",
"file_url": "<string>",
"file_format": "DOCUMENT",
"document": {
"filename": "<string>",
"filetype": "<string>",
"contents": [
{
"id": "<string>",
"type": "TITLE",
"content": "<string>",
"page": 123,
"parent": "<string>"
}
],
"images": [
{
"id": "<string>",
"file_id": "<string>",
"image_url": "<string>",
"page": 123,
"height": 123,
"width": 123
}
],
"time": 123
},
"document_extract_contents": true,
"document_extract_images": true,
"created_at": "2023-12-25"
}