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

# Publish a survey

`POST https://api.gleap.io/v3/engagement/surveys/{surveyId}/publish`

Publish the draft as the next version. The page and emails serve it; it shows in the app only while the survey is live there (`{ goLive: true }` also switches that on). Returns `{ version, publishedAt, status }`; 422 `{ errors }` when the draft is invalid.

## Authorization

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

## Path parameters

- `surveyId` (string, required)

## Headers

- `project` (string, required)

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

## Example request

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

## Responses

### 200 (`application/json`)

Ok
