TrainingProject Files
Upload Training File
Upload a document to your project's knowledge base via a publicly accessible URL.
Upload a document to your project's knowledge base via a publicly accessible URL.
Authorization
bearerToken
AuthorizationBearer <token>
API token for YourGPT Public APIs. Create tokens in Settings > API Tokens in your YourGPT dashboard.
In: header
Request Body
application/json
project_uid*string
Project unique identifier.
file_url*string
Publicly accessible URL of the file to upload. Supported formats: txt, pdf, doc, docx, ppt, pptx, csv, json, jsonl, xlsx, xls.
tags?string
Comma-separated tags.
extra_settings?
Optional configuration for the file.
Response Body
application/json
application/json
curl -X POST "https://api.yourgpt.ai/chatbot/v1/uploadFile" \ -H "Content-Type: application/json" \ -d '{ "project_uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "file_url": "https://example.com/documents/product-guide.pdf" }'{
"type": "RXSUCCESS",
"message": "File uploaded successfully",
"data": {
"id": 501,
"project_id": 10001,
"user_id": 42,
"name": "product-guide.pdf",
"extra_settings": {
"enable_citation": false
},
"created_at": "2026-01-15T10:30:00.000Z",
"updated_at": "2026-01-15T10:30:00.000Z"
}
}{
"type": "RXERROR",
"message": "File type not supported. Allowed: .txt, .pdf, .doc, .docx, .ppt, .pptx, .csv, .json, .jsonl, .xlsx, .xls"
}