---
title: "Create training data"
method: POST
path: "/training-data"
tags: ["Training Data"]
---

# Create training data

`POST /training-data`

## Request

- Base URL: `https://api.weav.com/v1`
- URL: `https://api.weav.com/v1/training-data`
- Auth: HTTP bearer

Create training data. Supports multiple types: text, url, file, video, qa. Processing happens automatically in the background.

## Request body

- object
  - `type` 'text' | 'url' | 'file' | 'video' | 'qa', required
  - `content` string: Required for type='text'
  - `url` string, url: Required for type='url'
  - `file` string, binary: Required for type='file' (multipart/form-data)
  - `video_url` string, url: Required for type='video'
  - `question` string: Required for type='qa'
  - `answer` string: Required for type='qa'
  - `title` string, nullable
  - `description` string, nullable
  - `agent_ids` string[], nullable: Array of agent UUIDs to attach this training data to

## Response `201`

Training data created. Processing will happen in background.

- TrainingData
  - `id` string, uuid
  - `type` 'text' | 'url' | 'file' | 'video' | 'qa'
  - `source` string
  - `title` string, nullable
  - `description` string, nullable
  - `slug` string, nullable
  - `is_processed` boolean
  - `status` 'queued' | 'processing' | 'completed' | 'failed', nullable
  - `training_folder_id` string, uuid, nullable
  - `created_at` string, date-time, nullable
  - `updated_at` string, date-time, nullable

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `422`: Business rule violation (for example, URL requires discovery workflow)
- `500`: Creation failed

---

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