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

# Search Malloy documentation

> Search Credible's packaged Malloy documentation and return a synthesized answer with relevant passages and code snippets. The corpus is global and the same for every caller — no organization/workspace context is used. Authenticate with `Authorization: Bearer <auth0-jwt>` or `Authorization: ApiKey <group-access-token>`. A per-IP rate limit may reject sustained excess traffic with `429` when enforcement is enabled.



## OpenAPI

````yaml /code-assist-public-api.yaml post /search_malloy_docs
openapi: 3.0.0
info:
  title: Coding API
  description: >-
    Public API for Credible's Code Assist service. Its externally-facing
    capability is a Malloy documentation search (`POST /search_malloy_docs`)
    that any authenticated caller — including a customer's own MCP server — can
    invoke directly with a Group Access Token. The remaining endpoints back the
    Credible VS Code extension and are not part of the external integration
    surface.
  version: 1.0.0
servers:
  - url: https://{organization}.coding.credibledata.com
    description: Production API server
    variables:
      organization:
        default: demo
        description: Your organization subdomain
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: codeAssist
    description: Code Assist API endpoints
paths:
  /search_malloy_docs:
    post:
      tags:
        - codeAssist
      summary: Search Malloy documentation
      description: >-
        Search Credible's packaged Malloy documentation and return a synthesized
        answer with relevant passages and code snippets. The corpus is global
        and the same for every caller — no organization/workspace context is
        used. Authenticate with `Authorization: Bearer <auth0-jwt>` or
        `Authorization: ApiKey <group-access-token>`. A per-IP rate limit may
        reject sustained excess traffic with `429` when enforcement is enabled.
      operationId: searchMalloyDocs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchMalloyDocsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchMalloyDocsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            The request body failed validation (e.g. missing, empty, or
            oversized field, or wrong type). `error_code` is `INVALID_INPUT` and
            `details` describes each violation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Too many requests — the per-IP rate limit was exceeded. Retry after
            a short back-off.
        '500':
          description: An internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SearchMalloyDocsRequest:
      description: Request body for the search_malloy_docs endpoint.
      type: object
      required:
        - query
      properties:
        query:
          description: >-
            Natural-language query about Malloy syntax or language features.
            Each request fans out to LLM work, so the size is capped; queries
            over maxLength are rejected with 422.
          type: string
          minLength: 1
          maxLength: 2000
    SearchMalloyDocsResponse:
      description: Response from the search_malloy_docs endpoint.
      type: object
      required:
        - query
        - answer
      properties:
        query:
          description: The query that was searched (echoed back).
          type: string
        answer:
          description: >-
            Synthesized answer with relevant documentation passages and code
            snippets. Always a real synthesized answer — if the documentation
            doesn't cover the topic, the answer says so in prose; a failed
            search returns `500`, never a placeholder answer with `200`.
          type: string
    ErrorResponse:
      description: Standard error response body.
      type: object
      required:
        - error_code
        - message
      properties:
        error_code:
          type: string
          description: A code identifying the type of error
          enum:
            - INVALID_INPUT
            - UNAUTHORIZED
            - FORBIDDEN
            - NOT_FOUND
            - CONFLICT
            - INTERNAL_ERROR
            - BAD_GATEWAY
            - GATEWAY_TIMEOUT
        message:
          type: string
          description: A human-readable error message
        details:
          type: string
          description: Additional error details, if available
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        Auth0-issued user JWT. Provide as `Authorization: Bearer <token>`.
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: |
        HMAC-signed API key JWT (Group Access Token) issued by Credible. Provide
        as `Authorization: ApiKey <token>` (note the `ApiKey ` prefix in place
        of the usual `Bearer `). Include the full string — prefix and token —
        in this field.

````