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

# Validate a policy YAML configuration without saving



## OpenAPI

````yaml post /organization/{organizationId}/policies/validate
openapi: 3.0.0
info:
  title: Cybedefend API
  description: >-
    CybeDefend is an advanced API for application security analysis. Key
    features include OAuth 2.0 authentication, user/organization/project
    management, and REBAC-based permissions. It excels in static, dynamic, and
    IaC security analyses (SAST, DAST, IaC, etc.).
  version: '1.0'
  contact: {}
servers:
  - url: https://api-eu.cybedefend.com
    description: EU
  - url: https://api-us.cybedefend.com
    description: US
security: []
tags: []
paths:
  /organization/{organizationId}/policies/validate:
    post:
      tags:
        - Policy
      summary: Validate a policy YAML configuration without saving
      operationId: PolicyController_validatePolicy
      parameters:
        - name: organizationId
          required: true
          in: path
          schema:
            format: uuid
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                yamlContent:
                  type: string
                  description: YAML policy configuration to validate
              required:
                - yamlContent
      responses:
        '200':
          description: Validation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidatePolicyResponseDto'
      security:
        - bearer: []
components:
  schemas:
    ValidatePolicyResponseDto:
      type: object
      properties:
        valid:
          type: boolean
          description: Whether the policy is valid
          example: true
        errors:
          description: List of validation errors
          example: []
          type: array
          items:
            type: string
        warnings:
          description: List of warnings
          example: []
          type: array
          items:
            type: string
      required:
        - valid
        - errors
        - warnings
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: JWT access token.

````