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

# Publish the draft revision

> The validation gate. The runtime refuses an unpublished flow, so this is where a flow becomes answerable and therefore where it is checked.

On success the validated revision becomes `published_revision` unchanged and a copy of it becomes the new draft, so a revision that is or was live is never edited and a call already walking the graph is unaffected.

Errors block (no entry node; a kind the runtime cannot execute; a route_extension/route_queue/virtual_agent target that does not exist or belongs to another organisation; an unknown timezone on a time_condition, which fails the call; a menu with no wired digit outlets). Warnings do not (an unwired outlet, a node unreachable from entry, a branch/voicemail node).



## OpenAPI

````yaml /api-reference/openapi-public.json post /ivr-flows/{id}/publish
openapi: 3.0.3
info:
  description: >-
    The API your own systems use: place and follow calls, have an AI agent call
    someone, run campaigns and get their results, keep contacts in step with
    your CRM, and receive signed webhooks. Authenticate with an integration key
    (Authorization: Bearer ft_...), used only from the IP addresses it allows.
  title: FireTone API
  version: 0.1.0
servers:
  - description: Your platform's API host
    url: https://{host}/api/v1
    variables:
      host:
        default: api.firet.one
security:
  - bearerAuth: []
tags:
  - name: Auth
  - description: >-
      Live calls and what can be done to them: hang up, hold, transfer, park,
      merge, monitor, whisper; the Desk's own call.
    name: Calls
  - description: 'Outbound campaigns: contacts, attempts, outcomes.'
    name: Campaigns
  - description: 'Customers: who called, what is known about them, and their memory.'
    name: Contacts
  - description: What was said on an AI call, and the review of it.
    name: Conversations
  - name: IVR
  - description: >-
      Your own systems: HTTP connections an IVR calls mid-call, and webhooks for
      call events. Tenant URLs must be public https addresses.
    name: Integrations
  - name: Live
  - name: Provisioning
  - name: Reporting
  - description: Tickets raised by people, agents and the API.
    name: Tickets
  - description: Messages left for an extension or a queue.
    name: Voicemail
paths:
  /ivr-flows/{id}/publish:
    post:
      tags:
        - IVR
      summary: Publish the draft revision
      description: >-
        The validation gate. The runtime refuses an unpublished flow, so this is
        where a flow becomes answerable and therefore where it is checked.


        On success the validated revision becomes `published_revision` unchanged
        and a copy of it becomes the new draft, so a revision that is or was
        live is never edited and a call already walking the graph is unaffected.


        Errors block (no entry node; a kind the runtime cannot execute; a
        route_extension/route_queue/virtual_agent target that does not exist or
        belongs to another organisation; an unknown timezone on a
        time_condition, which fails the call; a menu with no wired digit
        outlets). Warnings do not (an unwired outlet, a node unreachable from
        entry, a branch/voicemail node).
      operationId: postIvrFlowsIdPublish
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishIVRFlowResponse'
          description: Published
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishIVRFlowResponse'
          description: >-
            The flow describes something the switch cannot run; nothing was
            published.
components:
  schemas:
    PublishIVRFlowResponse:
      description: >-
        Errors block publishing; warnings do not. The same shape is returned
        either way, so the panel reads one document whether the flow went live
        or was refused.
      properties:
        draft_revision:
          description: The new draft, forked from the revision just published.
          type: integer
        error:
          description: >-
            Present only when publishing was refused, so the standard error
            envelope still applies.
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
          type: object
        errors:
          description: What stops it publishing; empty when it published.
          items:
            $ref: '#/components/schemas/FlowIssue'
          type: array
        published:
          description: >-
            Whether the draft passed validation and is now the published
            revision.
          type: boolean
        published_revision:
          description: The revision now answering calls.
          type: integer
        warnings:
          description: Things worth fixing that do not stop it.
          items:
            $ref: '#/components/schemas/FlowIssue'
          type: array
      required:
        - published
        - draft_revision
        - errors
        - warnings
      type: object
    FlowIssue:
      properties:
        code:
          enum:
            - no_entry
            - unknown_kind
            - menu_without_digits
            - target_missing
            - unknown_timezone
            - unwired_outlet
            - outlet_never_taken
            - unreachable
            - not_implemented
          type: string
        kind:
          type: string
        label:
          type: string
        message:
          type: string
        node_id:
          format: uuid
          type: string
        outlet:
          type: string
      required:
        - code
        - message
      type: object
    Error:
      properties:
        error:
          properties:
            code:
              enum:
                - invalid_request
                - invalid_credentials
                - unauthenticated
                - forbidden
                - not_found
                - conflict
                - internal
              type: string
            message:
              type: string
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  responses:
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Missing, invalid or expired token
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Outside the caller's scope, or insufficient role
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Not found, or not visible to the caller
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or API key
      description: >-
        Every request sends `Authorization: Bearer <token>`. The token is either
        a panel session (a JWT from /auth/login, 12 hours) or an API key
        `ft_<id>_<secret>`. An API key is accepted only from an address on its
        IP allowlist (403 ip_not_allowed otherwise; 403 ip_allowlist_required
        for an old key that has none), is limited to its rate per minute (429
        rate_limited with Retry-After; X-RateLimit-Limit/Remaining/Reset on
        every response), and at most 60 call placements a minute.
      scheme: bearer
      type: http

````

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