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

# Create a case

> Create a new legal case



## OpenAPI

````yaml POST /v2/cases
openapi: 3.0.1
info:
  title: Tavrn Platform API
  version: 1.0.0
  description: >-
    Enterprise API for medical record retrieval: cases, retrieval requests,
    retrieved records and provider invoices, case documents, and webhook
    notifications.
  contact:
    name: Tavrn Support
    email: contact@tavrn.ai
servers:
  - url: https://enterprise.tavrn.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Cases
    description: Case management operations
  - name: Documents
    description: Document upload and management
  - name: Retrieval Requests
    description: Medical record retrieval requests submitted to healthcare facilities
  - name: Requestors
    description: Multiple retrieval profiles within one organization
  - name: Webhooks
    description: Webhook registration and event notifications
paths:
  /v2/cases:
    post:
      tags:
        - Cases
      summary: Create a case
      description: Create a new legal case
      operationId: createCase
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CaseCreate'
      responses:
        '201':
          description: Case created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Case'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CaseCreate:
      type: object
      required:
        - title
        - client_name
      properties:
        title:
          type: string
          description: Case title
          example: Jane Doe v. ACME Corp
          maxLength: 500
          minLength: 1
        client_name:
          type: string
          description: Client's name
          example: Jane Doe
          maxLength: 200
          minLength: 1
        description:
          type: string
          description: Case description
          maxLength: 5000
        client_date_of_birth:
          type: string
          format: date
          description: Client's date of birth (YYYY-MM-DD)
        client_address:
          type: string
          description: Client's address
          maxLength: 500
        client_phone:
          type: string
          description: Client's phone number
          maxLength: 50
        client_email:
          type: string
          format: email
          description: Client's email address
        date_of_injury:
          type: string
          format: date
          description: Date of injury (YYYY-MM-DD, must be in the past)
        deposition_date:
          type: string
          format: date
          description: Deposition date (YYYY-MM-DD)
        case_category:
          type: string
          enum:
            - personal_injury
            - motor_vehicle_accident
            - medical_malpractice
            - workers_compensation
            - product_liability
            - premises_liability
            - wrongful_death
            - other
          description: Case category (defaults to personal_injury)
          default: personal_injury
        status:
          type: string
          enum:
            - active
            - pending
            - closed
          description: Case status (defaults to active)
          default: active
        external_id:
          type: string
          description: External identifier for client mapping
          maxLength: 255
      additionalProperties: false
    Case:
      type: object
      required:
        - id
        - case_number
        - title
        - client_name
        - status
        - case_category
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Unique case identifier
          example: case_abc123
        case_number:
          type: string
          description: Auto-generated case number
          example: EI-2025-0001
        title:
          type: string
          description: Case title
          example: Jane Doe v. ACME Corp
        client_name:
          type: string
          description: Client's name
          example: Jane Doe
        description:
          type: string
          nullable: true
          description: Case description
          example: Rear-end MVA with cervical injury
        client_date_of_birth:
          type: string
          format: date
          nullable: true
          description: Client's date of birth (YYYY-MM-DD)
          example: '1989-04-12'
        client_address:
          type: string
          nullable: true
          description: Client's address
          example: 123 Main St, Austin, TX 78701
        client_phone:
          type: string
          nullable: true
          description: Client's phone number
          example: +1-512-555-0101
        client_email:
          type: string
          format: email
          nullable: true
          description: Client's email address
          example: jane@example.com
        date_of_injury:
          type: string
          format: date
          nullable: true
          description: Date of injury (YYYY-MM-DD)
          example: '2025-01-10'
        deposition_date:
          type: string
          format: date
          nullable: true
          description: Deposition date (YYYY-MM-DD)
          example: '2025-06-15'
        case_category:
          type: string
          enum:
            - personal_injury
            - motor_vehicle_accident
            - medical_malpractice
            - workers_compensation
            - product_liability
            - premises_liability
            - wrongful_death
            - other
          description: Case category
          example: personal_injury
        status:
          type: string
          enum:
            - active
            - pending
            - closed
            - archived
          description: Case status
          example: active
        external_id:
          type: string
          nullable: true
          description: External identifier for client mapping
          example: expert-institute-12345
        created_at:
          type: string
          format: date-time
          description: Creation timestamp (ISO 8601)
          example: '2025-02-01T12:34:56Z'
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp (ISO 8601)
          example: '2025-02-01T12:34:56Z'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: validation_error
            message:
              type: string
              description: Human-readable error message
              example: The patient.date_of_birth field is required
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key authentication. Use format: `Authorization: Bearer
        tavrn_sk_live_...`

````