> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ontora.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Corpus Record

> Return one exact record, guarded by its optional record hash.



## OpenAPI

````yaml /openapi.json get /v1/interviews/{interview_id}/corpus/records/{response_id}
openapi: 3.1.0
info:
  title: Ontora API
  description: >-
    Ontora's public API. Covers interview campaigns, transcripts, synthesis
    reports, graph queries, webhooks, and workspace management. 


    **Authentication**: endpoints accept either a Clerk JWT (`Authorization:
    Bearer <token>`) or a workspace API key (`X-API-Key: ont_...`). Workspace
    keys are managed via `/v1/api-keys`.
  version: 0.1.0
servers: []
security:
  - ClerkJWT: []
  - WorkspaceApiKey: []
tags:
  - name: interviews
    description: Campaign CRUD, lifecycle, contacts, question sets.
  - name: campaign-insights
    description: Synthesis outputs — cartography, roadmap, personas, conversations.
  - name: interview-query
    description: Graph RAG query over campaign data.
  - name: campaign-reports
    description: Versioned synthesis Reports — manual regenerate, version history.
  - name: interview-export
    description: Markdown / ZIP exports of transcripts and reports.
  - name: api-keys
    description: Manage workspace-scoped API keys for programmatic access.
  - name: webhook-endpoints
    description: Outbound webhook endpoints for automation.
  - name: booking
    description: Public self-scheduling endpoints for interview participants.
  - name: join
    description: Public QR-code / share-link self-registration for campaign participants.
  - name: workspaces
    description: Workspace and membership management.
  - name: vaults
    description: Context vault management.
