Files

Upload files securely for use in automation workflows.

Upload File

post
/files

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

Authorizations
x-api-keystringRequired
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
chevron-right
201

The file upload created

application/json

File upload response containing S3 presigned POST credentials.

Use these fields to upload your file directly to S3:

  1. POST to upload_url with multipart/form-data
  2. Include all upload_fields as form fields
  3. Add your file as 'file' field
  4. Use the returned id to reference this file in other API calls
file_namestringRequired

The sanitized filename that will be used for storage

Example: document.pdf
idstringRequired

Unique file identifier - use this ID when referencing the file in other API calls (like starting a run). Only available after successful upload.

Example: s3://bucket/path/to/uploaded-file.pdf
upload_fieldsany ofOptional

S3 authentication fields - include ALL of these as form fields in your multipart upload request. These contain the signature, policy, and other S3 authentication data.

Example: {"AWSAccessKeyId":"AKIAIOSFODNN7EXAMPLE","Content-Type":"application/pdf","key":"path/to/file.pdf","policy":"eyJ...base64_policy...","signature":"abc123..."}
or
nullOptional
upload_http_methodstring · enumOptional

HTTP method for upload - always POST for S3 presigned uploads

Default: POSTExample: POSTPossible values:
upload_urlstringRequired

S3 presigned POST URL where you upload your file. POST your multipart/form-data request to this URL.

Example: http://example.com/file.pdf
post
/files

Last updated

Was this helpful?