> ## Documentation Index
> Fetch the complete documentation index at: https://developer.omni.z-api.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish flow

> Make the flow available for use in messages

## Concepts

Publishes the flow and moves the status to `PUBLISHED`. From then on it can be used in messages.

<Warning>
  Publishing is irreversible for `flow_json`: after that the screens are frozen. Check `validation_errors` in [Get flow](/en/flows/get-flow) before publishing.
</Warning>


## OpenAPI

````yaml en/flows/openapi.json POST /whatsapp/businesses/{wabaId}/flows/{flowId}/publish
openapi: 3.1.0
info:
  title: Omni Z-API - WhatsApp Flows
  description: API to create and manage WhatsApp Flows (native in-conversation forms)
  version: 1.0.0
servers:
  - url: https://api.omni.z-api.io
security:
  - bearerAuth: []
paths:
  /whatsapp/businesses/{wabaId}/flows/{flowId}/publish:
    post:
      tags:
        - Flows
      summary: Publish flow
      description: >-
        Publishes the flow, making it available for use in messages. Once
        published, `flow_json` can no longer be changed.
      operationId: publishFlow
      parameters:
        - name: wabaId
          in: path
          required: true
          description: WABA ID (obtained via List WABAs)
          schema:
            type: string
            example: '428083093730937'
        - name: flowId
          in: path
          required: true
          description: Flow ID (obtained via List flows)
          schema:
            type: string
            example: '1122334455667788'
      responses:
        '200':
          description: Operation completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Flow'
              example:
                id: '1122334455667788'
                name: agendamento_consulta
                categories:
                  - APPOINTMENT_BOOKING
                status: PUBLISHED
                endpoint_uri: null
                validation_errors: []
        '401':
          description: Invalid or missing token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Flow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Business rule violated — a published flow does not accept
            `flow_json` changes, or deletion of a flow outside `DRAFT`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Flow:
      type: object
      properties:
        id:
          type: string
          description: Flow ID
        name:
          type: string
          description: Flow name
        categories:
          type: array
          description: Flow categories (Meta uses them during review)
          items:
            type: string
            enum:
              - SIGN_UP
              - SIGN_IN
              - APPOINTMENT_BOOKING
              - LEAD_GENERATION
              - CONTACT_US
              - CUSTOMER_SUPPORT
              - SURVEY
              - OTHER
        status:
          type: string
          enum:
            - DRAFT
            - PUBLISHED
            - DEPRECATED
            - BLOCKED
            - THROTTLED
          description: Publication status
        endpoint_uri:
          type: string
          nullable: true
          description: Your endpoint URL, required only for flows using `data_exchange`
        flow_json:
          type: string
          description: Screen definition in JSON, sent as a **string**
        validation_errors:
          type: array
          description: Validation issues returned by Meta
          items:
            type: object
            properties:
              key:
                type: string
                description: Issue key
              value:
                type: string
                description: Issue detail
    Error:
      type: object
      properties:
        error:
          type: integer
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````