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

# Create a flow of ordered steps

> Steps can be wokus and NPS, CSAT or CES tools of your company, in any order, each at most once (maximum 20). A flow lives outside folders.



## OpenAPI

````yaml /openapi-v1.json post /v1/flows
openapi: 3.0.0
info:
  title: Woku Client API v1
  description: >-
    Public REST API for programmatic management of woku Voice-of-Customer
    programs: trackers, VoC instruments (NPS, woku, CES, CSAT), action plans,
    support tickets, multi-channel sending and response capture. Requests are
    company-scoped by the API key; never send a company id.
  version: 1.0.0
  contact:
    name: Woku
    url: https://woku.app
    email: team@woku.app
servers:
  - url: https://clientapi.woku.app
    description: Production
security: []
tags: []
paths:
  /v1/flows:
    post:
      tags:
        - v1 - flows
      summary: Create a flow of ordered steps
      description: >-
        Steps can be wokus and NPS, CSAT or CES tools of your company, in any
        order, each at most once (maximum 20). A flow lives outside folders.
      operationId: V1FlowsController_createFlow
      parameters:
        - name: X-Woku-Idempotency-Key
          in: header
          description: >-
            Client-generated key to make the create safe to retry. A retry with
            the same key returns the original result instead of creating again.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFlowBodyDTO'
      responses:
        '201':
          description: Flow created
        '400':
          description: Validation error or a step is not a tool of your company
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponseDto'
      security:
        - bearer: []
components:
  schemas:
    CreateFlowBodyDTO:
      type: object
      properties:
        name:
          type: string
          maxLength: 140
          example: Post-purchase journey
        steps:
          minItems: 1
          maxItems: 20
          description: Ordered steps. A tool can appear once. Flows live outside folders.
          type: array
          items:
            $ref: '#/components/schemas/FlowStepBodyDTO'
      required:
        - name
        - steps
    ValidationErrorResponseDto:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 400
        message:
          description: Array of validation error messages
          example:
            - email must be a valid email
            - password must be at least 8 characters
          type: array
          items:
            type: string
        error:
          type: string
          description: Error type
          example: Bad Request
      required:
        - statusCode
        - message
        - error
    FlowStepBodyDTO:
      type: object
      properties:
        type:
          type: string
          enum:
            - woku
            - nps
            - csat
            - ces
          description: Kind of tool the respondent answers in this step.
        toolId:
          type: string
          format: ObjectId
          description: >-
            Tool id (woku, NPS tool, CSAT tool or CES tool). For an nps step,
            your company id means the company-level NPS.
      required:
        - type
        - toolId
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: Company secret API key.

````

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