For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Community
Create Account
Sign in
Community
Create Account
Sign in
API Reference
Files
Upload a file
Copy page
POST
https://api.x.flatfile.com/v1
/
files
Authentication
Authorization
Bearer
Bearer authentication of the form
Bearer <token>
, where token is your auth token.
Headers
X-Disable-Hooks
"true"
Required
Request
This endpoint expects a multipart form containing a file.
spaceId
string
Required
Space ID
environmentId
string
Required
Environment ID
mode
enum
Optional
The storage mode of file to insert, defaults to "import"
Allowed values:
import
export
file
file
Required
A binary payload containing the file contents
actions
list of objects
Optional
The actions attached to the file
Show 25 properties
origin
enum
Optional
The origin of the file, ie filesystem
Allowed values:
filesystem
googledrive
box
onedrive
Response
This endpoint returns an object.
data
object
Any uploaded file of any type
Show 19 properties
Errors
400
Bad Request Error