---
title: "Upload files as training data"
method: POST
path: "/training-data/upload"
tags: ["training-data"]
---

# Upload files as training data

`POST /training-data/upload`

Uploads one or more files to a training data configuration.

**Rate limit:** 30 requests per minute

## Response `200`

- TrainingDataUploadResponseBody
  - `data` TrainingData
    - `created_at` string
    - `documents` TrainingDataDocument[]
      - `external_id` string
      - `file_name` string
      - `file_size` integer
      - `file_type` string
      - `id` string
      - `s3_key` string
    - `exclude_from_kb_search` boolean
    - `id` string
    - `name` string
    - `scrape_status` TrainingDataScrapeStatus
      - `last_scraped_at` string
      - `pages_scraped` integer
      - `status` string
      - `total_pages` integer
    - `type` string
    - `updated_at` string
    - `visibility` 'everyone' | 'user_only' | 'ai_agent_only'
  - `request_id` string

## Other responses

- `400` — The request was invalid or could not be completed.
- `403` — The authenticated caller or organization is not allowed to access this endpoint or operation.
- `500` — An unexpected internal error occurred.

## Changes

> 22 revisions in range; 8 could not be searched.

- **2026-08-14** `ad855d921ee9` — 1 breaking, 3 warning, 4 info
  - request property `visibility` was restricted to a list of enum values
  - added the new `ai_agent_only` enum value to the `data/visibility` response property for the response status `200`
  - added the new `everyone` enum value to the `data/visibility` response property for the response status `200`
  - added the new `user_only` enum value to the `data/visibility` response property for the response status `200`
  - …4 more

[Change history](https://skmtc.dev/usepylon/apis/pylon-api/changes/training-data/upload/post.md)

---

[API](https://skmtc.dev/usepylon/apis/pylon-api.md) · [All operations](https://skmtc.dev/usepylon/apis/pylon-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/usepylon/pylon-api/revisions/7b12ab92de27/schema)
