LogoLogo
About
  • Home
  • Guides
  • BDK
  • REST API
  • Release Notes
  • Overview
    • REST API Overview
  • API Reference
    • Invoke
    • Run
    • Upload
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. API Reference

Upload

Manage your uploads.

Last updated 2 months ago

Was this helpful?

Create a URL for a file upload

post

Creates a pre-signed URL for uploading a file to Kognitos storage for later use in a run.

Supported File Types:

The following file types are currently supported for uploading:

Image

  • .jpeg
  • .jpg
  • .png

Data

  • .txt
  • .json
  • .yml
  • .yaml
  • .csv
  • .pdf

Excel

  • .xlsx
  • .xls

Docx

  • .docx
  • .doc

HTML

  • .html
  • .htm

Email

  • .eml

ERP Document

  • .edi

Audio

  • .mp3
  • .wav
Authorizations
Body
file_namestringOptional
Responses
201
File upload url created successfully. Note the upload_url is valid for only 5 minutes. To upload the file, make a HTTP upload_http_method request to the upload_url with the file as the body - be sure to set any required headers in upload_http_headers The file can then be passed to a run after upload by providing the blob_uri using the attachments_key parameter.
application/json
400
Client error - see message for details
application/json
403
Invalid API key
application/json
404
Department not found
application/json
500
Internal server error
application/json
post
POST /v1/upload HTTP/1.1
Host: rest-api.app.kognitos.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 20

{
  "file_name": "text"
}
{
  "upload_url": "text",
  "upload_http_method": "text",
  "upload_http_headers": {},
  "blob_uri": "https://example.com"
}