Skip to main content
POST
/
file
Upload File
curl --request POST \
  --url https://api.cozmox.ai/file \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
{
  "id": "<string>",
  "orgId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "object": "file",
  "status": "processing",
  "name": "<string>",
  "originalName": "<string>",
  "bytes": 123,
  "purpose": "<string>",
  "mimetype": "<string>",
  "key": "<string>",
  "path": "<string>",
  "bucket": "<string>",
  "url": "<string>",
  "parsedTextUrl": "<string>",
  "parsedTextBytes": 123,
  "metadata": {}
}

Authorizations

Authorization
string
header
required

Retrieve your API Key from Dashboard.

Body

multipart/form-data
file
file
required

This is the File you want to upload for use with the Knowledge Base.

Response

File uploaded successfully

id
string
required

This is the unique identifier for the file.

orgId
string
required

This is the unique identifier for the org that this file belongs to.

createdAt
string<date-time>
required

This is the ISO 8601 date-time string of when the file was created.

updatedAt
string<date-time>
required

This is the ISO 8601 date-time string of when the file was last updated.

object
enum<string>
Available options:
file
status
enum<string>
Available options:
processing,
done,
failed
name
string

This is the name of the file. This is just for your own reference.

Maximum string length: 40
originalName
string
bytes
number
purpose
string
mimetype
string
key
string
path
string
bucket
string
url
string
parsedTextUrl
string
parsedTextBytes
number
metadata
object