Skip to main content
POST
/
v1
/
ingestSource
Ingest a source (file upload, YouTube URL, or webpage URL).
curl --request POST \
  --url https://api.getconch.ai/v1/ingestSource \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: <api-key>' \
  --form 'source={"sourceType":"file"}' \
  --form file='@example-file'
{
  "data": {
    "id": "<string>",
    "sourceType": "file",
    "metadata": {},
    "title": "<string>",
    "status": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

x-api-key
string
header
required

Business API key issued per organization.

Body

multipart/form-data
source
string
required

JSON string with source metadata. Must include sourceType (one of file, youtube, webpage). Include url when sourceType is youtube or webpage. Optionally include metadata (object).

Example:

"{\"sourceType\":\"file\"}"

file
file

The file to ingest. Accepted formats: PDF, DOCX, DOC, PPTX, PPT, XLSX, XLS, TXT, CSV, PNG, JPEG/JPG. Required when sourceType is file.

Response

Source ingested successfully.

data
object
required