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

# Create flow

> Create a new flow



## OpenAPI

````yaml post /v2/flows
openapi: 3.1.0
info:
  title: The Portable API
  description: This API allows you to interact with the Portable platform.
  version: 0.0.1
servers:
  - url: https://api.portable.io
security:
  - bearerAuth: []
paths:
  /v2/flows:
    post:
      tags:
        - Flows
      summary: Create flow
      description: Create a new flow
      operationId: createFlow
      requestBody:
        description: Flow to create
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/FlowInput'
                - type: object
                  examples:
                    - type: object
                      source: 87541
                      destination: 89532
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Flow'
              example:
                data:
                  id: 689422
                  displayName: My Freshsales to Snowflake Flow
                  source: 80562
                  destination: 689421
                  frequency: 24h
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
components:
  schemas:
    FlowInput:
      type: object
      required:
        - source
        - destination
      properties:
        source:
          type: integer
          format: int
          readOnly: true
          description: The id of the source associated with the flow
          x-go-type-skip-optional-pointer: true
          x-order: 1
        destination:
          type: integer
          format: int
          readOnly: true
          description: The id of the destination associated with the flow
          x-go-type-skip-optional-pointer: true
          x-order: 2
        displayName:
          type: string
          description: A human-readable name for the flow
          examples:
            - My Freshsales to Snowflake Flow
          x-order: 3
        frequency:
          type: string
          description: >-
            The frequency at which the flow should run. Mutally exclusive with
            the cron field.
          enum:
            - manual
            - 24h
            - 12h
            - 6h
            - 1h
            - 30m
            - 15m
          x-order: 4
        cron:
          type: string
          description: >-
            If provided, the flow will run according to this cron expression.
            Overrides the frequency field.
          x-order: 5
    Flow:
      allOf:
        - $ref: '#/components/schemas/FlowInput'
        - type: object
          required:
            - id
            - disabled
          properties:
            id:
              type: integer
              format: int
              readOnly: true
              x-go-type-skip-optional-pointer: true
              x-order: 1
            disabled:
              type: boolean
              readOnly: true
              description: >-
                Whether the flow is disabled. Disabled flows will not run on
                their schedule.
              x-order: 6
            createdAt:
              type: string
              format: date-time
              readOnly: true
              x-go-type-skip-optional-pointer: true
            updatedAt:
              type: string
              format: date-time
              readOnly: true
              x-go-type-skip-optional-pointer: true
      examples:
        - $ref: '#/components/examples/flowGcalToBigquery/value'
        - $ref: '#/components/examples/flowFreshsalesToSnowflake/value'
  responses:
    BadRequestError:
      description: Bad Request - The request is malformed.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            examples:
              - message: Bad Request
    UnauthorizedError:
      description: Unauthorized - No valid API key provided.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            examples:
              - message: Unauthorized
    ForbiddenError:
      description: Forbidden - You don't have enough permissions to access this resource.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            examples:
              - message: Your current plan does not support this feature
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````