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

> Create a new workflow



## OpenAPI

````yaml /api-spec-v2.yaml post /v2/workflows
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/workflows:
    post:
      tags:
        - Workflows
      summary: Create workflow
      description: Create a new workflow
      operationId: createWorkflow
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowInput'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Workflow'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
components:
  schemas:
    WorkflowInput:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        definition:
          type: object
        enabled:
          type: boolean
    Workflow:
      type: object
      required:
        - id
        - name
        - enabled
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
        definition:
          type: object
        enabled:
          type: boolean
        frequency:
          type: string
        cron:
          type: string
        node_schemas:
          type: object
          description: >-
            Read-only field containing the schema of the workflow nodes. This
            field is populated asynchronously and may be null for newly created
            workflows.
  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

````