---
title: "Upload a File (txt file or JSON dump)"
method: POST
path: "/ingestion/upload"
tags: ["Sources"]
---

# Upload a File (txt file or JSON dump)

`POST /ingestion/upload`

## Request

- Base URL: `https://api.untools.co/api`
- URL: `https://api.untools.co/api/ingestion/upload`
- Auth: HTTP bearer

Creates a new SourceConnection with provider=upload and stores the file content as a single SourceItem. Only .txt files are accepted — schema detection is deferred to the AI playbook generation step.

## Request body `multipart/form-data`

- object
  - `file` string, binary, required
  - `label` string: Optional label (defaults to filename)

## Response `201`

Upload + parse result

- object
  - `connection` SourceConnection
    - `id` string, uuid
    - `provider` 'zendesk' | 'github' | 'upload'
    - `label` string
    - `config` object
    - `status` 'connected' | 'syncing' | 'error' | 'disconnected'
    - `lastSyncAt` string, date-time, nullable
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `itemCount` integer
  - `fetched` integer
  - `created` integer
  - `updated` integer

## Other responses

- `400`: Invalid file
- `413`: File too large

---

[API](https://skmtc.dev/untools/apis/ai-note-taker-api.md) - [All operations](https://skmtc.dev/untools/apis/ai-note-taker-api/llms.txt) - [OpenAPI document](https://skmtc.dev/untools/apis/ai-note-taker-api/revisions/e2fd4308c6c3?raw)
