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

# Set workflow trigger

> Configure or update the primary starter trigger node on a workflow draft.

Configures or updates the starter node for a workflow draft. Every active workflow requires a configured trigger to initiate execution runs.

### Path Parameters

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

### Request Body

| Field | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | **Yes** | Trigger piece type (e.g. `schedule`, `webhook`, `rss_new_item`, `app_event`). |
| `displayName` | `string` | **Yes** | Human-readable title displayed on canvas node. |
| `settings` | `object` | No | Piece-specific configuration properties (default `{}`). |
| `cronExpression` | `string` | No | 5-field cron string required if `name` is `schedule` (e.g. `0 9 * * 1`). |

### cURL Example (Schedule Trigger)

```bash theme={null}
curl -X POST "https://posttu.com/api/v1/workflow/wkf_abc123/trigger" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "schedule",
    "displayName": "Every Monday at 9 AM",
    "cronExpression": "0 9 * * 1",
    "settings": {
      "timezone": "America/New_York"
    }
  }'
```

### Response Example

```json theme={null}
{
  "data": {
    "id": "trig_456",
    "versionId": "ver_draft_101",
    "name": "schedule",
    "displayName": "Every Monday at 9 AM",
    "cronExpression": "0 9 * * 1",
    "settings": {
      "timezone": "America/New_York"
    },
    "createdAt": "2026-07-29T22:18:00.000Z"
  },
  "success": true
}
```


## OpenAPI

````yaml openapi.json POST /api/v1/workflow/{id}/trigger
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}/trigger:
    post:
      tags:
        - Workflow
      summary: Set workflow trigger
      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/SetWorkflowTrigger'
      responses:
        '200':
          description: Trigger details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowTriggerResponse'
        '401':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SetWorkflowTrigger:
      type: object
      properties:
        workflowId:
          type: string
          description: Workflow ID
          example: wkf_123abc
        name:
          type: string
          description: Trigger name
          example: schedule
        displayName:
          type: string
          description: Trigger display name
          example: Schedule
        settings:
          type: object
          additionalProperties: {}
          default: {}
          description: Trigger settings
          example:
            cron: 0 9 * * *
        cronExpression:
          type: string
          description: Cron expression
          example: 0 9 * * *
      required:
        - workflowId
        - name
        - displayName
    WorkflowTriggerResponse:
      allOf:
        - $ref: '#/components/schemas/WorkflowTrigger'
        - type: object
          properties:
            workflowId:
              type: string
              description: Workflow ID
          required:
            - workflowId
    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
  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.