> ## 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.

# Update workflow

> Update general workflow metadata (name, description, active state) or replace canvas definition graph.

Updates fields on an existing workflow container or replaces its canvas node/edge definition graph.

### Path Parameters

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

### Request Body

| Field | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | Updated display name for the workflow. |
| `description` | `string` | No | Updated description text. |
| `isActive` | `boolean` | No | Set `true` to activate production trigger listener, `false` to pause. |
| `definition` | `object` | No | Optional xyflow graph definition containing `nodes` and `edges`. |

### cURL Example

```bash theme={null}
curl -X PATCH "https://posttu.com/api/v1/workflow/wkf_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated TechCrunch Digest",
    "description": "Auto-posts AI summaries every Monday and Thursday"
  }'
```

### Response Example

```json theme={null}
{
  "data": {
    "id": "wkf_abc123",
    "name": "Updated TechCrunch Digest",
    "description": "Auto-posts AI summaries every Monday and Thursday",
    "isActive": true,
    "updatedAt": "2026-07-29T22:16:00.000Z"
  },
  "success": true
}
```


## OpenAPI

````yaml openapi.json PATCH /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}:
    patch:
      tags:
        - Workflow
      summary: Update a workflow
      parameters:
        - schema:
            type: string
            description: Workflow ID
            example: wkf_123abc
          required: true
          description: Workflow ID
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWorkflow'
      responses:
        '200':
          description: Updated workflow
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowUpdateResponse'
        '401':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UpdateWorkflow:
      type: object
      properties:
        id:
          type: string
          description: Workflow ID
          example: wkf_123abc
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Workflow name
          example: Updated Workflow
        description:
          type: string
          description: Description
          example: Automates daily posts
        definition:
          type: object
          additionalProperties: {}
          description: >-
            Workflow definition JSON - contains trigger and step configurations.
            Structure depends on pieces used.
          example:
            trigger:
              name: schedule
            steps: []
      required:
        - id
    WorkflowUpdateResponse:
      type: object
      properties:
        id:
          type: string
          description: Created workflow ID
          example: wkf_new123
        name:
          type: string
          description: Workflow name
        description:
          type:
            - string
            - 'null'
          description: Workflow description
        isActive:
          type: boolean
          description: Workflow active status
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
      required:
        - id
        - name
        - description
        - isActive
        - createdAt
  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.