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

# Search curated material plus only the caller's private documents



## OpenAPI

````yaml /api-reference/openapi.json post /api/corpus/search
openapi: 3.1.0
info:
  title: WriterzRoom API
  version: '2.0'
  description: >-
    Generated from the API server by scripts/generate_api_reference.py. Only the
    endpoints listed on the Endpoints Reference page are included.
servers:
  - url: https://api.writerzroom.com
security:
  - bearerAuth: []
tags:
  - name: Generation
  - name: Content
  - name: Catalog
  - name: Approvals
  - name: Validity
  - name: Replay
  - name: Artifacts
  - name: Corpus
  - name: Account
paths:
  /api/corpus/search:
    post:
      tags:
        - Corpus
      summary: Search curated material plus only the caller's private documents
      operationId: search_corpus_api_corpus_search_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchCorpusRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearerAuth: []
components:
  schemas:
    SearchCorpusRequest:
      properties:
        query:
          type: string
          maxLength: 2000
          minLength: 3
          title: Query
          description: What to search for.
        vertical:
          anyOf:
            - type: string
            - type: 'null'
          title: Vertical
          description: Limit results to one vertical.
        top_k:
          type: integer
          maximum: 50
          minimum: 1
          title: Top K
          description: How many passages to return.
          default: 10
      type: object
      required:
        - query
      title: SearchCorpusRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A WriterzRoom API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.