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

# Read one published version of a Workflow

> Public read of one version of a workflow, for a visitor who started on it before a newer one was published: they finish on the version they started on (for up to 30 days; after that they get the latest). The graph of a version never changes once published; the languages its compositions can be shown in (`translations`) are read each time, as for the live version. Like the read of the live version, it answers `status: paused` with nothing else while the workflow is paused, and 404 when the workflow is a draft or archived, or has no such version.
**Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/versions/{versionId}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.



## OpenAPI

````yaml /openapi/widgetic-api-public.json get /embed/workflows/{workflowId}/versions/{versionId}
openapi: 3.0.0
info:
  title: Widgetic API Gateway
  version: 1.0.0
  description: API documentation for the Widgetic API Gateway
  license:
    name: Widgetic Integration License
    url: https://docs.widgetic.com/resources/license
servers:
  - url: https://api.widgetic.com/v1
    description: Production server
    variables:
      env:
        default: production
        description: Environment
      apiUrl:
        default: https://api.widgetic.com
        description: API URL
      apiVersion:
        default: /v1
        description: API Version path prefix
security: []
tags: []
paths:
  /embed/workflows/{workflowId}/versions/{versionId}:
    servers:
      - url: https://api.widgetic.com
        description: >-
          The public embed routes are served at the root of the API host, not
          under /v1.
    get:
      tags:
        - Public Embed
      summary: Read one published version of a Workflow
      description: >-
        Public read of one version of a workflow, for a visitor who started on
        it before a newer one was published: they finish on the version they
        started on (for up to 30 days; after that they get the latest). The
        graph of a version never changes once published; the languages its
        compositions can be shown in (`translations`) are read each time, as for
        the live version. Like the read of the live version, it answers `status:
        paused` with nothing else while the workflow is paused, and 404 when the
        workflow is a draft or archived, or has no such version.

        **Address.**
        `https://api.widgetic.com/embed/workflows/{workflowId}/versions/{versionId}`:
        the root of the API host, NOT under `/v1`. A client generated from this
        description for `https://api.widgetic.com/v1` must be given the base
        address `https://api.widgetic.com` for the calls of the `Public Embed`
        tag.
      operationId: getPublicWorkflowVersion
      parameters:
        - in: path
          name: workflowId
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: versionId
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The version, or the word paused
          content:
            application/json:
              schema:
                title: PublicWorkflowResponse
                type: object
                required:
                  - success
                  - data
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/PublicWorkflow'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
        '400':
          description: An id is not a workflow or version id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicEmbedFailure'
        '404':
          description: >-
            No published workflow with this id, or it has no such version
            (`NOT_FOUND`), or its owner is not being served (`SUSPENDED` for a
            partner whose agreement is not in force, `NOT_FOUND` with the
            subscription sentence for a plan that lapsed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicEmbedFailure'
        '429':
          description: Rate limited (`RATE_LIMITED`), always with `Retry-After`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicEmbedFailure'
        '503':
          description: >-
            Workflows cannot be read right now. The embed then behaves as a
            plain embed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicEmbedFailure'
components:
  schemas:
    PublicWorkflow:
      type: object
      description: >
        What a visitor's browser reads for a workflow. `status` is `live` with
        the published version, or `paused`

        with nothing else: the embed then shows only its first composition.
      required:
        - workflowId
        - status
      properties:
        workflowId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - live
            - paused
        versionId:
          type: string
          format: uuid
          description: >-
            The published version this answer is for. A visitor who starts on it
            finishes on it.
        versionNumber:
          type: integer
        publishedAt:
          type: string
          format: date-time
        startCompositionId:
          type: string
          format: uuid
          description: >-
            The composition a new visitor starts on, so the page can show it
            while the graph is still being read.
        timezone:
          type: string
          description: The zone date and time triggers are read in.
        graph:
          $ref: '#/components/schemas/WorkflowGraph'
        translations:
          type: object
          description: >
            The languages the compositions of the graph can be shown in, by
            composition id: only the compositions that

            have an active translation with a language besides their own, so the
            field is absent when none has. The

            browser shows the copy in the visitor's language in place of the
            composition, at the first step and at every

            move, with the rules `<widgetic-translations>` follows (the
            visitor's language, then its language family, then

            the language the composition was written in). It is read when the
            answer is made, not when the version was

            published, so a language added to a translation reaches visitors
            without a new publish. Ids, counts and the

            visitor's place keep naming the composition of the graph, never its
            copy.
          additionalProperties:
            $ref: '#/components/schemas/PublicWorkflowTranslation'
        eventToken:
          type: string
          description: >
            What lets the browser report counts for this version, valid for 24
            hours. Absent when this server cannot

            sign one, and the browser then reports nothing.
      example:
        workflowId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        status: Example status
        versionId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        versionNumber: 42
        publishedAt: '2026-01-15T09:30:00.000Z'
        startCompositionId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        timezone: Example timezone
        graph: null
        translations: {}
        eventToken: Example eventToken
    ResponseMeta:
      type: object
      description: >-
        Extra information about the answer: where a page sits in a list, the
        cursor of the next page, or warnings about a call that succeeded with a
        caveat.
      additionalProperties: true
      properties:
        page:
          type: integer
          description: The page that was read, counting from 1.
          example: 1
        size:
          type: integer
          description: How many items one page holds.
          example: 20
        total:
          type: integer
          description: How many items the whole list has.
          example: 135
        limit:
          type: integer
          description: The same as `size`.
          example: 20
        offset:
          type: integer
          description: How many items come before this page.
          example: 0
        hasNextPage:
          type: boolean
          example: true
        hasPreviousPage:
          type: boolean
          example: false
        nextCursor:
          type: string
          nullable: true
          description: >-
            Pass this as `cursor` to read the next page of a list that is read
            by cursor. `null` on the last page.
        warnings:
          type: array
          items:
            type: string
          description: >-
            Things the call did not do, though it succeeded (for example a table
            that could not be created just now).
    PublicEmbedFailure:
      type: object
      required:
        - success
        - message
        - error
        - code
      description: >-
        What a public embed route answers when it refuses or fails. It is the
        standard error answer of the API (`success`, `message`, `error`), and
        the short `code` (with `details` and `correlationId` when the route has
        them) is also at the top level, because a page that embeds a composition
        branches on it there. `error.code` is the same word in the codes of the
        rest of the API where those have it: `NOT_FOUND` is
        `RESOURCE_NOT_FOUND`, `RATE_LIMITED` is `RATE_LIMIT_EXCEEDED`, and the
        others (`DOMAIN_NOT_ALLOWED`, `UNPUBLISHED`, `SUSPENDED`, the codes of
        the entry route) are the same in both places.
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
          description: What happened, for a person.
        code:
          type: string
          description: >-
            The short code a page branches on: `DOMAIN_NOT_ALLOWED`,
            `UNPUBLISHED`, `SUSPENDED`, `NOT_FOUND`, `RATE_LIMITED`, and for the
            entry route the codes listed with its answers.
          example: NOT_FOUND
        details:
          type: object
          additionalProperties: true
          description: >-
            What tells the cases of one code apart, such as `reason` of
            `DOMAIN_NOT_ALLOWED`.
          properties:
            reason:
              type: string
              description: For `DOMAIN_NOT_ALLOWED`, why the website was refused.
              enum:
                - domain_not_allowed
                - opaque_origin
            hasDomainsConfigured:
              type: boolean
              description: >-
                For `DOMAIN_NOT_ALLOWED`, always true (an owner who listed
                nothing is never refused).
        correlationId:
          type: string
          description: The id of the request, for the routes that carry it.
        error:
          type: object
          required:
            - code
            - message
            - timestamp
          properties:
            code:
              type: string
              example: RESOURCE_NOT_FOUND
            message:
              type: string
            details:
              type: object
              additionalProperties: true
            correlationId:
              type: string
            retryAfter:
              type: integer
              description: Seconds to wait before asking again, for a rate-limit refusal.
            timestamp:
              type: string
              format: date-time
      example:
        success: true
        message: Example message
        code: NOT_FOUND
        details: {}
        correlationId: Example correlationId
        error: {}
    WorkflowGraph:
      type: object
      description: A whole workflow, as the editor saves it and the gateway publishes it.
      required:
        - schemaVersion
        - nodes
        - edges
      properties:
        schemaVersion:
          type: integer
          enum:
            - 1
        nodes:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/WorkflowNode'
        edges:
          type: array
          maxItems: 300
          items:
            $ref: '#/components/schemas/WorkflowEdge'
      example:
        schemaVersion: 42
        nodes:
          - Example WorkflowNode
        edges:
          - Example WorkflowEdge
    PublicWorkflowTranslation:
      type: object
      description: >-
        One composition of a published workflow and the copies of it in other
        languages.
      required:
        - rootLanguage
        - compositions
      properties:
        rootLanguage:
          type: string
          example: en
          description: >-
            The language the composition was written in. A visitor whose
            language matches nothing else is shown the composition itself.
        compositions:
          type: object
          description: >-
            Language code (lower case) to the composition that shows it. The
            root language is listed too, and is the composition itself.
          additionalProperties:
            type: string
            format: uuid
          example:
            en: 7b1d5c3e-6f0a-4c52-9d3a-0a1b2c3d4e5f
            fr: 2f6c8a90-1b3d-4e7f-8a9b-c0d1e2f3a4b5
      example:
        rootLanguage: en
        compositions:
          en: 7b1d5c3e-6f0a-4c52-9d3a-0a1b2c3d4e5f
          fr: 2f6c8a90-1b3d-4e7f-8a9b-c0d1e2f3a4b5
    WorkflowNode:
      type: object
      description: >
        A block. A `composition` block shows one composition (exactly one block
        of a workflow has `startsHere`);

        a `trigger` block waits for one thing to happen while the composition
        before it is shown; a `condition`

        block chooses the next step from what the trigger before it carried. At
        most 25 blocks.
      required:
        - id
        - type
      properties:
        id:
          type: string
          pattern: ^[A-Za-z0-9_-]{1,64}$
        type:
          type: string
          enum:
            - composition
            - trigger
            - condition
        position:
          $ref: '#/components/schemas/WorkflowNodePosition'
        compositionId:
          type: string
          format: uuid
          description: The composition a `composition` block shows.
        startsHere:
          type: boolean
          description: Set on the one composition block a visitor starts at.
        trigger:
          $ref: '#/components/schemas/WorkflowTrigger'
        cases:
          type: array
          description: The rules of a `condition` block, in the order they are read.
          items:
            $ref: '#/components/schemas/WorkflowConditionCase'
      example:
        id: Example id
        type: Example type
        position: null
        compositionId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        startsHere: true
        trigger: null
        cases:
          - Example WorkflowConditionCase
    WorkflowEdge:
      type: object
      description: >-
        A connection from an output port of one block to the input of another.
        Connections run forward only.
      required:
        - id
        - source
        - sourcePort
        - target
      properties:
        id:
          type: string
          pattern: ^[A-Za-z0-9_-]{1,64}$
        source:
          type: string
        sourcePort:
          type: string
          description: >-
            `out` for compositions and triggers; a rule's id, or `default`, for
            conditions.
        target:
          type: string
      example:
        id: Example id
        source: Example source
        sourcePort: Example sourcePort
        target: Example target
    WorkflowNodePosition:
      type: object
      description: Where a block sits on the editor's canvas. Embeds never read it.
      required:
        - x
        - 'y'
      properties:
        x:
          type: number
        'y':
          type: number
      example:
        x: 42
        'y': 42
    WorkflowTrigger:
      type: object
      description: >
        What a trigger block waits for. `input`: a row the visitor adds to a
        table of the composition (`table`).

        `action`: an action the widget reports (`actionId`). `pageEvent`: an
        event the page sends (`name`, and the

        `values` it promises to carry). `scheduled`: a wait or a date
        (`schedule`).
      required:
        - kind
      properties:
        kind:
          type: string
          enum:
            - input
            - action
            - pageEvent
            - scheduled
        table:
          type: string
        actionId:
          type: string
        name:
          type: string
        values:
          type: array
          items:
            type: object
            required:
              - name
              - type
            properties:
              name:
                type: string
              type:
                type: string
                enum:
                  - text
                  - number
                  - boolean
        schedule:
          $ref: '#/components/schemas/WorkflowSchedule'
      example:
        kind: Example kind
        table: Example table
        actionId: Example actionId
        name: Example name
        values: []
        schedule: null
    WorkflowConditionCase:
      type: object
      description: >
        One rule of a condition block, and one path out of it. Rules are read in
        order and the first that matches wins;

        the block's Default output is taken when none does.
      required:
        - id
        - match
        - tests
      properties:
        id:
          type: string
          pattern: ^[A-Za-z0-9_-]{1,64}$
          description: >-
            The output port of the rule. `default` is reserved for the Default
            output.
        label:
          type: string
        match:
          type: string
          enum:
            - all
            - any
          description: '`all` - every comparison must hold; `any` - one is enough.'
        tests:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowConditionTest'
      example:
        id: Example id
        label: Example label
        match: Example match
        tests:
          - Example WorkflowConditionTest
    WorkflowSchedule:
      type: object
      description: >-
        When a Scheduled trigger fires - a wait counted from reaching the step,
        or a fixed moment.
      required:
        - mode
      properties:
        mode:
          type: string
          enum:
            - after
            - at
        amount:
          type: number
          description: How long to wait (mode `after`).
        unit:
          type: string
          enum:
            - seconds
            - minutes
            - hours
            - days
            - weeks
          description: The unit of `amount` (mode `after`).
        at:
          type: string
          format: date-time
          description: The moment to fire at, as an ISO time in UTC (mode `at`).
      example:
        mode: Example mode
        amount: 42
        unit: Example unit
        at: '2026-01-15T09:30:00.000Z'
    WorkflowConditionTest:
      type: object
      description: >-
        One comparison of a rule - a field, an operator and (for most operators)
        a value to compare with.
      required:
        - field
        - operator
      properties:
        field:
          $ref: '#/components/schemas/WorkflowFieldReference'
        operator:
          type: string
          enum:
            - is
            - isNot
            - contains
            - doesNotContain
            - startsWith
            - endsWith
            - greaterThan
            - atLeast
            - lessThan
            - atMost
            - isEmpty
            - isNotEmpty
          description: >
            Text fields take is, isNot, contains, doesNotContain, startsWith,
            endsWith, isEmpty and isNotEmpty.

            Number fields take is, isNot, greaterThan, atLeast, lessThan,
            atMost, isEmpty and isNotEmpty.

            Yes/no fields take is and isNot.
        value:
          description: >
            What the field is compared with; not used by isEmpty and isNotEmpty.
            A text for a text field, a number for

            a number field, true or false for a yes/no field.
          nullable: true
      example:
        field: null
        operator: Example operator
        value: null
    WorkflowFieldReference:
      type: object
      description: >
        A value a rule reads: a column the visitor filled in (`input`) or a
        value that came with a page event

        (`event`). The type is saved with the reference so the graph can be
        evaluated without the widget's schema.
      required:
        - kind
        - name
        - type
      properties:
        kind:
          type: string
          enum:
            - input
            - event
        name:
          type: string
        type:
          type: string
          enum:
            - text
            - number
            - boolean
      example:
        kind: Example kind
        name: Example name
        type: Example type

````

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