Upload File

Upload and create a new file in Extend. This endpoint accepts file contents and registers them as a File in Extend, which can be used for [running workflows](https://docs.extend.ai/2025-04-21/developers/api-reference/workflow-endpoints/run-workflow), [creating evaluation set items](https://docs.extend.ai/2025-04-21/developers/api-reference/evaluation-set-endpoints/bulk-create-evaluation-set-items), [parsing](https://docs.extend.ai/2025-04-21/developers/api-reference/parse-endpoints/parse-file), etc. If an uploaded file is detected as a Word or PowerPoint document, it will be automatically converted to a PDF. Supported file types can be found [here](https://docs.extend.ai/2025-04-21/product/general/supported-file-types). This endpoint requires multipart form encoding. Most HTTP clients will handle this encoding automatically (see the examples).

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

x-extend-api-version"2025-04-21"Optional
API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.
x-extend-workspace-idstringOptional
The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.

Query parameters

convertToPdfbooleanOptionalDefaults to false

When true, converts the uploaded file to PDF. Supported file types include images (JPEG, PNG, TIFF, GIF, BMP, WebP, HEIC/HEIF), Word documents, PowerPoint, Excel, and HTML.

Request

This endpoint expects a multipart form containing a file.
filefileRequired
The file contents to upload

Response

Successfully uploaded file
successboolean
fileobject

Errors

400
Bad Request Error
401
Unauthorized Error