Skip to main content
POST
Create file context

Authorizations

Authorization
string
header
required

Pass an API key or JWT token. API keys can be sent as Authorization: Bearer <key> or Authorization: <key>.

Body

application/json
context_key
string
required

Unique, immutable identifier in snake_case.

Required string length: 1 - 100
Pattern: ^[a-z][a-z0-9_]*$
display_name
string
required

Human-readable name.

Required string length: 1 - 255
description
string | null
Maximum string length: 1000
allowed_extensions
string[]

Allowed file extensions (e.g. ["pdf", "png"]). Empty array allows all.

max_file_size_mb
integer
default:10

Maximum file size in megabytes.

Required range: 1 <= x <= 500
storage_path_template
string | null

Custom S3 path template for uploaded files.

Maximum string length: 500
reject_blank_files
boolean
default:true

Reject files detected as blank or placeholder content.

reject_corrupt_files
boolean
default:true

Reject files that fail integrity checks.

scan_for_viruses
boolean
default:true

Scan files for malware using ClamAV.

upload_rate_limit
object | null

Optional per-context upload rate limit.

storage_quota_mb
integer | null

Storage quota in MB. null means unlimited.

Required range: 1 <= x <= 10485760
metadata
object | null
storage_config_id
string | null

ID of the storage bucket (config_id) this context routes uploads to. null uses the tenant's default bucket.

Example:

"cfg_a1b2c3d4e5f6"

Response

File context created.

status
enum<string>
Available options:
SUCCESS
message
string
data
object
timestamp
string<date-time>