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

# Create Context Document

> Create a context document.

Accepts either:
- `Content-Type: application/json` with body including `content` field
- `Content-Type: multipart/form-data` with `file` upload and other metadata as form fields



## OpenAPI

````yaml POST /v1/context-documents
openapi: 3.1.0
info:
  title: Calseta
  description: SOC data platform for security agent consumption
  version: dev
servers: []
security: []
paths:
  /v1/context-documents:
    post:
      tags:
        - context-documents
      summary: Create Context Document
      description: >-
        Create a context document.


        Accepts either:

        - `Content-Type: application/json` with body including `content` field

        - `Content-Type: multipart/form-data` with `file` upload and other
        metadata as form fields
      operationId: create_context_document_v1_context_documents_post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataResponse_ContextDocumentResponse_'
components:
  schemas:
    DataResponse_ContextDocumentResponse_:
      properties:
        data:
          $ref: '#/components/schemas/ContextDocumentResponse'
        meta:
          additionalProperties: true
          type: object
          title: Meta
      type: object
      required:
        - data
      title: DataResponse[ContextDocumentResponse]
    ContextDocumentResponse:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        title:
          type: string
          title: Title
        document_type:
          type: string
          title: Document Type
        is_global:
          type: boolean
          title: Is Global
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        tags:
          items:
            type: string
          type: array
          title: Tags
        version:
          type: integer
          title: Version
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        content:
          type: string
          title: Content
        targeting_rules:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Targeting Rules
      type: object
      required:
        - uuid
        - title
        - document_type
        - is_global
        - description
        - tags
        - version
        - created_at
        - updated_at
        - content
        - targeting_rules
      title: ContextDocumentResponse
      description: Full response — includes content and targeting_rules.

````