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

# Get workflow details

> Retrieve a specific workflow's full configuration, draft trigger, step graph, and recent runs.

Retrieves complete details for a single workflow by its ID. Includes the current `draftVersion` (trigger, step graph, settings), `publishedVersion` metadata, and recent execution runs.

### Path Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | **Yes** | Unique identifier of the workflow (`wkf_...`). |

### cURL Example

```bash theme={null}
curl "https://posttu.com/api/v1/workflow/wkf_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response Example

```json theme={null}
{
  "data": {
    "id": "wkf_abc123",
    "name": "RSS Content Publisher",
    "description": "Monitors TechCrunch RSS feed and posts AI summaries",
    "isActive": true,
    "publishedVersion": {
      "id": "ver_pub_5",
      "version": 2,
      "publishedAt": "2026-07-29T11:00:00.000Z"
    },
    "draftVersion": {
      "id": "ver_draft_6",
      "trigger": {
        "id": "trig_1",
        "name": "rss_new_item",
        "displayName": "New RSS Item",
        "settings": {
          "feedUrl": "https://techcrunch.com/feed/"
        }
      },
      "steps": [
        {
          "id": "step_1",
          "name": "ai_generate_text",
          "displayName": "Summarize Article",
          "settings": {
            "prompt": "Summarize for Twitter: {{trigger.item.description}}"
          }
        },
        {
          "id": "step_2",
          "name": "channel_post",
          "displayName": "Post to Twitter",
          "parentStepId": "step_1",
          "settings": {
            "channelId": "chan_tw_999",
            "text": "{{steps.step_1.text}}"
          }
        }
      ]
    },
    "recentRuns": [
      {
        "id": "run_999",
        "status": "SUCCESS",
        "durationMs": 1420,
        "startedAt": "2026-07-29T12:00:00.000Z"
      }
    ]
  },
  "success": true
}
```


## OpenAPI

````yaml openapi.json GET /api/v1/workflow/{id}
openapi: 3.1.0
info:
  title: Posttu API
  version: 1.0.0
  description: >-
    Posttu V1 REST API — Workflow automation, social-media post management,
    inbox, tags, and calendar.
servers:
  - url: https://posttu.com
    description: Production
security: []
paths:
  /api/v1/workflow/{id}:
    get:
      tags:
        - Workflow
      summary: Get a workflow
      parameters:
        - schema:
            type: string
            description: Workflow ID
            example: wkf_123abc
          required: true
          description: Workflow ID
          name: id
          in: path
      responses:
        '200':
          description: Workflow details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowGetResponse'
        '401':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '404':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    WorkflowGetResponse:
      allOf:
        - $ref: '#/components/schemas/WorkflowListItem'
        - type: object
          properties:
            steps:
              type: array
              items:
                $ref: '#/components/schemas/WorkflowStep'
              description: Workflow steps
    WorkflowListItem:
      type: object
      properties:
        id:
          type: string
          description: Workflow ID
          example: wkf_abc123
        name:
          type: string
          description: Workflow name
          example: Daily Post Automation
        description:
          type:
            - string
            - 'null'
          description: Workflow description
          example: Automates daily posts to social media
        isActive:
          type: boolean
          description: Workflow active status
          example: true
        definition:
          type:
            - object
            - 'null'
          additionalProperties: {}
          description: >-
            Workflow definition JSON - contains trigger and step configurations.
            Structure depends on pieces used in the workflow.
          example:
            trigger:
              name: schedule
              settings:
                cron: 0 9 * *
            steps: []
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
          example: '2024-01-15T10:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp
          example: '2024-01-20T15:30:00.000Z'
        trigger:
          $ref: '#/components/schemas/WorkflowTrigger'
        _count:
          $ref: '#/components/schemas/WorkflowCount'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowTag'
          description: Workflow tags
      required:
        - id
        - name
        - description
        - isActive
        - definition
        - createdAt
        - updatedAt
        - trigger
    WorkflowStep:
      type: object
      properties:
        id:
          type: string
          description: Step ID
          example: step_xyz789
        name:
          type: string
          description: Step name
          example: sendMessage
        displayName:
          type: string
          description: Step display name
          example: Send Message
        settings:
          type: object
          additionalProperties: {}
          description: Step settings
        parentStepId:
          type:
            - string
            - 'null'
          description: Parent step ID
        branchId:
          type:
            - string
            - 'null'
          description: Branch ID
        previousStepId:
          type:
            - string
            - 'null'
          description: Previous step ID
        isSkipped:
          type: boolean
          description: Skip during execution
          example: false
        canvasPosition:
          type:
            - object
            - 'null'
          properties:
            x:
              type: number
              example: 100
            'y':
              type: number
              example: 200
          required:
            - x
            - 'y'
          description: Canvas position
      required:
        - id
        - name
        - displayName
        - settings
        - isSkipped
    WorkflowTrigger:
      type:
        - object
        - 'null'
      properties:
        id:
          type: string
          description: Trigger ID
          example: trg_xyz789
        name:
          type: string
          description: Trigger name
          example: schedule
        displayName:
          type: string
          description: Display name
          example: Schedule Trigger
        settings:
          type: object
          additionalProperties: {}
          description: Trigger settings
          example:
            cron: 0 9 * * *
        cronExpression:
          type:
            - string
            - 'null'
          description: Cron expression
          example: 0 9 * * *
      required:
        - id
        - name
        - displayName
        - settings
      description: Workflow trigger
    WorkflowCount:
      type: object
      properties:
        steps:
          type: number
          description: Number of steps
          example: 5
        runs:
          type: number
          description: Number of runs
          example: 12
      required:
        - steps
        - runs
      description: Related counts
    WorkflowTag:
      type: object
      properties:
        id:
          type: string
          description: Tag ID
          example: tag_abc123
        name:
          type: string
          description: Tag name
          example: Important
        color:
          type: string
          description: Hex color
          example: '#FF5733'
      required:
        - id
        - name
        - color
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Pass your API key via the Authorization header: `Bearer <api-key>`'

````

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