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

# Get Workflow

> Returns the full workflow document, including canvas `data`, execution `parsedData`, `trigger`, `variables`, `settings`, and (on the Expert AI plan) `analytics`. If `analytics` is omitted, the plan may not include canvas analytics — do not invent counts. There is no separate analytics GET. Path `workflowId` must be URL-encoded. See `/build-workflows/analytics`.

Returns the **full** workflow document — not the minimal `{ id, name, folderId }` rows from [List workflows](/api-reference/workflows/get-minimal).

The response includes canvas `data`, execution `parsedData`, `trigger`, `variables`, `settings`, `lastModified`, and (on the Expert AI plan) `analytics`. URL-encode `workflowId` in the path.

If `analytics` is missing, the plan may not include canvas analytics — do not invent counts. How to interpret the object and PUT graph changes: [Workflow analytics](/build-workflows/analytics).

To build or edit `data` / `parsedData`, read [Build workflows](/build-workflows/overview) first.


## OpenAPI

````yaml GET /workflows/{workflowId}
openapi: 3.1.0
info:
  title: Pingmee API
  description: A complete guide to Pingmee micro service architecture.
  version: 1.0.0
servers:
  - url: https://api.pingmee.co.il
security:
  - cookieAuth: []
    ApiKeyAuth: []
