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

# Create a workflow

> Initialize a new workflow container with an empty draft version.

Creates a new workflow in the organization. Upon creation, Posttu automatically initializes an empty `draftVersion` ready to accept a trigger and action steps.

### Request Body

| Field | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | **Yes** | Display name of the workflow (1-255 characters). |
| `description` | `string` | No | Optional description explaining the workflow's purpose. |

### cURL Example

```bash theme={null}
curl -X POST "https://posttu.com/api/v1/workflow" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "RSS Content Publisher",
    "description": "Monitors TechCrunch RSS feed and posts AI summaries to Twitter and LinkedIn"
  }'
```

### Response Example

```json theme={null}
{
  "data": {
    "id": "wkf_abc123",
    "name": "RSS Content Publisher",
    "description": "Monitors TechCrunch RSS feed and posts AI summaries to Twitter and LinkedIn",
    "isActive": false,
    "organizationId": "org_789",
    "draftVersionId": "ver_draft_101",
    "createdAt": "2026-07-29T22:15:00.000Z",
    "updatedAt": "2026-07-29T22:15:00.000Z"
  },
  "success": true
}
```


## OpenAPI

````yaml openapi.json POST /api/v1/workflow
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:
    post:
      tags:
        - Workflow
      summary: Create a workflow
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWorkflow'
      responses:
        '200':
          description: Created workflow
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowCreateResponse'
        '401':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateWorkflow:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Workflow name
          example: Daily Post Automation
        description:
          type: string
          description: Optional description
          example: Automates daily posts to social media
      required:
        - name
    WorkflowCreateResponse:
      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.