---
title: "Validate a survey definition"
url: https://docs.gleap.ai/en/reference/rest-api/validate-definition
method: POST
path: "/engagement/surveys/validate"
api: "API Reference"
tag: "Engagement Survey"
operationId: "ValidateDefinition"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Validate a survey definition

`POST https://api.gleap.io/v3/engagement/surveys/validate`

Validate a Surveys 2.0 definition without saving it (editor, MCP `validate_survey`). Body `{ definition }`. Returns `{ ok, errors: [{ path, code, message }] }`.

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Headers

- `project` (string, required)

## Request body (`application/json`, required)

## Example request

```bash
curl --request POST \
  --url https://api.gleap.io/v3/engagement/surveys/validate \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

## Responses

### 200 (`application/json`)

Ok