paths:
  /workflows/{workflowId}:
    servers:
      - url: https://workflows.pingmee.co.il
        description: Workflows service
    get:
      description: >-
        Returns the full workflow document, including canvas `data`, execution
        `parsedData`, `trigger`, `variables`, `settings`, and (on the Expert AI
        plan) `analytics`. If `analytics` is omitted, the plan may not include
        canvas analytics — do not invent counts. There is no separate analytics
        GET. Path `workflowId` must be URL-encoded. See
        `/build-workflows/analytics`.
      parameters:
        - name: workflowId
          in: path
          required: true
          description: Workflow identifier. Must be URL-encoded when used in the path.
          schema:
            type: string
      responses:
        '200':
          description: Full workflow document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workflow'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Workflow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Workflow:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: Workflow identifier.
        name:
          type: string
          description: Workflow name.
        folderId:
          type: string
          description: Folder this workflow belongs to.
        associatedTo:
          type: string
          description: >-
            Account id. Set by the server from the Cookie — do not invent this
            value.
        associatedToBusinessId:
          type: string
          description: >-
            WhatsApp phone-number id from GET `/phone-numbers` (row `id`, not
            the WABA `associatedBusinessId`) or Facebook page id. Required for
            WhatsApp send. See `/build-workflows/document`.
        associatedToPlatformId:
          type: string
          description: >-
            Optional alias of the same phone-number id or Facebook page id as
            `associatedToBusinessId`.
        platformType:
          type: string
          description: >-
            Platform this workflow is bound to (`whatsapp`, `facebookMessenger`,
            `instagram`, `web`). Set on create with `associatedToBusinessId`.
        isActive:
          type: boolean
          description: >-
            Whether the workflow runs. Create always stores `false`. Activate
            with PUT `{ isActive: true }`.
        created:
          type: integer
          description: Unix timestamp (seconds). Set by the server on create.
        lastModified:
          type: integer
          description: >-
            Unix timestamp (seconds). Echo this on graph PUTs or the API returns
            409.
        triggerType:
          type: string
          description: >-
            Usually `trigger.data.eventType`. The trigger node is
            `workflow.trigger`, not inside `parsedData`.
        trigger:
          $ref: '#/components/schemas/WorkflowNode'
        variables:
          type: object
          description: >-
            Workflow-level variable map. Usually `{}` unless set. Nested
            variable objects are loose — see `/build-workflows/variables`.
          additionalProperties: true
        data:
          $ref: '#/components/schemas/WorkflowCanvas'
        parsedData:
          type: array
          description: >-
            Execution graph: parent nodes only. Sub-nodes hang off
            `parent.subNodes[]`. Runtime starts at `trigger.connections.out[0]`.
          items:
            $ref: '#/components/schemas/WorkflowNode'
        settings:
          type: object
          description: Optional shared timeout / fallback and other workflow settings.
          additionalProperties: true
        notes:
          type: string
          description: Manual notes or description.
        executionCount:
          type: integer
          description: Number of times the workflow has executed. Server-managed.
        lastExecution:
          type: integer
          description: Unix timestamp of the last execution. Server-managed.
        analytics:
          $ref: '#/components/schemas/WorkflowAnalytics'
        selected:
          type: boolean
          description: Editor UI flag. Not required for API saves.
      additionalProperties: false
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: string
        message:
          type: string
    WorkflowNode:
      type: object
      description: >-
        Execution node used in `parsedData`, `trigger`, and `subNodes`.
        Branching is which sub-node's `connections.out` — there are no handle
        ids here. Node `data` is a loose object; read
        `/build-workflows/overview` before building it.
      required:
        - id
        - type
        - category
        - data
        - connections
      properties:
        id:
          type: string
        parentId:
          type: string
          description: Parent node id when this node is a sub-node.
        type:
          type: string
          description: >-
            NodeType string, for example `pingmeeTrigger`, `whatsapp`, `if`,
            `conditionEvaluation`.
        category:
          type: string
          description: '`Trigger`, `Condition`, `Action`, `Operation`, `Note`, or `Answer`.'
        title:
          type: string
          description: >-
            Used by the engine for some branches (If/Else matches
            `title.toLowerCase()` of `true` / `false`).
        data:
          type: object
          description: >-
            Node form payload. Shape depends on `type` — see
            `/build-workflows/overview`.
          additionalProperties: true
        connections:
          type: object
          description: 'Typically `{ out: string[] }` of target node ids. No handle ids.'
          additionalProperties:
            type: array
            items:
              type: string
        subNodes:
          type: array
          description: >-
            Child branch nodes (answers, true/false, switch cases, fallback,
            timeout). Not used on canvas `data.nodes` — those are siblings with
            `parentId`.
          items:
            $ref: '#/components/schemas/WorkflowNode'
      additionalProperties: true
    WorkflowCanvas:
      type: object
      description: >-
        React Flow canvas (`workflow.data` from `toObject()`). Required for the
        editor. Always send together with `parsedData` + `trigger` when saving a
        graph. Node form payloads are not fully specified here — read
        `/build-workflows/overview` before building `data`.
      properties:
        nodes:
          type: array
          description: >-
            Canvas nodes. Sub-nodes are siblings in this array (they have
            `parentId`), not nested.
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
                description: >-
                  NodeType string, for example `pingmeeTrigger`, `whatsapp`,
                  `if`.
              category:
                type: string
                description: >-
                  `Trigger`, `Condition`, `Action`, `Operation`, `Note`, or
                  `Answer`.
              position:
                type: object
                properties:
                  x:
                    type: number
                  'y':
                    type: number
                additionalProperties: true
              parentId:
                type: string
                description: >-
                  Set on sub-nodes. Sub-nodes are siblings in `data.nodes`, not
                  nested.
              draggable:
                type: boolean
              selected:
                type: boolean
              data:
                type: object
                description: >-
                  Node form payload. Shape depends on `type` — see
                  `/build-workflows/overview`. Do not invent every field from
                  this schema.
                additionalProperties: true
            additionalProperties: true
        edges:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowEdge'
      additionalProperties: true
    WorkflowAnalytics:
      type: object
      description: >-
        Canvas analytics on GET `/workflows/{workflowId}` (Expert AI plan).
        Omitted when the plan does not include canvas analytics — do not invent
        counts. Server-managed; do not send on PUT. A graph PUT prunes
        `nodeStats`, `edgeStats`, and `buttonStats` for ids no longer on the
        graph. See `/build-workflows/analytics`.
      properties:
        totalStarted:
          type: integer
          description: Executions that began.
        totalCompleted:
          type: integer
          description: Executions that finished successfully.
        totalDropped:
          type: integer
          description: Executions that ended in failure or expiry (not success).
        lastUpdated:
          type: integer
          description: Optional. Epoch milliseconds of the last recorded analytics event.
        nodeStats:
          type: object
          description: Per-node counters keyed by node or sub-node id.
          additionalProperties:
            $ref: '#/components/schemas/WorkflowNodeStats'
        edgeStats:
          type: object
          description: >-
            Per-edge counters. Key is `{source}->{target}` or
            `{source}->{target}:{sourceHandle}`.
          additionalProperties:
            $ref: '#/components/schemas/WorkflowEdgeStats'
        buttonStats:
          type: object
          description: >-
            Answer-button clicks keyed by answer sub-node id. If/Else and switch
            paths are node+edge stats on the branch sub-node, not buttonStats.
          additionalProperties:
            $ref: '#/components/schemas/WorkflowButtonStats'
      additionalProperties: true
    WorkflowEdge:
      type: object
      description: >-
        React Flow edge. Copy every edge into execution `connections.out` with
        matching node ids (see `/build-workflows/canvas-vs-execution`). Root
        node output handle is `out`; input is `in`. Sub-node output handle is
        also `in` (downstream edges from a branch use `sourceHandle: "in"`).
        Type is usually `buttonedge`.
      properties:
        id:
          type: string
        source:
          type: string
          description: Source node id. Must match a `data.nodes[].id`.
        target:
          type: string
          description: Target node id. Must match a `data.nodes[].id`.
        sourceHandle:
          type: string
          description: Root output is `out`. Sub-node output is `in`.
        targetHandle:
          type: string
          description: Usually `in`.
        type:
          type: string
          description: Usually `buttonedge`.
      additionalProperties: true
    WorkflowNodeStats:
      type: object
      description: >-
        Per-node canvas counters. Keyed by node or sub-node id in
        `analytics.nodeStats`.
      properties:
        enteredCount:
          type: integer
          description: Times execution entered this node.
        completedCount:
          type: integer
          description: Times this node finished successfully.
        exitedCount:
          type: integer
          description: >-
            Times execution left this node via an outgoing edge (or a button
            click on a parent).
      additionalProperties: false
    WorkflowEdgeStats:
      type: object
      description: >-
        Per-edge traversal counters. Map key is `{sourceNodeId}->{targetNodeId}`
        or `{sourceNodeId}->{targetNodeId}:{sourceHandle}`.
      properties:
        sourceNodeId:
          type: string
        targetNodeId:
          type: string
        sourceHandle:
          type: string
          description: >-
            Root outgoing edges use `out`. Sub-node outgoing edges (answers, If
            true/false, switch cases) use `in`. Older runs may store the
            sub-node id instead of `in`.
        traversalCount:
          type: integer
          description: Times this edge ran.
      additionalProperties: false
    WorkflowButtonStats:
      type: object
      description: >-
        WhatsApp answer sub-node clicks. Map key is the answer `subNodeId`, not
        the parent message id.
      properties:
        subNodeId:
          type: string
          description: Answer sub-node id.
        parentNodeId:
          type: string
          description: Parent WhatsApp (or similar) node id.
        label:
          type: string
          description: Button label as recorded at click time.
        clickCount:
          type: integer
        payload:
          type: string
          description: Optional button payload recorded at click time.
      additionalProperties: false
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: header
      name: Cookie
      description: Personal access token from Pingmee Settings → Developer Tools
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Business API key from Pingmee Settings → Developer Tools

````