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

# Validate a survey definition

> Validate a Surveys 2.0 definition for this survey. Body `{ definition }`. Returns `{ ok, errors }`.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /engagement/surveys/{surveyId}/validate
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /engagement/surveys/{surveyId}/validate:
    post:
      tags:
        - Engagement Survey
      summary: Validate a survey definition
      description: >-
        Validate a Surveys 2.0 definition for this survey. Body `{ definition
        }`. Returns `{ ok, errors }`.
      operationId: ValidateSurveyDraft
      parameters:
        - in: path
          name: surveyId
          required: true
          schema:
            type: string
        - in: header
          name: project
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema: {}
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema: {}
      security:
        - jwt: []
components:
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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