Training Data APIs
Last updated: February 2, 2026
Background
These APIs allow you to upload your documents and other data directly to Pylon, keeping them internal and avoiding publishing them on the public internet
Supported APIs
POST /training-data/uploadPOST /training-data/upload-content
POST /training-data/upload
Upload one or multiple files to a new or existing training data source using multipart form data.
Request Parameters:
training_data_id(string, optional) - ID of existing training data source. If not provided, a new source will be createdtraining_data_name(string, conditional) - Required when creating new training data (no training_data_id provided)visibility(string, optional) - Controls who can access this dataValues:
everyone(default)ai_agent_onlyuser_only
files(file[], required) - One or more files to upload
Limits:
Maximum file size: 100MB per file
Maximum total request size: 500MB
Behavior:
Creates a new training data source if
training_data_idis not providedAdds files to existing training data source if
training_data_idis provided
POST /training-data/upload-content
Upload text content as a file to a new or existing training data source. Supports both direct form-encoded data and nested Zapier format.
Request Parameters:
training_data_id(string, optional) - ID of existing training data source. If not provided, a new source will be createdtraining_data_name(string, conditional) - Required when creating new training data (no training_data_id provided)content(string, required) - The text content to uploadfile_name(string, required) - Name for the file (e.g., "document.txt")visibility(string, optional) - Controls who can access this dataValues:
everyone(default)ai_agent_onlyuser_only
external_id(string, optional) - Unique identifier for idempotent updates. If provided and a document with this ID exists, it will be updated instead of creating a duplicate
Content Types Supported:
application/x-www-form-urlencoded- Standard form dataapplication/json- JSON payloadZapier POST request
Limits:
Maximum content size: 100MB
Behavior:
Creates a new training data source if training_data_id is not provided
Adds content to existing training data source if training_data_id is provided
If external_id is provided and matches an existing document, that document is updated (idempotent operation)
If external_id is not provided, always creates a new document
Zapier Setup
You can use Zapier to direct your documents into Pylon as they update.


