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

# Ingest data with metadata

> Ingest textual data together with metadata such as source (e.g., HubSpot, Notion, Google Drive) and type (e.g., Email, Document, Lead, Deal).

<Tip>This endpoint ensures your data is stored with provenance, making it easier to identify information sources when querying.</Tip>


## OpenAPI

````yaml https://api.qontext.ai/docs-json post /v1/ingestion/any
openapi: 3.0.0
info:
  title: Qontext API
  description: API to ingest and retrieve data to enable contextualised AI.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.qontext.ai
    description: Production
security: []
tags: []
paths:
  /v1/ingestion/any:
    post:
      tags:
        - Ingestion
      summary: Ingest data with metadata
      description: >-
        Ingest textual data together with metadata such as source (e.g.,
        HubSpot, Notion, Google Drive) and type (e.g., Email, Document, Lead,
        Deal).
      operationId: IngestionController_ingestAnyData
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManualIngestionDto'
      responses:
        '201':
          description: Data ingestion initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestionResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorDto'
      security:
        - bearer: []
        - X-API-Key:
            - X-API-Key
components:
  schemas:
    ManualIngestionDto:
      type: object
      properties:
        vaultId:
          type: string
          description: The id of the vault that the data should be ingested into.
          example: kg_a2de5758-a7c5-4291-9f97-3da82f99c8f8
        string_data:
          type: string
          description: The data to ingest
          example: >-
            Harry Potter created a new deal for Gryffindor Inc. in HubSpot:
            [...].
        source:
          description: The source of the data to ingest.
          example:
            source_integration: HubSpot
            source_data_type: Deal
            source_id: '4754016823'
          allOf:
            - $ref: '#/components/schemas/SourceDto'
      required:
        - vaultId
        - string_data
        - source
    IngestionResponseDto:
      type: object
      properties:
        syncLogId:
          type: string
          description: The sync log id for the ingestion process.
          example: sync_a01c7c1c-ecb0-49ec-af7f-329f4b4628bf
      required:
        - syncLogId
    BadRequestDto:
      type: object
      properties:
        message:
          description: Array of specific error messages
          example:
            - <error message>
            - <error message>
          type: array
          items:
            type: string
        error:
          type: string
          description: Error Message
          example: Bad Request
        statusCode:
          type: number
          description: Status Code
          example: 400
          default: 400
      required:
        - message
        - error
        - statusCode
    InternalServerErrorDto:
      type: object
      properties:
        error:
          type: string
          description: Error Message
          example: Internal Server Error
        statusCode:
          type: number
          description: Status Code
          example: 500
          default: 500
      required:
        - error
        - statusCode
    SourceDto:
      type: object
      properties:
        source_integration:
          type: string
          description: The system or platform where the data originates
          example: HubSpot
          enum:
            - HubSpot
            - Web
            - Gmail
            - GoogleDrive
            - API
            - Notion
            - Gong
            - Slack
            - Confluence
            - Zendesk
        source_data_type:
          type: string
          description: >-
            The specific type of data being ingested from the source. Only
            selected `source_data_type`s are allowed for each
            `source_integration`:


            | `source_integration` | Valid `source_data_type` |

            | --- | --- |

            | API | None |

            | Gmail | Email |

            | Gong | Call |

            | GoogleDrive | Doc, File, PDF, Sheet, Slide |

            | HubSpot | Call, Company, Contact, Deal, Email, Lead, Meeting,
            Note, Task |

            | Notion | Page |

            | Slack | Message |

            | Web | Website |
        source_id:
          type: string
          description: The unique identifier of the data item in the source system.
          example: '1234567890'
      required:
        - source_integration
        - source_data_type
        - source_id
  securitySchemes:
    X-API-Key:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for the Qontext API

````