Files
Upload files securely for use in automation workflows.
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: 26OptionalExample:
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).
b4fznghynbdemslfd5k044fgd
Pattern: ^[a-zA-Z0-9-_]+$
file_namestring · min: 1 · max: 256RequiredExample:
The name of the file to be uploaded.
test-file.pdf
Responses
201
The file upload created
application/json
400
Invalid input values
application/json
404
The specified agent was not found
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?