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

# Update flow

> Update an existing flow



## OpenAPI

````yaml patch /v2/flows/{id}
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/{id}:
    parameters:
      - $ref: '#/components/parameters/id'
    patch:
      tags:
        - Flows
      summary: Update flow
      description: Update an existing flow
      operationId: updateFlow
      requestBody:
        description: Flow to update
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/FlowInput'
                - type: object
            example:
              source: 87541
              destination: 89532
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Flow'
              example:
                data:
                  id: 689422
                  displayName: My Google Calendar to BigQuery Flow
                  source: 80190
                  destination: 689422
                  cron: 7 5 * * 5
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  parameters:
    id:
      name: id
      in: path
      description: ID
      required: true
      schema:
        $ref: '#/components/schemas/id'
      example:
        - value: 568971
  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'
    id:
      type: integer
      format: int
      examples:
        - 568971
  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
    NotFoundError:
      description: Not Found - The requested resource does not exist.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            examples:
              - message: Not Found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````