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

# Create a new vault

> Creates a new secure vault with dedicated S3 storage and vector search capabilities. Each vault provides isolated document storage with semantic search, OCR processing, and optional GraphRAG knowledge graph features for legal document analysis and discovery.



## OpenAPI

````yaml /openapi.json post /vault
openapi: 3.1.0
info:
  title: Case.dev API
  description: >-
    The AI-native platform for legal technology. Build smarter legal
    applications with our suite of AI-powered APIs.
  version: 1.0.0
  contact:
    name: Case.dev Support
    email: support@casemark.com
    url: https://case.dev
  license:
    name: Proprietary
    url: https://case.dev/terms
servers:
  - url: https://api.case.dev
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Vaults
    description: Secure document storage with semantic search and GraphRAG
  - name: Memory
    description: >-
      Persistent memory for AI agents with semantic search and 12 generic
      indexed tag fields
  - name: OCR
    description: Extract text from PDFs, images, and scanned documents
  - name: Voice
    description: Audio transcription and text-to-speech
  - name: LLMs
    description: Access 40+ language models through a unified API
  - name: Search
    description: Web search, AI answers, and deep research
  - name: Mail
    description: Managed inboxes for agent email workflows
  - name: Media
    description: Transcript retrieval and captioned media clip generation
  - name: Legal
    description: Legal research tools including citation verification
  - name: Privilege
    description: Privilege detection for e-discovery and litigation workflows
  - name: Compute
    description: Serverless GPU and CPU infrastructure
  - name: Format
    description: Document formatting and template rendering (MD/JSON to PDF/DOCX)
  - name: SuperDoc
    description: Document conversion and template automation
  - name: Webhooks
    description: Webhook endpoint management
  - name: System
    description: Public system metadata and discovery endpoints
  - name: Usage
    description: Usage reporting and webhook subscriptions
  - name: Database
    description: Serverless PostgreSQL databases with instant branching
  - name: Translation
    description: Language detection and translation for multilingual legal workflows
  - name: Skills
    description: Search and read legal AI skills for agents
  - name: Agents
    description: >-
      Create, manage, and execute AI agents with tool access, sandbox
      environments, and async run workflows
  - name: Matters
    description: Matter-native legal workspaces and orchestration primitives
  - name: Applications Projects
    description: Web application project management
  - name: Applications Deployments
    description: Web application deployment management
  - name: Applications Domains
    description: Custom domain configuration for applications
  - name: Applications Env Vars
    description: Environment variable management for applications
paths:
  /vault:
    post:
      tags:
        - Vaults
      summary: Create a new vault
      description: >-
        Creates a new secure vault with dedicated S3 storage and vector search
        capabilities. Each vault provides isolated document storage with
        semantic search, OCR processing, and optional GraphRAG knowledge graph
        features for legal document analysis and discovery.
      operationId: createVault
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: Display name for the vault
                  example: Contract Review Archive
                description:
                  type: string
                  description: Optional description of the vault's purpose
                  example: Repository for all client contract reviews and analysis
                enableGraph:
                  type: boolean
                  description: >-
                    Enable knowledge graph for entity relationship mapping. Only
                    applies when enableIndexing is true.
                  default: true
                  example: true
                enableIndexing:
                  type: boolean
                  description: >-
                    Enable vector indexing and search capabilities. Set to false
                    for storage-only vaults.
                  default: true
                  example: true
                metadata:
                  type: object
                  description: >-
                    Optional metadata to attach to the vault (e.g., {
                    containsPHI: true } for HIPAA compliance tracking)
                  example:
                    containsPHI: true
                    hipaaCompliant: true
                groupId:
                  type: string
                  description: >-
                    Assign the vault to a vault group for access control.
                    Required when using a group-scoped API key.
                  example: grp_abc123
                embeddingModel:
                  type: string
                  description: >-
                    Optional embedding model for this vault. Defaults to
                    casemark/embed-v1. Determines the S3 Vectors index dimension
                    and which model is used at both ingest and search time. The
                    vault is locked to this model after creation — use a
                    re-embed flow to change later. Ignored when enableIndexing
                    is false. Note: `casemark/llama-nemotron-embed-vl-1b-v2` is
                    a deprecated alias for `casemark/embed-v1` (retained for SDK
                    backward compatibility); new integrations should use
                    `casemark/embed-v1` directly.
                  enum:
                    - openai/text-embedding-3-small
                    - openai/text-embedding-3-large
                    - voyage/voyage-3.5
                    - voyage/voyage-law-2
                    - cohere/embed-v4.0
                    - google/gemini-embedding-2
                    - casemark/embed-v1
                    - casemark/llama-nemotron-embed-vl-1b-v2
                  default: casemark/embed-v1
                  example: casemark/embed-v1
      responses:
        '201':
          description: Vault created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique vault identifier
                  name:
                    type: string
                    description: Vault display name
                  description:
                    type: string
                    description: Vault description
                  filesBucket:
                    type: string
                    description: S3 bucket name for document storage
                  vectorBucket:
                    type: string
                    nullable: true
                    description: >-
                      S3 bucket name for vector embeddings. Null for
                      storage-only vaults.
                  indexName:
                    type: string
                    nullable: true
                    description: Vector search index name. Null for storage-only vaults.
                  enableIndexing:
                    type: boolean
                    description: Whether vector indexing is enabled for this vault
                  region:
                    type: string
                    description: AWS region for storage
                  embeddingProfile:
                    type: object
                    nullable: true
                    description: >-
                      The resolved embedding profile for this vault. Null for
                      storage-only vaults.
                    properties:
                      model:
                        type: string
                        description: Embedding model catalog key
                      provider:
                        type: string
                        description: Embedding provider
                      dimensions:
                        type: integer
                        description: Vector dimension used by this vault
                  createdAt:
                    type: string
                    format: date-time
                    description: Vault creation timestamp
              example:
                id: vault_2NqPkJ8xK9LmN3pQ
                name: Contract Review Archive
                description: Repository for all client contract reviews and analysis
                filesBucket: case-vault-acme-legal-vault_2NqPkJ8xK9LmN3pQ
                vectorBucket: case-vault-acme-legal-vault_2NqPkJ8xK9LmN3pQ-vectors
                indexName: embeddings
                enableIndexing: true
                region: us-east-1
                createdAt: '2024-01-15T10:30:00Z'
        '400':
          description: Invalid request parameters - missing vault name
        '401':
          description: Invalid or missing API key
        '403':
          description: API key does not have vault service access
        '404':
          description: Organization not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key starting with `sk_case_`

````