paths:
  /v1/interviews/{interview_id}/corpus/records/{response_id}:
    get:
      tags:
        - protected-corpus
      summary: Get Corpus Record
      description: Return one exact record, guarded by its optional record hash.
      operationId: >-
        get_corpus_record_v1_interviews__interview_id__corpus_records__response_id__get
      parameters:
        - name: interview_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Interview Id
        - name: response_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Response Id
        - name: expected_record_hash
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 64
                maxLength: 64
                pattern: ^[0-9a-fA-F]{64}$
              - type: 'null'
            title: Expected Record Hash
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorpusRecordOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CorpusRecordOut:
      properties:
        schema_version:
          type: string
          const: corpus-record-v1
          title: Schema Version
        campaign_id:
          type: string
          title: Campaign Id
        response_id:
          type: string
          title: Response Id
        status:
          type: string
          title: Status
        is_complete:
          type: boolean
          title: Is Complete
        has_transcript:
          type: boolean
          title: Has Transcript
        transcript_revision:
          type: integer
          title: Transcript Revision
        transcript_turn_count:
          type: integer
          title: Transcript Turn Count
        transcript_source:
          type: string
          enum:
            - canonical
            - legacy_json
            - none
          title: Transcript Source
        guide_hash:
          type: string
          pattern: ^[0-9a-fA-F]{64}$
          title: Guide Hash
        question_mapping_status:
          type: string
          enum:
            - complete
            - gaps_present
          title: Question Mapping Status
        unmapped_response_turn_indexes:
          items:
            type: integer
          type: array
          title: Unmapped Response Turn Indexes
        question_mapping_conflict_turn_indexes:
          items:
            type: integer
          type: array
          title: Question Mapping Conflict Turn Indexes
        release_status:
          type: string
          enum:
            - raw_citable
            - anonymous_citable
            - aggregate_only
          title: Release Status
        privacy_level:
          type: string
          title: Privacy Level
        is_anonymous:
          type: boolean
          title: Is Anonymous
        job_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Job Title
        department:
          anyOf:
            - type: string
            - type: 'null'
          title: Department
        audience_filter_attributes:
          additionalProperties:
            items:
              type: string
            type: array
          propertyNames:
            enum:
              - workgroup1
              - workgroup2
              - workgroup3
          type: object
          title: Audience Filter Attributes
        metadata_sources:
          $ref: '#/components/schemas/CorpusMetadataSourcesOut'
        contact_metadata_source:
          anyOf:
            - type: string
              enum:
                - stored_interview_contact
                - linked_person
                - mixed
            - type: 'null'
          title: Contact Metadata Source
        metadata_withheld_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Metadata Withheld Reason
        participant_metadata_output_allowed:
          type: boolean
          title: Participant Metadata Output Allowed
        verbatim_output_allowed:
          type: boolean
          title: Verbatim Output Allowed
        output_policy:
          type: string
          title: Output Policy
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
        ended_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Ended At
        duration_minutes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Minutes
        questions:
          additionalProperties:
            $ref: '#/components/schemas/CorpusQuestionOut'
          type: object
          title: Questions
        transcript:
          items:
            $ref: '#/components/schemas/CorpusTranscriptTurnOut'
          type: array
          title: Transcript
        record_hash:
          type: string
          pattern: ^[0-9a-fA-F]{64}$
          title: Record Hash
      type: object
      required:
        - schema_version
        - campaign_id
        - response_id
        - status
        - is_complete
        - has_transcript
        - transcript_revision
        - transcript_turn_count
        - transcript_source
        - guide_hash
        - question_mapping_status
        - unmapped_response_turn_indexes
        - question_mapping_conflict_turn_indexes
        - release_status
        - privacy_level
        - is_anonymous
        - job_title
        - department
        - audience_filter_attributes
        - metadata_sources
        - contact_metadata_source
        - metadata_withheld_reason
        - participant_metadata_output_allowed
        - verbatim_output_allowed
        - output_policy
        - started_at
        - ended_at
        - duration_minutes
        - questions
        - transcript
        - record_hash
      title: CorpusRecordOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CorpusMetadataSourcesOut:
      properties:
        job_title:
          anyOf:
            - type: string
              enum:
                - stored_interview_contact
                - linked_person
            - type: 'null'
          title: Job Title
        department:
          anyOf:
            - type: string
              enum:
                - stored_interview_contact
                - linked_person
            - type: 'null'
          title: Department
      type: object
      required:
        - job_title
        - department
      title: CorpusMetadataSourcesOut
    CorpusQuestionOut:
      properties:
        question_id:
          type: string
          title: Question Id
        topic_id:
          type: string
          title: Topic Id
        topic:
          type: string
          title: Topic
        question:
          type: string
          title: Question
        question_type:
          type: string
          title: Question Type
        options:
          items: {}
          type: array
          title: Options
        component_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Component Config
        turn_indexes:
          items:
            type: integer
          type: array
          title: Turn Indexes
        response_turn_indexes:
          items:
            type: integer
          type: array
          title: Response Turn Indexes
        mapping_source_counts:
          additionalProperties:
            type: integer
          type: object
          title: Mapping Source Counts
        mapping_conflict_turn_indexes:
          items:
            type: integer
          type: array
          title: Mapping Conflict Turn Indexes
        responses:
          items:
            $ref: '#/components/schemas/CorpusResponseTurnOut'
          type: array
          title: Responses
        choice_selections:
          items:
            $ref: '#/components/schemas/CorpusChoiceSelectionOut'
          type: array
          title: Choice Selections
        component_payload:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Component Payload
        component_question_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Component Question Type
        structured_answer_present:
          type: boolean
          title: Structured Answer Present
      type: object
      required:
        - question_id
        - topic_id
        - topic
        - question
        - question_type
        - options
        - component_config
        - turn_indexes
        - response_turn_indexes
        - mapping_source_counts
        - mapping_conflict_turn_indexes
        - responses
        - choice_selections
        - component_payload
        - component_question_type
        - structured_answer_present
      title: CorpusQuestionOut
    CorpusTranscriptTurnOut:
      properties:
        turn_index:
          type: integer
          title: Turn Index
        role:
          type: string
          title: Role
        content:
          type: string
          title: Content
        topic_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic Id
        source_question_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Question Id
        question_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Question Id
        question_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Question Key
        question_mapping_source:
          type: string
          enum:
            - choice_selection
            - interviewer_prompt
            - context
            - unmapped
          title: Question Mapping Source
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        choice_selection:
          anyOf:
            - {}
            - type: 'null'
          title: Choice Selection
      type: object
      required:
        - turn_index
        - role
        - content
        - topic_id
        - source_question_id
        - question_id
        - question_key
        - question_mapping_source
        - created_at
      title: CorpusTranscriptTurnOut
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CorpusResponseTurnOut:
      properties:
        turn_index:
          type: integer
          title: Turn Index
        content:
          type: string
          title: Content
        choice_selection:
          anyOf:
            - {}
            - type: 'null'
          title: Choice Selection
      type: object
      required:
        - turn_index
        - content
      title: CorpusResponseTurnOut
    CorpusChoiceSelectionOut:
      properties:
        turn_index:
          type: integer
          title: Turn Index
        payload:
          title: Payload
      type: object
      required:
        - turn_index
        - payload
      title: CorpusChoiceSelectionOut
  securitySchemes:
    ClerkJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Clerk-issued RS256 JWT.
    WorkspaceApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Workspace-scoped API key (prefix: `ont_`).'

````