Skip to content

Intake API Reference

Base URL: http://localhost:8001 (local) | https://api.raw_to_knowledge.internal (production)

All endpoints are under /v1/.

POST /v1/artifacts

Ingest a new transcript artifact and run the full CII pipeline.

Request body:

Field Type Required Description
source_system string Yes Origin system label (e.g. zoom, teams, manual)
source_type enum Yes vtt, srt, plain_text, or json
source_ref string No External identifier; enables idempotency checks
legal_basis enum Yes GDPR basis: consent, legitimate_interest, contract, legal_obligation, not_assessed
customer_scope string No Customer context label for scoping
raw_content string Yes Full transcript text

Responses:

Code Description
201 Intake completed; returns artifact_id, segment_count, question_count, answer_count, pii_tagged_segments
409 Duplicate source_ref
422 legal_basis is NOT_ASSESSED

GET /v1/candidates

List extracted candidate questions for human review.

Query parameters:

Parameter Type Description
artifact_id string Filter by artifact
flow_type flow_a | flow_b Filter by flow type
limit integer (1–500) Page size (default 100)
offset integer Pagination offset

Response: Paginated list of CandidateQuestion objects.

GET /v1/candidates/{candidate_id}/answers

Retrieve candidate answers paired with a given question (Flow A only).

Response: List of CandidateAnswer objects; empty for Flow B candidates.

GET /health

Service health check.

Response: {"status": "ok", "service": "intake-service", "version": "0.1.0"}