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

# Create a Flow

> Create a new Flow.



## OpenAPI

````yaml /v2.yaml post /v2/flows
openapi: 3.1.0
info:
  title: dots api
  version: '1.0'
  summary: Dots Payout API
  description: Scalable and Flexible Payouts Infrastructure
  contact:
    name: Kartikye Mittal
    url: https://dots.dev
    email: info@dots.dev
  license:
    name: MIT
    url: https://opensource.org/license/mit/
servers:
  - url: https://api.dots.dev/api
    description: Production
security:
  - api_key: []
tags:
  - name: accounts-payable
    description: Accounts Payable Routes
  - name: apps
    description: App Routes
  - name: flows
    description: Flow routes
  - name: organizations
    description: Organization Routes
  - name: payment-customers
    description: Payment Customer Routes
  - name: payments
    description: Payment Routes
  - name: payout-batches
    description: Payout Batch Routes
  - name: payout-links
    description: Payout Link Routes
  - name: payout-requests
    description: Payout Request Routes
  - name: payouts
    description: Payout Routes
  - name: transactions
    description: Transaction Routes
  - name: transfer-batches
    description: Transfer Batch routes
  - name: transfers
    description: Transfer routes
  - name: users
    description: User routes
paths:
  /v2/flows:
    post:
      tags:
        - flows
      summary: Create a Flow
      description: Create a new Flow.
      operationId: create-flow
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                steps:
                  type: array
                  uniqueItems: true
                  description: >-
                    A list of steps. Can either be a string or an object with
                    additional properties. Example: A `redirect` step looks like
                    {"name": "redirect", "redirect_url": "https://example.com"}
                  items:
                    oneOf:
                      - type: string
                        title: Step Name
                        enum:
                          - compliance
                          - id-verification
                          - manage-payouts
                          - manage-payments
                          - payout
                          - background-check
                          - redirect
                          - pdf-form-fill
                        description: The `step` name.
                      - type: object
                        title: Step With Options
                        properties:
                          name:
                            type: string
                            enum:
                              - compliance
                              - id-verification
                              - manage-payouts
                              - manage-payments
                              - payout
                              - background-check
                              - redirect
                              - pdf-form-fill
                            description: The `step` name.
                          auto_payout_enabled:
                            type: boolean
                            description: >-
                              Enable or disable setting auto payout on the
                              `payout` or `manage-payout` step. Defaults to
                              `true`.
                            default: true
                          redirect_url:
                            type: string
                            pattern: >-
                              https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)
                            description: URL to redirect for the `redirect` step.
                            format: uri
                          template_id:
                            type: string
                            description: >-
                              The ID of the PDF template to use for the
                              `pdf-form-fill` step.
                          hide_continue_button:
                            type: boolean
                            description: >-
                              Hide the continue button on the flow UI. Defaults
                              to `false`.
                            default: false
                        required:
                          - name
                user_id:
                  type: string
                  format: uuid
                  description: >-
                    The user's id. If the user's ID is provided, the flow will
                    be created in the authenticated state with a 15 minute
                    expiration time unless the `require_auth` option is set to
                    `true`.
                hide_go_to_dashboard_on_complete:
                  type: boolean
                  description: >-
                    Hide the "Go to dashboard" button on the flow UI. Defaults
                    to `false`.
                  default: false
                require_auth:
                  type: boolean
                  description: >-
                    Require the user to be authenticated to complete the flow.
                    Defaults to `false`.
                  default: false
                metadata:
                  description: >-
                    Set of key-value pairs that you can attach to an object.
                    This can be useful for storing additional information about
                    the object in a structured format.
                  type:
                    - string
                    - object
              required:
                - steps
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/flow'
components:
  schemas:
    flow:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the `flow`.
        created:
          type: string
          format: date-time
          description: Date that the `flow` was created.
        user_id:
          type:
            - string
            - 'null'
          format: uuid
          description: ID of the `user` that has claimed the `flow`.
        steps:
          type: array
          description: Array of steps in the flow.
          items:
            type: string
            enum:
              - compliance
              - id-verification
              - background-check
              - manage-payments
              - manage-payouts
              - payout
              - redirect
              - pdf-form-fill
        completed_steps:
          type: array
          description: Array of steps that have been completed in the flow.
          items:
            type: string
            enum:
              - compliance
              - id-verification
              - background-check
              - manage-payments
              - manage-payouts
              - payout
              - redirect
              - pdf-form-fill
        link:
          type: string
          format: uri
          description: URL to access the `flow`. Can be embedded in an `iframe`.
        metadata:
          type:
            - string
            - object
            - 'null'
          description: >-
            Set of key-value pairs that you can attach to an object. This can be
            useful for storing additional information about the object in a
            structured format.
  securitySchemes:
    api_key:
      type: http
      scheme: basic

````