> ## 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.

# Publish a survey

> 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; 403
`{ requiresApproval: true }` for agents (MCP, Kai, service accounts) — a teammate publishes.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /engagement/surveys/{surveyId}/publish
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}/publish:
    post:
      tags:
        - Engagement Survey
      summary: Publish a survey
      description: >-
        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; 403

        `{ requiresApproval: true }` for agents (MCP, Kai, service accounts) — a
        teammate publishes.
      operationId: Publish
      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.