Files

Upload files securely for use in automation workflows.

Upload File

post

Create a secure file upload target with detailed upload instructions. Returns a presigned URL and form fields for direct S3 upload.

Authorizations
Body
agent_idstring · min: 1 · max: 26Optional

The ID of the agent in which this file will be used; may be omitted if the API token is scoped to an agent (rather than the organization).

Example: b4fznghynbdemslfd5k044fgdPattern: ^[a-zA-Z0-9-_]+$
file_namestring · min: 1 · max: 256Required

The name of the file to be uploaded.

Example: test-file.pdf
Responses
201
The file upload created
application/json
post
POST /v2/files HTTP/1.1
Host: rest-api.app.kognitos.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "agent_id": "b4fznghynbdemslfd5k044fgd",
  "file_name": "test-file.pdf"
}
{
  "file_name": "document.pdf",
  "id": "s3://bucket/path/to/uploaded-file.pdf",
  "upload_fields": {
    "AWSAccessKeyId": "AKIAIOSFODNN7EXAMPLE",
    "Content-Type": "application/pdf",
    "key": "path/to/file.pdf",
    "policy": "eyJ...base64_policy...",
    "signature": "abc123..."
  },
  "upload_http_headers": {},
  "upload_http_method": "POST",
  "upload_url": "http://example.com/file.pdf"
}

Was this helpful?