Research Sources

Upload, list, retrieve, delete, and reprocess research source files.

Overview

Research sources are the raw input data for Praxiom AI -- user interviews, support tickets, surveys, usage data, and feedback documents. Files are uploaded via multipart form data, stored in R2, and processed asynchronously for text extraction and transcription.

Supported source types: interview, support_ticket, survey, usage_data, feedback, other

Max file size: 100 MB


Upload Research File

POST /api/research/upload

Upload a research file via multipart/form-data. The file is stored in cloud storage and background processing is triggered for text extraction.

Requires: Active subscription.

Request Body (multipart/form-data)

NameTypeRequiredDescription
filefileYesThe research file to upload
workspace_idstringYesTarget workspace UUID
source_typestringYesOne of: interview, support_ticket, survey, usage_data, feedback, other
titlestringYesDisplay title for the source

Example Request

curl -X POST https://api.praxiomai.xyz/api/research/upload \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@interview_notes.pdf" \
  -F "workspace_id=550e8400-e29b-41d4-a716-446655440000" \
  -F "source_type=interview" \
  -F "title=Q1 User Interviews"
import requests

with open("interview_notes.pdf", "rb") as f:
    resp = requests.post(
        "https://api.praxiomai.xyz/api/research/upload",
        headers={"Authorization": f"Bearer {token}"},
        files={"file": ("interview_notes.pdf", f, "application/pdf")},
        data={
            "workspace_id": "550e8400-e29b-41d4-a716-446655440000",
            "source_type": "interview",
            "title": "Q1 User Interviews",
        },
    )
const formData = new FormData();
formData.append("file", fileInput.files[0]);
formData.append("workspace_id", "550e8400-e29b-41d4-a716-446655440000");
formData.append("source_type", "interview");
formData.append("title", "Q1 User Interviews");

const resp = await fetch("https://api.praxiomai.xyz/api/research/upload", {
  method: "POST",
  headers: { Authorization: `Bearer ${token}` },
  body: formData,
});

Response (201 Created)

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "workspace_id": "550e8400-e29b-41d4-a716-446655440000",
  "source_type": "interview",
  "title": "Q1 User Interviews",
  "file_url": "https://storage.example.com/workspaces/550e.../interview_notes.pdf",
  "file_type": "application/pdf",
  "file_size_bytes": 2456789,
  "processing_status": "pending",
  "created_at": "2026-03-27T10:30:00Z"
}

List Research Sources

GET /api/research/sources

List research sources for a workspace with optional filters.

Query Parameters

NameTypeRequiredDescription
workspace_idUUIDYesWorkspace ID
source_typestringNoFilter by source type
processing_statusstringNoFilter by status: pending, completed, failed
limitintegerNoMax results (default: 200, max: 500)
offsetintegerNoPagination offset (default: 0)

Example Request

curl "https://api.praxiomai.xyz/api/research/sources?workspace_id=550e8400-e29b-41d4-a716-446655440000&source_type=interview" \
  -H "Authorization: Bearer $TOKEN"

Response (200 OK)

{
  "sources": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "workspace_id": "550e8400-e29b-41d4-a716-446655440000",
      "source_type": "interview",
      "title": "Q1 User Interviews",
      "file_url": "https://storage.example.com/...",
      "file_type": "application/pdf",
      "file_size_bytes": 2456789,
      "processing_status": "completed",
      "created_at": "2026-03-27T10:30:00Z"
    }
  ],
  "total": 1
}

Get Research Source

GET /api/research/sources/{source_id}

Get a single research source by ID.

Path Parameters

NameTypeRequiredDescription
source_idUUIDYesResearch source ID

Response (200 OK)

Returns the full research source object.


Delete Research Source

DELETE /api/research/sources/{source_id}

Delete a research source and its associated file from storage.

Path Parameters

NameTypeRequiredDescription
source_idUUIDYesResearch source ID

Response (204 No Content)

No response body.


Reprocess Research Source

POST /api/research/sources/{source_id}/reprocess

Manually reprocess a stuck research source. Resets the processing status to pending and re-triggers background extraction. Useful when a source is stuck in pending or failed state.

Note: Cannot reprocess sources that are already completed.

Path Parameters

NameTypeRequiredDescription
source_idUUIDYesResearch source ID

Response (200 OK)

Returns the updated research source object with processing_status: "pending".

Was this helpful?