Fetchply Docs
POST
/api/v1/agents/{id}/sources/files

Upload a document (PDF, DOCX, PPTX, CSV, XLS/XLSX, TXT, Markdown, HTML, or JSON; 10 MB max) as a file training source and queue background indexing. Send the document as a file field in a multipart/form-data body. Poll GET /agents/{id}/sources or GET /agents/{id}/training-status to watch progress. Requires the write:sources permission.

Authorization

BearerAuth write:sources
AuthorizationBearer <token>

In: header

Scope: write:sources

Path Parameters

id*string

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/agents/string/sources/files" \  -F file="string"
{
  "id": 0,
  "agentId": "string",
  "type": "file",
  "name": "string",
  "status": "processing"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}