---
title: "Upload a file"
method: POST
path: "/api-platform/files"
tags: ["Files"]
---

# Upload a file

`POST /api-platform/files`

## Request

- Base URL: `https://api.textcortex.com/v1`
- URL: `https://api.textcortex.com/v1/api-platform/files`
- Auth: HTTP bearer

Upload one file for the current API key user without KB insertion.

Uses the current API key's permissions. Check `GET /capabilities` for availability. Send multipart/form-data with field file. This stores an owned file without KB insertion. The response may include asynchronous processing metadata. skip_existing is not supported.

```bash
curl 'https://api.textcortex.com/v1/api-platform/files' \
  -H 'Authorization: Bearer <API_KEY>' \
  -F 'file=@Contract.pdf'
```

Let your HTTP client set the multipart boundary. Keep the returned `id` as
`file_id`; insert it into a KB separately. A 201 confirms upload acceptance,
not searchable indexing. Oversized uploads return 413; limits can depend on
the deployment and file processing path.

## Query parameters

- `mime_type` union
  - string
  - unknown

## Request body `multipart/form-data`

- object
  - `file` string, binary, required

## Response `201`

Successful response

- UploadedFile
  - `async` object: Optional asynchronous upload-processing metadata.
  - `channel` string, nullable
  - `created_at` string, date-time, nullable
  - `id` string, required
  - `is_owner` boolean
  - `mime_type` string, nullable
  - `name` string, nullable
  - `object` 'file', required
  - `original_filename` string, nullable
  - `sha256` string, nullable
  - `size` integer: File size in bytes.
  - `updated_at` string, date-time, nullable
  - `uri` string, nullable
  - `visibility` string, nullable

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key
- `403`: Access denied
- `404`: Resource not found
- `413`: File exceeds the upload size limit
- `422`: Request validation failed
- `500`: Server error

## Changes

- **2026-10-08** `254204fd17bd`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/textcortex/apis/textcortex-api/changes/api-platform/files/post.md)

---

[API](https://skmtc.dev/textcortex/apis/textcortex-api.md) - [All operations](https://skmtc.dev/textcortex/apis/textcortex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/textcortex/apis/textcortex-api/revisions/b27459bd3c96?raw)
