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

# Validate Protocol Endpoint

> Validate a protocol dictionary.

Runs the full backend validation (Pydantic model checks, termination
condition inheritance, operator consistency, duplicate names, etc.)
and returns the result.

Parameters
----------
body : ValidateProtocolRequest
    Request containing the protocol dict to validate

Returns
-------
dict
    ``{"valid": true}`` on success, or
    ``{"valid": false, "error": "..."}`` on failure.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /protocols/validate
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /protocols/validate:
    post:
      tags:
        - protocols
      summary: Validate Protocol Endpoint
      description: |-
        Validate a protocol dictionary.

        Runs the full backend validation (Pydantic model checks, termination
        condition inheritance, operator consistency, duplicate names, etc.)
        and returns the result.

        Parameters
        ----------
        body : ValidateProtocolRequest
            Request containing the protocol dict to validate

        Returns
        -------
        dict
            ``{"valid": true}`` on success, or
            ``{"valid": false, "error": "..."}`` on failure.
      operationId: validate_protocol_endpoint_protocols_validate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateProtocolRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Validate Protocol Endpoint Protocols Validate Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidateProtocolRequest:
      properties:
        protocol:
          anyOf:
            - additionalProperties: true
              type: object
            - type: string
          title: Protocol
          description: >-
            Protocol as a YAML-format dictionary with 'steps' and optional
            'global', 'safety_limits', or a YAML string.
      type: object
      required:
        - protocol
      title: ValidateProtocolRequest
      description: Request body for validating a protocol.
    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

````