openapi: 3.0.0
info:
  title: Patchworks Core API
  version: 1.0.0
servers:
- url: https://core.wearepatchworks.com
paths:
  /api/v1/activity-logs:
    get:
      summary: List Activity Logs
      description: Retrieves a paginated list of activity logs. Can be filtered by `subject_type` and `subject_id`.
      parameters:
      - name: filter[subject_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by subject_type.
      - name: filter[subject_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by subject_id.
      - name: fields[causer]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of causer fields to return. Available: id, name, email'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivityLogsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - log_name: string
                      subject_type: string
                      subject_id: string
                      causer_id: string
                      event: string
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      changes: string
                      user:
                        id: 0
                        name: string
                        email: string
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/activity-logs
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/activity-logs?page=1
                      last: https://api.example.com/api/v1/activity-logs?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Two activity logs
                  value:
                    data:
                    - log_name: default
                      subject_type: system
                      subject_id: '2'
                      causer_id: '5500822'
                      event: updated
                      created_at: '2026-03-08T19:44:06.000000Z'
                      updated_at: '2026-03-08T19:44:06.000000Z'
                      changes: '{"old":{"updated_at":"2026-03-08T19:31:37.000000Z"},"attributes":{"updated_at":"2026-03-08T19:44:06.000000Z"}}'
                      user:
                        id: 5500822
                        name: Demo User
                        email: null
                    - log_name: default
                      subject_type: system
                      subject_id: '2'
                      causer_id: '5500822'
                      event: updated
                      created_at: '2026-03-08T19:31:37.000000Z'
                      updated_at: '2026-03-08T19:31:37.000000Z'
                      changes: '{"old":{"name":"Customer Magic","updated_at":"2026-03-07T15:31:06.000000Z"},"attributes":{"name":"Customer Magic","updated_at":"2026-03-08T19:31:37.000000Z"}}'
                      user:
                        id: 5500822
                        name: Demo User
                        email: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 53
                      path: http://core.wearepatchworks.com/api/v1/activity-logs
                      per_page: 15
                      to: 15
                      total: 783
                    links:
                      first: http://core.wearepatchworks.com/api/v1/activity-logs?page=1
                      last: http://core.wearepatchworks.com/api/v1/activity-logs?page=53
                      prev: null
                      next: http://core.wearepatchworks.com/api/v1/activity-logs?page=2
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Activity Logs
  /api/v1/ai/conversations:
    get:
      summary: List AI Conversations
      description: Retrieves a paginated list of AI conversations. Can be filtered by `status`, `type`, `user_id`, and `reported`.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: string
                      type: string
                      status: string
                      reported: false
                      initial_user_prompt: string
                      user_interaction_logs_count: 0
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      user:
                        id: 0
                        name: string
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/ai/conversations
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/ai/conversations?page=1
                      last: https://api.example.com/api/v1/ai/conversations?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Two AI conversations
                  value:
                    data:
                    - id: 01kk92avhcep5r343r40smwd16
                      type: script_generation
                      status: completed
                      reported: false
                      initial_user_prompt: I need a script that removes the 'zip code' field (and value) from the payload.
                      user_interaction_logs_count: 1
                      created_at: '2026-03-09T10:29:54+00:00'
                      updated_at: '2026-03-09T10:30:02+00:00'
                      user:
                        id: 5500822
                        name: Demo User
                    - id: 01kk926cw0t30nvjgd0fj7ymtv
                      type: script_generation
                      status: complete
                      reported: false
                      initial_user_prompt: I need a script that adds a field named 'source' to each record in the payload with a value of 'socials'
                      user_interaction_logs_count: 1
                      created_at: '2026-03-09T10:27:28+00:00'
                      updated_at: '2026-03-09T10:28:05+00:00'
                      user:
                        id: 5500822
                        name: Demo User
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: http://core.wearepatchworks.com/api/v1/ai/conversations
                      per_page: 15
                      to: 2
                      total: 2
                    links:
                      first: http://core.wearepatchworks.com/api/v1/ai/conversations?page=1
                      last: http://core.wearepatchworks.com/api/v1/ai/conversations?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - AI
      parameters: []
  /api/v1/ai/scripts/generate:
    post:
      summary: Generate AI Script
      description: Generates a new script from a prompt using AI.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiGenerateGenerateRequest'
      tags:
      - AI
      parameters: []
  /api/v1/ai/scripts/{conversationUlid}/reply:
    post:
      summary: Reply AI Script
      description: 'Submits a follow-up reply to an existing AI script conversation, identified by `conversationUlid`.'
      parameters:
      - name: conversationUlid
        in: path
        required: true
        schema:
          type: string
        description: The conversationUlid identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiReplyReplyRequest'
      tags:
      - AI
  /api/v1/ai/{conversationUlid}/end:
    patch:
      summary: End AI
      description: Ends a specific AI conversation.
      parameters:
      - name: conversationUlid
        in: path
        required: true
        schema:
          type: string
        description: The conversationUlid identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - AI
  /api/v1/ai/{conversationUlid}/report:
    patch:
      summary: Report AI
      description: Flags a specific AI conversation for review.
      parameters:
      - name: conversationUlid
        in: path
        required: true
        schema:
          type: string
        description: The conversationUlid identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - AI
  /api/v1/allowances/refresh:
    post:
      summary: Refresh Allowance
      description: Refreshes the usage allowances for the company associated with the current API key.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Allowances
      parameters: []
  /api/v1/authentication-implementations/{authentication_implementation}/endpoints:
    post:
      summary: Create Authentication Implementation Endpoint
      description: 'Adds one or more endpoints to a specific authentication implementation.'
      parameters:
      - name: authentication_implementation
        in: path
        required: true
        schema:
          type: string
        description: The authentication implementation identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      field_path: example_field_path
                      tags: example_tags
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      variables: example_variables
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      system_id: 1
                      system: {}
                      entity_type_id: 1
                      entity_type: {}
                      endpoint: example_endpoint
                      http_method: CONNECT
                      data_type: csv
                      pagination_method: Custom relative URI
                      deprecated_at: '2025-01-15T10:30:00.000000Z'
                      direction: Send
                      returns_multiple_records: true
                      pre_script_version_id: 1
                      post_script_version_id: 1
                      endpoint_schema: []
                      field_tags: []
                      data_path: []
                      body_format: none
                      raw_body: []
                      filters: []
                      modified: []
                      help_link: []
                      authentication_implementations: []
                      pre_script_version: example_pre_script_version
                      post_script_version: example_post_script_version
                      disable_header_addition: true
                      response_encoding: base64
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      endpoint_ids:
                      - The endpoint ids field is required.
                      endpoint_ids.*:
                      - The endpoint ids * field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthenticationImplementationsStoreEndpointsRequest'
      tags:
      - Authentication Implementations
  /api/v1/authentication-implementations/{authentication_implementation}/endpoints/{endpoint}:
    delete:
      summary: Delete Authentication Implementation Endpoint
      description: 'Permanently removes a specific endpoint from a specific authentication implementation.'
      parameters:
      - name: authentication_implementation
        in: path
        required: true
        schema:
          type: string
        description: The authentication implementation identifier.
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Authentication Implementations
  /api/v1/authentication-implementations/{authentication_implementation}/variables:
    get:
      summary: List Authentication Implementation Variables
      description: 'Retrieves a paginated list of variables for a specific authentication implementation.'
      parameters:
      - name: authentication_implementation
        in: path
        required: true
        schema:
          type: string
        description: The authentication implementation identifier.
      - name: filter[label]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by label.
      - name: filter[key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by key.
      - name: filter[value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by value.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: label, key, value'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      locked: example_locked
                      configurable: example_configurable
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      modified: example_modified
                      pivot: example_pivot
                      required: true
                      advanced: true
                      alias: example_alias
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/authentication-implementations/{authentication_implementation}/variables
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/authentication-implementations/{authentication_implementation}/variables?page=1
                      last: https://api.example.com/api/v1/authentication-implementations/{authentication_implementation}/variables?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Authentication Implementations
    post:
      summary: Create Authentication Implementation Variable
      description: 'Creates a new variable for a specific authentication implementation.'
      parameters:
      - name: authentication_implementation
        in: path
        required: true
        schema:
          type: string
        description: The authentication implementation identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      locked: example_locked
                      configurable: example_configurable
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      modified: example_modified
                      pivot: example_pivot
                      required: true
                      advanced: true
                      alias: example_alias
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthenticationImplementationsStoreVariablesRequest'
      tags:
      - Authentication Implementations
  /api/v1/authentication-implementations/{authentication_implementation}/variables/{variable}:
    delete:
      summary: Delete Authentication Implementation Variable
      description: 'Permanently deletes a specific variable from a specific authentication implementation.'
      parameters:
      - name: authentication_implementation
        in: path
        required: true
        schema:
          type: string
        description: The authentication implementation identifier.
      - name: variable
        in: path
        required: true
        schema:
          type: string
        description: The variable identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Authentication Implementations
  /api/v1/patchworks/blueprints:
    get:
      summary: List Blueprints
      description: 'Retrieves a paginated list of blueprints.'
      tags:
      - Blueprints
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[labelled]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results by label `id`.'
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: filter[intval]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by intval.
      - name: filter[labelTemplates]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by labelTemplates.
      - name: filter[label_templates.id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by label_templates.id.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at, updated_at, name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
    post:
      summary: Create Blueprint
      description: 'Creates a new blueprint.'
      tags:
      - Blueprints
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
      parameters: []
  /api/v1/patchworks/blueprints/{blueprint}:
    get:
      summary: Get Blueprint
      description: 'Retrieves the details of a specific blueprint.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[labelled]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results by label `id`.'
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: filter[intval]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by intval.
      - name: filter[labelTemplates]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by labelTemplates.
      - name: filter[label_templates.id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by label_templates.id.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at, updated_at, name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
    put:
      summary: Update Blueprint
      description: 'Updates an existing blueprint.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
    delete:
      summary: Delete Blueprint
      description: 'Permanently deletes a specific blueprint.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/blueprints/unpublished:
    get:
      summary: Get Unpublished
      description: 'Retrieves blueprints that have not yet been published.'
      tags:
      - Blueprints
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      parameters: []
  /api/v1/patchworks/blueprints/post-install-options:
    get:
      summary: Get Post Install Options
      description: 'Retrieves the available post-install action options for blueprints.'
      tags:
      - Blueprints
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      parameters: []
  /api/v1/blueprints/{blueprint}/install:
    post:
      summary: Install Blueprint
      description: 'Installs the active version of a specific blueprint.'
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlueprintsInstallActiveInstallRequest'
      tags:
      - Blueprints
  /api/v1/blueprints/{blueprint}/versions/{version}/install:
    post:
      summary: Install Blueprint Version
      description: 'Installs a specific version of a specific blueprint.'
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlueprintsInstallInstallRequest'
      tags:
      - Blueprints
  /api/v1/cache-step:
    get:
      summary: List Cache Step
      description: 'Retrieves a paginated list of `Add to Cache` steps associated with `company`
        caches, across all process flows. Specify a `flow_id` query parameter for a list
        of `Add to Cache` steps associated with any cache type, for the given flow.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CacheStepListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      name: string
                      scope: string
                      ttl: 0
                      flow_id: 0
                      flow:
                        id: 0
                        name: string
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/cache-step
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/cache-step?page=1
                      last: https://api.example.com/api/v1/cache-step?page=1
                      prev: null
                      next: null
                    max_ttl: 0
                example-2:
                  summary: One cache step
                  value:
                    data:
                    - id: 2
                      name: Customer Data (France)
                      scope: Flow
                      ttl: 7200
                      flow_id: 2
                      flow:
                        id: 2
                        name: Sync Customer Data (France)
                        description: Sync customers
                        is_enabled: true
                        priority: 3
                        prod_flag: false
                      created_at: '2026-03-05T09:50:00.000000Z'
                      updated_at: '2026-03-06T17:28:12.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: http://core.wearepatchworks.com/api/v1/cache-step
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: http://core.wearepatchworks.com/api/v1/cache-step?page=1
                      last: http://core.wearepatchworks.com/api/v1/cache-step?page=1
                      prev: null
                      next: null
                    max_ttl: 7
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Cache Step
      parameters: []
    post:
      summary: Create Cache Step
      description: Creates a new cache step.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CacheStepResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      scope: example_scope
                      flow_id: 1
                      ttl_unit: example_ttl_unit
                      ttl_number: example_ttl_number
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CacheStepStoreRequest'
      tags:
      - Cache Step
      parameters: []
  /api/v1/cache-step/{cache_step}:
    get:
      summary: Get Cache Step
      description: Retrieves the details of a specific cache step.
      tags:
      - Cache Step
      parameters:
      - name: cache_step
        in: path
        required: true
        schema:
          type: string
        description: The cache step identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      name: string
                      scope: string
                      ttl: 0
                      flow_id: 0
                      flow:
                        id: 0
                        name: string
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/cache-step
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/cache-step?page=1
                      last: https://api.example.com/api/v1/cache-step?page=1
                      prev: null
                      next: null
                    max_ttl: 0
                example-2:
                  summary: One cache step
                  value:
                    data:
                    - id: 2
                      name: Customer Data (France)
                      scope: Flow
                      ttl: 7200
                      flow_id: 2
                      flow:
                        id: 2
                        name: Sync Customer Data (France)
                        description: Sync customers
                        is_enabled: true
                        priority: 3
                        prod_flag: false
                      created_at: '2026-03-05T09:50:00.000000Z'
                      updated_at: '2026-03-06T17:28:12.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: http://core.wearepatchworks.com/api/v1/cache-step
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: http://core.wearepatchworks.com/api/v1/cache-step?page=1
                      last: http://core.wearepatchworks.com/api/v1/cache-step?page=1
                      prev: null
                      next: null
                    max_ttl: 7
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      deprecated: true
  /api/v1/caches:
    get:
      summary: List Caches
      description: Retrieves a paginated list of caches. Can be filtered by `flow_id`, `for_flow`, `scope`, and `name`.
      parameters:
      - name: filter[flow_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_id.
      - name: filter[for_flow]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by for_flow.
      - name: filter[scope]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by scope.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[LIKE]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by LIKE.
      - name: filter[flow]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flow'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CachesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      name: string
                      scope: string
                      ttl: 0
                      flow_id: 0
                      flow:
                        id: 0
                        name: string
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/caches
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/caches?page=1
                      last: https://api.example.com/api/v1/caches?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Seven caches
                  value:
                    data:
                    - id: 1
                      name: Customer Data (Sandbox)
                      scope: Flow
                      ttl: 7200
                      flow_id: 1
                      flow:
                        id: 1
                        name: Sync Customer Data (Sandbox)
                        description: Sync customers
                        is_enabled: true
                        priority: 3
                        prod_flag: false
                      created_at: '2026-03-05T09:49:52.000000Z'
                      updated_at: '2026-03-09T14:01:20.000000Z'
                    - id: 2
                      name: Customer Data (France)
                      scope: Flow
                      ttl: 7200
                      flow_id: 2
                      flow:
                        id: 2
                        name: Sync Customer Data (France)
                        description: Sync customers
                        is_enabled: true
                        priority: 3
                        prod_flag: false
                      created_at: '2026-03-05T09:50:00.000000Z'
                      updated_at: '2026-03-06T17:28:12.000000Z'
                    - id: 3
                      name: Customer Data (Germany)
                      scope: Flow
                      ttl: 7200
                      flow_id: 3
                      flow:
                        id: 3
                        name: Sync Customer Data (Germany)
                        description: Sync customers
                        is_enabled: true
                        priority: 3
                        prod_flag: false
                      created_at: '2026-03-05T09:50:11.000000Z'
                      updated_at: '2026-03-06T17:28:13.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: http://core.wearepatchworks.com/api/v1/caches
                      per_page: 15
                      to: 7
                      total: 7
                    links:
                      first: http://core.wearepatchworks.com/api/v1/caches?page=1
                      last: http://core.wearepatchworks.com/api/v1/caches?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Caches
  /api/v1/caches/metadata:
    get:
      summary: Get Metadata
      description: Retrieves information about caches used in flows.
      tags:
      - Caches
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      key_count: 0
                      memory_usage: 0
                    pagination:
                      current_page: 1
                      last_page: 1
                      per_page: 15
                      total: 0
                example-2:
                  summary: Cache metadata
                  value:
                    data:
                    - id: 1
                      key_count: 14
                      memory_usage: 0.001596
                    - id: 2
                      key_count: 0
                      memory_usage: 0
                    - id: 3
                      key_count: 0
                      memory_usage: 0
                    - id: 4
                      key_count: 0
                      memory_usage: 0
                    - id: 5
                      key_count: 14
                      memory_usage: 0.001596
                    - id: 6
                      key_count: 14
                      memory_usage: 0.001596
                    - id: 7
                      key_count: 0
                      memory_usage: 0
                    pagination:
                      current_page: 1
                      last_page: 1
                      per_page: 15
                      total: 7
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      parameters: []
  /api/v1/caches/{cache}:
    get:
      summary: Get Cache
      description: Retrieves the details of a specific cache.
      parameters:
      - name: cache
        in: path
        required: true
        schema:
          type: string
        description: The cache identifier.
      - name: filter[flow_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_id.
      - name: filter[for_flow]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by for_flow.
      - name: filter[scope]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by scope.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[LIKE]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by LIKE.
      - name: filter[flow]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flow'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CachesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 0
                      name: string
                      scope: string
                      ttl: 0
                      flow_id: 0
                      flow:
                        id: 0
                        name: string
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                example-2:
                  summary: Cache details
                  value:
                    data:
                      id: 1
                      name: Customer Data (Sandbox)
                      scope: Flow
                      ttl: 7200
                      flow_id: 1
                      flow:
                        id: 1
                        name: Sync Customer Data (Sandbox)
                        description: Sync customers
                        is_enabled: true
                        priority: 3
                        prod_flag: false
                      created_at: '2026-03-05T09:49:52.000000Z'
                      updated_at: '2026-03-09T15:01:53.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Caches
    put:
      summary: Update Cache
      description: Updates an existing cache.
      parameters:
      - name: cache
        in: path
        required: true
        schema:
          type: string
        description: The cache identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CachesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      scope: example_scope
                      ttl: example_ttl
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      flow_id: 1
                      cache_template_id: 1
                      content: example_content
                      ttl_unit: example_ttl_unit
                      ttl_number: example_ttl_number
                      flow: example_flow
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CachesUpdateRequest'
      tags:
      - Caches
    delete:
      summary: Delete Cache
      description: Permanently deletes a specific cache.
      parameters:
      - name: cache
        in: path
        required: true
        schema:
          type: string
        description: The cache identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Caches
  /api/v1/caches/{cache}/content/{key}:
    get:
      summary: Get Content
      description: Retrieves data for a given cache key.
      tags:
      - Caches
      parameters:
      - name: cache
        in: path
        required: true
        schema:
          type: string
        description: The cache identifier.
      - name: key
        in: path
        required: true
        schema:
          type: string
        description: The key identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
    put:
      summary: Update Cache Content
      description: Updates the content for a given cache key.
      parameters:
      - name: cache
        in: path
        required: true
        schema:
          type: string
        description: The cache identifier.
      - name: key
        in: path
        required: true
        schema:
          type: string
        description: The key identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CachesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      scope: example_scope
                      ttl: example_ttl
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      flow_id: 1
                      cache_template_id: 1
                      content: example_content
                      ttl_unit: example_ttl_unit
                      ttl_number: example_ttl_number
                      flow: example_flow
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      content:
                      - The content must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CachesUpdateContentRequest'
      tags:
      - Caches
  /api/v1/caches/{cache}/flush:
    post:
      summary: Flush Cache
      description: 'Flushes the contents of a specific cache.'
      parameters:
      - name: cache
        in: path
        required: true
        schema:
          type: string
        description: The cache identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Caches
  /api/v1/caches/{cache}/search/{search}:
    get:
      summary: Search Cache
      description: Searches key names, page numbers, and unique keys within a specific cache for a given term.
      parameters:
      - name: cache
        in: path
        required: true
        schema:
          type: string
        description: The cache identifier.
      - name: search
        in: path
        required: true
        schema:
          type: string
        description: The search identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Caches
  /api/v1/certificates:
    post:
      summary: Create Certificate
      description: 'Creates a new certificate for use with connector authentication.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CertificatesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      connector_id: 1
                      certificate: example_certificate
                      passphrase: example_passphrase
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      user_id: 1
                      connector: {}
                      user: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      certificate:
                      - The certificate field is required.
                      passphrase:
                      - The passphrase must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CertificatesStoreRequest'
      tags:
      - Certificates
      parameters: []
  /api/v1/certificates/{certificate}:
    delete:
      summary: Delete Certificate
      description: 'Permanently deletes a specific certificate.'
      parameters:
      - name: certificate
        in: path
        required: true
        schema:
          type: string
        description: The certificate identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Certificates
  /api/v1/connection-pools:
    get:
      summary: List Connection Pools
      description: Retrieves a paginated list of connection pools.
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: connectors.system'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, limit, created_at'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionPoolsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      limit: 1
                      timeout: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      connectors: []
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/connection-pools
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/connection-pools?page=1
                      last: https://api.example.com/api/v1/connection-pools?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Connection Pools
    post:
      summary: Create Connection Pool
      description: Creates a new connection pool.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionPoolsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      limit: 1
                      timeout: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      connectors: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      limit:
                      - The limit field is required.
                      timeout:
                      - The timeout must be an integer.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionPoolsStoreRequest'
      tags:
      - Connection Pools
      parameters: []
  /api/v1/connection-pools/{connection_pool}:
    get:
      summary: Get Connection Pool
      description: Retrieves the details of a specific connection pool.
      parameters:
      - name: connection_pool
        in: path
        required: true
        schema:
          type: string
        description: The connection pool identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: connectors.system'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, limit, created_at'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionPoolsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      limit: 1
                      timeout: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      connectors: []
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Connection Pools
    put:
      summary: Update Connection Pool
      description: Updates an existing connection pool.
      parameters:
      - name: connection_pool
        in: path
        required: true
        schema:
          type: string
        description: The connection pool identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionPoolsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      limit: 1
                      timeout: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      connectors: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      limit:
                      - The limit must be an integer.
                      timeout:
                      - The timeout must be an integer.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionPoolsUpdateRequest'
      tags:
      - Connection Pools
    delete:
      summary: Delete Connection Pool
      description: Permanently deletes a specific connection pool.
      parameters:
      - name: connection_pool
        in: path
        required: true
        schema:
          type: string
        description: The connection pool identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Connection Pools
  /api/v1/connection-pools/{connection_pool}/clear:
    post:
      summary: Clear Connection Pool
      description: Removes all pending requests from a specific connection pool.
      parameters:
      - name: connection_pool
        in: path
        required: true
        schema:
          type: string
        description: The connection pool identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Connection Pools
  /api/v1/connector-instances:
    post:
      summary: Create Connector Instance
      description: 'To be confirmed.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | name | string | &#x2611; |

        | authentication_implementation_template_id | | &#x2611; |

        | timezone | string | &#x2611; |

        | date_format | string | &#x2611; |

        | rate_limit_unit | string | &#x2611; |

        | rate_limit_duration | integer | &#x2611; |

        | connection_pool_id | integer | |

        | variable_templates | | |

        | variable_templates.*.key | string | &#x2611; |

        | variable_templates.*.value | string | |

        | variable_templates.*.label | string | &#x2611; |

        | variable_templates.*.secret | | |

        | variable_templates.*.locked | | |

        | variable_templates.*.pivot.alias | string | |

        | variable_templates.*.pivot.configurable | | |

        | variable_templates.*.pivot.required | | |

        | variable_templates.*.pivot.advanced | | |'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorInstancesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      authentication_implementation_template_id: 1
                      timezone: example_timezone
                      date_format: example_date_format
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      connection_pool_id: 1
                      variable_templates: example_variable_templates
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      authentication_implementation_template_id:
                      - The authentication implementation template id field is required.
                      timezone:
                      - The timezone field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectorInstancesStoreRequest'
      tags:
      - Connector Instances
      parameters: []
  /api/v1/connectors:
    get:
      summary: List Connectors
      description: 'Retrieves a paginated list of connectors. Can be filtered by `canonical_key`, `system`, and other criteria. Note: In the Patchworks dashboard, a `connector` is known as an `instance`.


        ## Available Includes


        These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.


        - authenticationImplementation

        - authenticationImplementation_count

        - authenticationImplementationExists

        - authenticationImplementation.authenticationType

        - authenticationImplementation.system

        - authenticationImplementation.system.logo

        - authenticationImplementation.endpoints

        - authenticationImplementation.endpoints.filters

        - authenticationImplementation.endpoints.endpointSchema

        - authenticationImplementation.endpoints.system

        - authenticationImplementation.endpoints.system.logo

        - authenticationImplementation.endpoints.entityType

        - authenticationImplementation.endpoints.fieldTags

        - authenticationImplementation.system.systemType

        - variables

        - variables_count

        - variablesExists

        - authenticationImplementation.endpoints.variables

        - certificate

        - certificate_count

        - certificateExists

        - certificate.user



        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - forSystemTemplate

        - forSession





        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - name'
      parameters:
      - name: filter[canonical_key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by canonical_key.
      - name: filter[forSystemTemplate]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by forSystemTemplate.
      - name: filter[system]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by system.
      - name: filter[system_template_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by system_template_id.
      - name: filter[forSession]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by forSession.
      - name: filter[platformSession]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by platformSession.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: authenticationImplementation.authenticationType, authenticationImplementation.system, authenticationImplementation.system.logo, authenticationImplementation.endpoints, authenticationImplementation.endpoints.filters, authenticationImplementation.endpoints.endpointSchema, authenticationImplementation.endpoints.system, authenticationImplementation.endpoints.system.logo, authenticationImplementation.endpoints.entityType, authenticationImplementation.endpoints.fieldTags, authenticationImplementation.system.systemType, variables, authenticationImplementation.endpoints.variables, certificate.user'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      authentication_implementation_id: 1
                      timezone: example_timezone
                      date_format: example_date_format
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      connection_pool_id: 1
                      variables: example_variables
                      session_id: 1
                      platform_app_key: example_platform_app_key
                      certificate_id: 1
                      type: example_type
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      authentication_implementation: []
                      system: example_system
                      certificate: example_certificate
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/connectors
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/connectors?page=1
                      last: https://api.example.com/api/v1/connectors?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Connectors
    post:
      summary: Create Connector
      description: 'Creates a new connector. Note: In the Patchworks dashboard, a `connector` is known as an `instance`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | name | string | &#x2611; |

        | authentication_implementation_id | | &#x2611; |

        | timezone | string | &#x2611; |

        | date_format | string | &#x2611; |

        | rate_limit_unit | string | &#x2611; |

        | rate_limit_duration | integer | &#x2611; |

        | connection_pool_id | integer | |

        | variables | | |

        | variables.*.key | string | &#x2611; |

        | variables.*.value | string | |

        | variables.*.label | string | &#x2611; |

        | variables.*.secret | | |

        | variables.*.locked | | |

        | variables.*.pivot.alias | string | |

        | variables.*.pivot.configurable | | |

        | variables.*.pivot.required | | |

        | variables.*.pivot.advanced | | |

        | session_id | string | |

        | platform_app_key | string | |

        | certificate_id | string | |'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      authentication_implementation_id: 1
                      timezone: example_timezone
                      date_format: example_date_format
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      connection_pool_id: 1
                      variables: example_variables
                      session_id: 1
                      platform_app_key: example_platform_app_key
                      certificate_id: 1
                      type: example_type
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      authentication_implementation: []
                      system: example_system
                      certificate: example_certificate
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      authentication_implementation_id:
                      - The authentication implementation id field is required.
                      timezone:
                      - The timezone field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectorsStoreRequest'
      tags:
      - Connectors
      parameters: []
  /api/v1/connectors/{connector}:
    get:
      summary: Get Connector
      description: 'Retrieves details for a given connector. Note: In the Patchworks dashboard, a `connector` is known as an `instance`.


        ## Available Includes


        These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.


        - authenticationImplementation

        - authenticationImplementation_count

        - authenticationImplementationExists

        - authenticationImplementation.authenticationType

        - authenticationImplementation.system

        - authenticationImplementation.system.logo

        - authenticationImplementation.endpoints

        - authenticationImplementation.endpoints.filters

        - authenticationImplementation.endpoints.endpointSchema

        - authenticationImplementation.endpoints.system

        - authenticationImplementation.endpoints.system.logo

        - authenticationImplementation.endpoints.entityType

        - authenticationImplementation.endpoints.fieldTags

        - authenticationImplementation.system.systemType

        - variables

        - variables_count

        - variablesExists

        - authenticationImplementation.endpoints.variables

        - certificate

        - certificate_count

        - certificateExists

        - certificate.user



        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - forSystemTemplate

        - forSession





        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - name'
      parameters:
      - name: connector
        in: path
        required: true
        schema:
          type: string
        description: The connector identifier.
      - name: filter[canonical_key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by canonical_key.
      - name: filter[forSystemTemplate]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by forSystemTemplate.
      - name: filter[system]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by system.
      - name: filter[system_template_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by system_template_id.
      - name: filter[forSession]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by forSession.
      - name: filter[platformSession]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by platformSession.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: authenticationImplementation.authenticationType, authenticationImplementation.system, authenticationImplementation.system.logo, authenticationImplementation.endpoints, authenticationImplementation.endpoints.filters, authenticationImplementation.endpoints.endpointSchema, authenticationImplementation.endpoints.system, authenticationImplementation.endpoints.system.logo, authenticationImplementation.endpoints.entityType, authenticationImplementation.endpoints.fieldTags, authenticationImplementation.system.systemType, variables, authenticationImplementation.endpoints.variables, certificate.user'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      authentication_implementation_id: 1
                      timezone: example_timezone
                      date_format: example_date_format
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      connection_pool_id: 1
                      variables: example_variables
                      session_id: 1
                      platform_app_key: example_platform_app_key
                      certificate_id: 1
                      type: example_type
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      authentication_implementation: []
                      system: example_system
                      certificate: example_certificate
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Connectors
    put:
      summary: Update Connector
      description: 'Update an existing connector. Note: In the Patchworks dashboard, a `connector` is known as an `instance`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | authentication_implementation_id | | |

        | name | string | |

        | type | string | |

        | timezone | string | |

        | date_format | string | |

        | rate_limit_unit | string | |

        | rate_limit_duration | integer | |

        | connection_pool_id | integer | |

        | variables | | |

        | variables.*.id | string | &#x2611; |

        | variables.*.key | string | |

        | variables.*.value | string | |

        | variables.*.label | string | |

        | variables.*.secret | | |

        | variables.*.locked | | |

        | variables.*.pivot.alias | string | |

        | variables.*.pivot.configurable | | |

        | variables.*.pivot.required | | |

        | variables.*.pivot.advanced | | |'
      parameters:
      - name: connector
        in: path
        required: true
        schema:
          type: string
        description: The connector identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      authentication_implementation_id: 1
                      timezone: example_timezone
                      date_format: example_date_format
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      connection_pool_id: 1
                      variables: example_variables
                      session_id: 1
                      platform_app_key: example_platform_app_key
                      certificate_id: 1
                      type: example_type
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      authentication_implementation: []
                      system: example_system
                      certificate: example_certificate
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      type:
                      - The type must be a string.
                      timezone:
                      - The timezone must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectorsUpdateRequest'
      tags:
      - Connectors
    delete:
      summary: Delete Connector
      description: 'Delete an existing connector. Note: In the Patchworks dashboard, a `connector` is known as an `instance`.'
      parameters:
      - name: connector
        in: path
        required: true
        schema:
          type: string
        description: The connector identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Connectors
  /api/v1/connectors/{connector}/test:
    post:
      summary: Test Connector
      description: 'Test the connection to ensure authentication credentials are valid . Note: In the Patchworks dashboard, a `connector` is known as an `instance`.'
      tags:
      - Connectors
      parameters:
      - name: connector
        in: path
        required: true
        schema:
          type: string
        description: The connector identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/cross-reference-lookups:
    get:
      summary: List Cross Reference Lookups
      description: Retrieves a paginated list of cross reference lookups. Can be filtered by `name`.
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: crossReferenceLookupValues'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrossReferenceLookupsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      cross_reference_lookup_template_id: 1
                      name: My Example
                      description: A description of the resource
                      default_value: example_default_value
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      deleted_at: '2025-01-15T10:30:00.000000Z'
                      left_value: example_left_value
                      right_value: example_right_value
                      cross_reference_lookup_values: []
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/cross-reference-lookups
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/cross-reference-lookups?page=1
                      last: https://api.example.com/api/v1/cross-reference-lookups?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Cross Reference Lookups
    post:
      summary: Create Cross Reference Lookup
      description: Creates a new cross reference lookup.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrossReferenceLookupsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      cross_reference_lookup_template_id: 1
                      name: My Example
                      description: A description of the resource
                      default_value: example_default_value
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      deleted_at: '2025-01-15T10:30:00.000000Z'
                      left_value: example_left_value
                      right_value: example_right_value
                      cross_reference_lookup_values: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      description:
                      - The description field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrossReferenceLookupsStoreRequest'
      tags:
      - Cross Reference Lookups
      parameters: []
  /api/v1/cross-reference-lookups/{crossReferenceLookupTemplate}/install:
    post:
      summary: Install Cross Reference Lookup
      description: Installs a standard cross reference lookup from a template, such as ISO currency code or country code conversions.
      parameters:
      - name: crossReferenceLookupTemplate
        in: path
        required: true
        schema:
          type: string
        description: The crossReferenceLookupTemplate identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Cross Reference Lookups
  /api/v1/cross-reference-lookups/{crossReferenceLookup}/upload:
    post:
      summary: Upload Cross Reference Lookup
      description: "Uploads a given cross reference lookup to your `private` marketplace.\n\nThis operation requires `administrator` permissions. If you are authorising requests with an API key, this request won't work (company-level API keys are associated with manager-level permissions). If you are an `administrator`, you can use OAuth 2 credentials to complete this operation. For more information please see our [Authentication](https://doc.wearepatchworks.com/product-documentation/api-reference/getting-started/authentication#oauth-2-client-credentials) section."
      parameters:
      - name: crossReferenceLookup
        in: path
        required: true
        schema:
          type: string
        description: The crossReferenceLookup identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: 'Upload successful'
                  value:
                    message: 'Cross reference lookup uploaded successfully'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrossReferenceLookupsUploadUploadRequest'
      tags:
      - Cross Reference Lookups
  /api/v1/cross-reference-lookups/{cross_reference_lookup}:
    get:
      summary: Get Cross Reference Lookup
      description: Retrieves the details of a specific cross reference lookup.
      parameters:
      - name: cross_reference_lookup
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: crossReferenceLookupValues'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrossReferenceLookupsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      cross_reference_lookup_template_id: 1
                      name: My Example
                      description: A description of the resource
                      default_value: example_default_value
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      deleted_at: '2025-01-15T10:30:00.000000Z'
                      left_value: example_left_value
                      right_value: example_right_value
                      cross_reference_lookup_values: []
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Cross Reference Lookups
    put:
      summary: Update Cross Reference Lookup
      description: Updates an existing cross reference lookup.
      parameters:
      - name: cross_reference_lookup
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrossReferenceLookupsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      cross_reference_lookup_template_id: 1
                      name: My Example
                      description: A description of the resource
                      default_value: example_default_value
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      deleted_at: '2025-01-15T10:30:00.000000Z'
                      left_value: example_left_value
                      right_value: example_right_value
                      cross_reference_lookup_values: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      description:
                      - The description must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrossReferenceLookupsUpdateRequest'
      tags:
      - Cross Reference Lookups
    delete:
      summary: Delete Cross Reference Lookup
      description: Permanently deletes a specific cross reference lookup.
      parameters:
      - name: cross_reference_lookup
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Cross Reference Lookups
  /api/v1/cross-reference-lookups/{cross_reference_lookup}/clear:
    post:
      summary: Clear Cross Reference Lookup
      description: Removes all values from a specific cross reference lookup.
      tags:
      - Cross Reference Lookups
      parameters:
      - name: cross_reference_lookup
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/cross-reference-lookups/{cross_reference_lookup}/cross-reference-lookup-values:
    get:
      summary: List Cross Reference Lookup Values
      description: Retrieves a paginated list of values for a specific cross reference lookup. Can be filtered by `left_value` and `right_value`.
      parameters:
      - name: cross_reference_lookup
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup identifier.
      - name: filter[cross_reference_lookup_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by cross_reference_lookup_id.
      - name: filter[left_value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by left_value.
      - name: filter[right_value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by right_value.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: cross_reference_lookup_id, left_value, right_value'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrossReferenceLookupsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      cross_reference_lookup_template_id: 1
                      name: My Example
                      description: A description of the resource
                      default_value: example_default_value
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      deleted_at: '2025-01-15T10:30:00.000000Z'
                      left_value: example_left_value
                      right_value: example_right_value
                      cross_reference_lookup_values: []
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/cross-reference-lookups/{cross_reference_lookup}/cross-reference-lookup-values
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/cross-reference-lookups/{cross_reference_lookup}/cross-reference-lookup-values?page=1
                      last: https://api.example.com/api/v1/cross-reference-lookups/{cross_reference_lookup}/cross-reference-lookup-values?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Cross Reference Lookups
    post:
      summary: Create Cross Reference Lookup Value
      description: Creates a new value for a specific cross reference lookup.
      parameters:
      - name: cross_reference_lookup
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrossReferenceLookupsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      cross_reference_lookup_template_id: 1
                      name: My Example
                      description: A description of the resource
                      default_value: example_default_value
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      deleted_at: '2025-01-15T10:30:00.000000Z'
                      left_value: example_left_value
                      right_value: example_right_value
                      cross_reference_lookup_values: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrossReferenceLookupsStoreCrossReferenceLookupValuesRequest'
      tags:
      - Cross Reference Lookups
  /api/v1/cross-reference-lookups/{cross_reference_lookup}/cross-reference-lookup-values/import:
    post:
      summary: Import Cross Reference Lookup Value
      description: Imports values into a specific cross reference lookup from a CSV file containing `left_value` and `right_value` columns.
      parameters:
      - name: cross_reference_lookup
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrossReferenceLookupsImportImportRequest'
      tags:
      - Cross Reference Lookups
  /api/v1/cross-reference-lookups/{cross_reference_lookup}/cross-reference-lookup-values/{cross_reference_lookup_value}:
    get:
      summary: Get Cross Reference Lookup Value
      description: Retrieves the details of a specific cross reference lookup value.
      parameters:
      - name: cross_reference_lookup
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup identifier.
      - name: cross_reference_lookup_value
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup value identifier.
      - name: filter[cross_reference_lookup_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by cross_reference_lookup_id.
      - name: filter[left_value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by left_value.
      - name: filter[right_value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by right_value.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: cross_reference_lookup_id, left_value, right_value'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrossReferenceLookupsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      cross_reference_lookup_template_id: 1
                      name: My Example
                      description: A description of the resource
                      default_value: example_default_value
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      deleted_at: '2025-01-15T10:30:00.000000Z'
                      left_value: example_left_value
                      right_value: example_right_value
                      cross_reference_lookup_values: []
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Cross Reference Lookups
    put:
      summary: Update Cross Reference Lookup Value
      description: Updates an existing cross reference lookup value.
      parameters:
      - name: cross_reference_lookup
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup identifier.
      - name: cross_reference_lookup_value
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup value identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrossReferenceLookupsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      cross_reference_lookup_template_id: 1
                      name: My Example
                      description: A description of the resource
                      default_value: example_default_value
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      deleted_at: '2025-01-15T10:30:00.000000Z'
                      left_value: example_left_value
                      right_value: example_right_value
                      cross_reference_lookup_values: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrossReferenceLookupsUpdateCrossReferenceLookupValuesRequest'
      tags:
      - Cross Reference Lookups
    delete:
      summary: Delete Cross Reference Lookup Value
      description: Permanently deletes a specific cross reference lookup value.
      parameters:
      - name: cross_reference_lookup
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup identifier.
      - name: cross_reference_lookup_value
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup value identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Cross Reference Lookups
  /api/v1/cross-reference-lookups/{cross_reference_lookup}/download:
    get:
      summary: Download Cross Reference Lookup
      description: Triggers the download of a specific cross reference lookup as a CSV file with `left_value` and `right_value` columns. The file is added to the File Downloads section in General Settings.
      parameters:
      - name: cross_reference_lookup
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Cross Reference Lookups
  /api/v1/data-pool:
    get:
      summary: List Data Pools
      description: Retrieves a paginated list of data pools. Can be filtered by `name`.
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: name, description'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataPoolListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      name: My Example
                      description: A description of the resource
                      data_pool_template_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/data-pool
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/data-pool?page=1
                      last: https://api.example.com/api/v1/data-pool?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Data Pools
    post:
      summary: Create Data Pool
      description: Creates a new data pool.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataPoolResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      name: My Example
                      description: A description of the resource
                      data_pool_template_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      description:
                      - The description must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataPoolStoreRequest'
      tags:
      - Data Pools
      parameters: []
  /api/v1/data-pool/{data_pool}:
    get:
      summary: Get Data Pool
      description: Retrieves the details of a specific data pool.
      parameters:
      - name: data_pool
        in: path
        required: true
        schema:
          type: string
        description: The data pool identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: name, description'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataPoolResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      name: My Example
                      description: A description of the resource
                      data_pool_template_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Data Pools
    put:
      summary: Update Data Pool
      description: Updates an existing data pool.
      parameters:
      - name: data_pool
        in: path
        required: true
        schema:
          type: string
        description: The data pool identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataPoolResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      name: My Example
                      description: A description of the resource
                      data_pool_template_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      description:
                      - The description must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataPoolUpdateRequest'
      tags:
      - Data Pools
    delete:
      summary: Delete Data Pool
      description: Permanently deletes a specific data pool.
      parameters:
      - name: data_pool
        in: path
        required: true
        schema:
          type: string
        description: The data pool identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Data Pools
  /api/v1/data-pool/{data_pool}/deduped-data:
    get:
      summary: List Data Pool Deduped Data
      description: Retrieves a paginated list of deduped data records for a specific data pool. Can be filtered by `flow_id`, `flow_run_id`, `step_id`, `entity_type_id`, `value`, `created_before`, and `created_after`.
      parameters:
      - name: data_pool
        in: path
        required: true
        schema:
          type: string
        description: The data pool identifier.
      - name: filter[flow_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_id.
      - name: filter[flow_run_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_run_id.
      - name: filter[step_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by step_id.
      - name: filter[entity_type_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by entity_type_id.
      - name: filter[value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by value.
      - name: filter[created_before]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by created_before.
      - name: filter[created_after]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by created_after.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flow, flowRun, flowStep, entityType, dataPool'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at, id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataPoolListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      name: My Example
                      description: A description of the resource
                      data_pool_template_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/data-pool/{data_pool}/deduped-data
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/data-pool/{data_pool}/deduped-data?page=1
                      last: https://api.example.com/api/v1/data-pool/{data_pool}/deduped-data?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Data Pools
  /api/v1/data-pool/{data_pool}/deduped-data/download:
    get:
      summary: Download Data Pool Deduped Data
      description: Triggers the download of de-dupe data for a specific data pool. A CSV file is generated and added to the file downloads section in the Patchworks dashboard.
      parameters:
      - name: data_pool
        in: path
        required: true
        schema:
          type: string
        description: The data pool identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Data Pools
  /api/v1/data-pool/{data_pool}/deduped-data/import:
    post:
      summary: Import Data Pool Deduped Data
      description: Imports de-dupe values into a specific data pool from a CSV file containing `value` and `entity_type_id` headers. All records in the import file are added as new items, and any existing items in the data pool are left unchanged.
      parameters:
      - name: data_pool
        in: path
        required: true
        schema:
          type: string
        description: The data pool identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataPoolImportImportRequest'
      tags:
      - Data Pools
  /api/v1/data-pool/{id}/deduped-data/delete-records:
    delete:
      summary: Delete Deduped Data Record
      description: Deletes specific records from a data pool.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier of the id.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Data Pools
  /api/v1/endpoints/{endpoint}/field-tags:
    get:
      summary: List Endpoint Field Tags
      description: Retrieves a paginated list of field tags for a specific endpoint. Can be filtered by `name`, `entity_type_id`, `store_as`, and `is_required`.
      parameters:
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[entity_type_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by entity_type_id.
      - name: filter[store_as]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by store_as.
      - name: filter[is_required]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by is_required.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: entityType'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, entity_type_id, store_as, is_required'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      field_path: example_field_path
                      tags: example_tags
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      variables: example_variables
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      system_id: 1
                      system: {}
                      entity_type_id: 1
                      entity_type: {}
                      endpoint: example_endpoint
                      http_method: CONNECT
                      data_type: csv
                      pagination_method: Custom relative URI
                      deprecated_at: '2025-01-15T10:30:00.000000Z'
                      direction: Send
                      returns_multiple_records: true
                      pre_script_version_id: 1
                      post_script_version_id: 1
                      endpoint_schema: []
                      field_tags: []
                      data_path: []
                      body_format: none
                      raw_body: []
                      filters: []
                      modified: []
                      help_link: []
                      authentication_implementations: []
                      pre_script_version: example_pre_script_version
                      post_script_version: example_post_script_version
                      disable_header_addition: true
                      response_encoding: base64
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/endpoints/{endpoint}/field-tags
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/endpoints/{endpoint}/field-tags?page=1
                      last: https://api.example.com/api/v1/endpoints/{endpoint}/field-tags?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Endpoints
    post:
      summary: Create Endpoint Field Tag
      description: Creates a new field tag for a specific endpoint.
      parameters:
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      field_path: example_field_path
                      tags: example_tags
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      variables: example_variables
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      system_id: 1
                      system: {}
                      entity_type_id: 1
                      entity_type: {}
                      endpoint: example_endpoint
                      http_method: CONNECT
                      data_type: csv
                      pagination_method: Custom relative URI
                      deprecated_at: '2025-01-15T10:30:00.000000Z'
                      direction: Send
                      returns_multiple_records: true
                      pre_script_version_id: 1
                      post_script_version_id: 1
                      endpoint_schema: []
                      field_tags: []
                      data_path: []
                      body_format: none
                      raw_body: []
                      filters: []
                      modified: []
                      help_link: []
                      authentication_implementations: []
                      pre_script_version: example_pre_script_version
                      post_script_version: example_post_script_version
                      disable_header_addition: true
                      response_encoding: base64
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field_path:
                      - The field path field is required.
                      tags.*.field_tag_id:
                      - The tags * field tag id field is required.
                      tags.*.field_path:
                      - The tags * field path field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EndpointsStoreFieldTagsRequest'
      tags:
      - Endpoints
  /api/v1/endpoints/{endpoint}/field-tags/{field_tag}:
    put:
      summary: Update Endpoint Field Tag
      description: Updates an existing field tag for a specific endpoint.
      tags:
      - Endpoints
      parameters:
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      - name: field_tag
        in: path
        required: true
        schema:
          type: string
        description: The field tag identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
    delete:
      summary: Delete Endpoint Field Tag
      description: Permanently deletes a specific field tag for a specific endpoint.
      parameters:
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      - name: field_tag
        in: path
        required: true
        schema:
          type: string
        description: The field tag identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Endpoints
  /api/v1/endpoints/{endpoint}/pagination:
    get:
      summary: List Endpoint Pagination
      description: Retrieves the pagination method details for a specific endpoint.
      parameters:
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      field_path: example_field_path
                      tags: example_tags
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      variables: example_variables
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      system_id: 1
                      system: {}
                      entity_type_id: 1
                      entity_type: {}
                      endpoint: example_endpoint
                      http_method: CONNECT
                      data_type: csv
                      pagination_method: Custom relative URI
                      deprecated_at: '2025-01-15T10:30:00.000000Z'
                      direction: Send
                      returns_multiple_records: true
                      pre_script_version_id: 1
                      post_script_version_id: 1
                      endpoint_schema: []
                      field_tags: []
                      data_path: []
                      body_format: none
                      raw_body: []
                      filters: []
                      modified: []
                      help_link: []
                      authentication_implementations: []
                      pre_script_version: example_pre_script_version
                      post_script_version: example_post_script_version
                      disable_header_addition: true
                      response_encoding: base64
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/endpoints/{endpoint}/pagination
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/endpoints/{endpoint}/pagination?page=1
                      last: https://api.example.com/api/v1/endpoints/{endpoint}/pagination?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Endpoints
    put:
      summary: Update Endpoint Pagination
      description: Updates the pagination method configuration for a specific endpoint.
      parameters:
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      field_path: example_field_path
                      tags: example_tags
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      variables: example_variables
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      system_id: 1
                      system: {}
                      entity_type_id: 1
                      entity_type: {}
                      endpoint: example_endpoint
                      http_method: CONNECT
                      data_type: csv
                      pagination_method: Custom relative URI
                      deprecated_at: '2025-01-15T10:30:00.000000Z'
                      direction: Send
                      returns_multiple_records: true
                      pre_script_version_id: 1
                      post_script_version_id: 1
                      endpoint_schema: []
                      field_tags: []
                      data_path: []
                      body_format: none
                      raw_body: []
                      filters: []
                      modified: []
                      help_link: []
                      authentication_implementations: []
                      pre_script_version: example_pre_script_version
                      post_script_version: example_post_script_version
                      disable_header_addition: true
                      response_encoding: base64
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      variables.*.alias:
                      - The variables * alias field is required.
                      variables.*.value:
                      - The variables * value must be a string.
                      request_options.*.key:
                      - The request options * key field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EndpointsUpdatePaginationRequest'
      tags:
      - Endpoints
  /api/v1/endpoints/{endpoint}/schema:
    get:
      summary: List Endpoint Schema
      description: Retrieves the schema defined for a specific endpoint.
      parameters:
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      field_path: example_field_path
                      tags: example_tags
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      variables: example_variables
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      system_id: 1
                      system: {}
                      entity_type_id: 1
                      entity_type: {}
                      endpoint: example_endpoint
                      http_method: CONNECT
                      data_type: csv
                      pagination_method: Custom relative URI
                      deprecated_at: '2025-01-15T10:30:00.000000Z'
                      direction: Send
                      returns_multiple_records: true
                      pre_script_version_id: 1
                      post_script_version_id: 1
                      endpoint_schema: []
                      field_tags: []
                      data_path: []
                      body_format: none
                      raw_body: []
                      filters: []
                      modified: []
                      help_link: []
                      authentication_implementations: []
                      pre_script_version: example_pre_script_version
                      post_script_version: example_post_script_version
                      disable_header_addition: true
                      response_encoding: base64
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/endpoints/{endpoint}/schema
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/endpoints/{endpoint}/schema?page=1
                      last: https://api.example.com/api/v1/endpoints/{endpoint}/schema?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Endpoints
  /api/v1/endpoints/{endpoint}/variables:
    get:
      summary: List Endpoint Variables
      description: Retrieves a paginated list of variables for a specific endpoint. Can be filtered by `label`, `key`, and `value`.
      parameters:
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      - name: filter[label]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by label.
      - name: filter[key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by key.
      - name: filter[value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by value.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: label, key, value'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      locked: example_locked
                      configurable: example_configurable
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      modified: example_modified
                      pivot: example_pivot
                      required: true
                      advanced: true
                      alias: example_alias
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/endpoints/{endpoint}/variables
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/endpoints/{endpoint}/variables?page=1
                      last: https://api.example.com/api/v1/endpoints/{endpoint}/variables?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Endpoints
    post:
      summary: Create Endpoint Variable
      description: Creates a new variable for a specific endpoint.
      parameters:
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      locked: example_locked
                      configurable: example_configurable
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      modified: example_modified
                      pivot: example_pivot
                      required: true
                      advanced: true
                      alias: example_alias
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EndpointsStoreVariablesRequest'
      tags:
      - Endpoints
  /api/v1/endpoints/{endpoint}/variables/{variable}:
    delete:
      summary: Delete Endpoint Variable
      description: Permanently deletes a specific variable for a specific endpoint.
      parameters:
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      - name: variable
        in: path
        required: true
        schema:
          type: string
        description: The variable identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Endpoints
  /api/v1/features:
    get:
      summary: List Features
      description: 'To be confirmed.'
      tags:
      - Features
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[scope]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by scope.
      - name: filter[model_name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_name.
      - name: filter[model_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_id.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, scope'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/filters:
    get:
      summary: List Filters
      description: 'Retrieves a paginated list of filters.'
      parameters:
      - name: filter[type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by type.
      - name: filter[field]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by field.
      - name: filter[comparison]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by comparison.
      - name: filter[model_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_type.
      - name: filter[model_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_id.
      - name: filter[location]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by location.
      - name: filter[is_default]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by is_default.
      - name: filter[keep_matching]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by keep_matching.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: type, field, comparison'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FiltersListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      type: example_type
                      comparison: example_comparison
                      value: example_value
                      value_type: example_value_type
                      keep_matching: example_keep_matching
                      operator_logic: example_operator_logic
                      match_order: example_match_order
                      is_default: example_is_default
                      location: example_location
                      model_type: example_model_type
                      model_id: 1
                      date_format: example_date_format
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      field: example_field
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/filters
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/filters?page=1
                      last: https://api.example.com/api/v1/filters?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Filters
    post:
      summary: Create Filter
      description: 'Creates a new filter.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FiltersResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      type: example_type
                      comparison: example_comparison
                      value: example_value
                      value_type: example_value_type
                      keep_matching: example_keep_matching
                      operator_logic: example_operator_logic
                      match_order: example_match_order
                      is_default: example_is_default
                      location: example_location
                      model_type: example_model_type
                      model_id: 1
                      date_format: example_date_format
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      field: example_field
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      type:
                      - The type field is required.
                      field:
                      - The field field is required.
                      comparison:
                      - The comparison field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FiltersStoreRequest'
      tags:
      - Filters
      parameters: []
  /api/v1/filters/{filter}:
    get:
      summary: Get Filter
      description: 'Retrieves the details of a specific filter.'
      parameters:
      - name: filter
        in: path
        required: true
        schema:
          type: string
        description: The filter identifier.
      - name: filter[type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by type.
      - name: filter[field]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by field.
      - name: filter[comparison]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by comparison.
      - name: filter[model_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_type.
      - name: filter[model_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_id.
      - name: filter[location]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by location.
      - name: filter[is_default]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by is_default.
      - name: filter[keep_matching]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by keep_matching.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: type, field, comparison'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FiltersResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      type: example_type
                      comparison: example_comparison
                      value: example_value
                      value_type: example_value_type
                      keep_matching: example_keep_matching
                      operator_logic: example_operator_logic
                      match_order: example_match_order
                      is_default: example_is_default
                      location: example_location
                      model_type: example_model_type
                      model_id: 1
                      date_format: example_date_format
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      field: example_field
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Filters
    put:
      summary: Update Filter
      description: 'Updates an existing filter.'
      parameters:
      - name: filter
        in: path
        required: true
        schema:
          type: string
        description: The filter identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FiltersResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      type: example_type
                      comparison: example_comparison
                      value: example_value
                      value_type: example_value_type
                      keep_matching: example_keep_matching
                      operator_logic: example_operator_logic
                      match_order: example_match_order
                      is_default: example_is_default
                      location: example_location
                      model_type: example_model_type
                      model_id: 1
                      date_format: example_date_format
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      field: example_field
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      type:
                      - The type must be a string.
                      field:
                      - The field must be a string.
                      comparison:
                      - The comparison must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FiltersUpdateRequest'
      tags:
      - Filters
    delete:
      summary: Delete Filter
      description: 'Permanently deletes a specific filter.'
      parameters:
      - name: filter
        in: path
        required: true
        schema:
          type: string
        description: The filter identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Filters
  /api/v1/flow-metric-model-totals:
    get:
      summary: Total Flow Metric Model Total
      description: 'Retrieves aggregated flow metric totals for one or more models over a specified time interval.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Metric Model Totals
      parameters: []
      deprecated: true
  /api/v1/flow-metric-value-summaries:
    get:
      summary: List Flow Metric Value Summaries
      description: 'List all flow metric value summaries.


        ## Available Includes


        These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.


        - model

        - model_count

        - modelExists



        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - model_type

        - model_id

        - interval_unit

        - key

        - for_month





        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - created_at'
      parameters:
      - name: filter[model_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_type.
      - name: filter[model_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_id.
      - name: filter[interval_unit]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by interval_unit.
      - name: filter[key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by key.
      - name: filter[for_month]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by for_month.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: model'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowMetricValueSummariesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/flow-metric-value-summaries
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/flow-metric-value-summaries?page=1
                      last: https://api.example.com/api/v1/flow-metric-value-summaries?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Metric Value Summaries
  /api/v1/flow-metric-value-totals:
    get:
      summary: Total Flow Metric Value Total
      description: 'Retrieves aggregated flow metric value totals over a specified time interval.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Metric Value Totals
      parameters: []
  /api/v1/flow-metric-value-totals/company-breakdown:
    get:
      summary: Get Company Breakdown
      description: Get Company Breakdown for company breakdown.
      tags:
      - Flow Metric Value Totals
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      parameters: []
  /api/v1/flow-runs:
    get:
      summary: List Flow Runs
      description: Retrieves a paginated list of flow runs. Can be filtered by `user_id`, `flow_id`, `flow_version_id`, `virtual_environment_id`, `trigger`, `status`, date range, and other criteria.
      parameters:
      - name: filter[user_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by user_id.
      - name: filter[flow_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_id.
      - name: filter[flow_version_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_version_id.
      - name: filter[virtual_environment_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by virtual_environment_id.
      - name: filter[trigger]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by trigger.
      - name: filter[status]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by status.
      - name: filter[search]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by search.
      - name: filter[started_before]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results to flow runs that started before the specified time. Accepts a Unix timestamp in milliseconds, e.g. `2026-03-01 19:00` converts to `1772391627000` so `1772391627000` is the parameter value.'
      - name: filter[started_after]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results to flow runs that started after the specified time. Accepts a Unix timestamp in milliseconds.'
      - name: filter[started_on]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results to flow runs that started on the specified date. Accepts a Unix timestamp in milliseconds.'
      - name: filter[retried]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by retried.
      - name: filter[has_warnings]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by has_warnings.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flowVersion, flowVersion.steps, flow, flowRunLogs, errorWarningLogs, flowRunLogs.flowStep, trackedData, metrics, cpuTime, payloadSize, operationsSent, operationsReceived, retriedFlowRun, virtualEnvironmentVersion, virtualEnvironmentVersion.virtualEnvironment'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: started_at'
      - name: fields[trackedData]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of trackedData fields to return. Available: id'
      - name: fields[flow]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of flow fields to return. Available: id, name'
      - name: fields[flowVersion]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of flowVersion fields to return. Available: steps.name'
      - name: fields[retriedFlowRun]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of retriedFlowRun fields to return. Available: id, status'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRunsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: string
                      flow_id: 0
                      flow_version_id: 0
                      virtual_environment_version: null
                      trigger: string
                      status: 0
                      has_warnings: false
                      started_at: '2025-01-15T10:30:00.000000Z'
                      duration: 0
                      retry_flow_run_id: null
                      summary: null
                      flow:
                        id: 0
                        name: string
                        deleted_at: null
                      flow_version:
                        id: 0
                        iteration: 0
                        deleted_at: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/flow-runs
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/flow-runs?page=1
                      last: https://api.example.com/api/v1/flow-runs?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Two flow runs
                  value:
                    data:
                    - id: 01kk6zdrsgvha89vrqhv9ye3xh
                      flow_id: 2
                      flow_version_id: 2
                      virtual_environment_version:
                        id: 3
                        version: 1
                        virtual_environment:
                          id: 2
                          name: French Data (LIVE)
                          deleted_at: null
                      trigger: Schedule
                      status: 2
                      has_warnings: false
                      started_at: '2026-03-08T15:00:35.248000Z'
                      duration: 23.99
                      retry_flow_run_id: null
                      summary: null
                      flow:
                        id: 2
                        name: Sync Customer Data (France)
                        deleted_at: null
                      flow_version:
                        id: 2
                        iteration: 1
                        deleted_at: null
                    - id: 01kk6zdrr1f9rg6e6nc64h8hjq
                      flow_id: 2
                      flow_version_id: 8
                      virtual_environment_version:
                        id: 1
                        version: 1
                        virtual_environment:
                          id: 1
                          name: French Data (TEST)
                          deleted_at: null
                      trigger: Schedule
                      status: 2
                      has_warnings: false
                      started_at: '2026-03-08T15:00:35.202000Z'
                      duration: 20.94
                      retry_flow_run_id: null
                      summary: null
                      flow:
                        id: 2
                        name: Sync Customer Data (France)
                        deleted_at: null
                      flow_version:
                        id: 8
                        iteration: 2
                        deleted_at: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 47
                      path: http://core.wearepatchworks.com/api/v1/flow-runs
                      per_page: 15
                      to: 15
                      total: 695
                    links:
                      first: http://core.wearepatchworks.com/api/v1/flow-runs?page=1
                      last: http://core.wearepatchworks.com/api/v1/flow-runs?page=47
                      prev: null
                      next: http://core.wearepatchworks.com/api/v1/flow-runs?page=2
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Run Logs
  /api/v1/flow-runs/{flow_run}:
    get:
      summary: Get Flow Run
      description: Retrieves the details of a specific flow run.
      parameters:
      - name: flow_run
        in: path
        required: true
        schema:
          type: string
        description: The flow run identifier.
      - name: filter[user_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by user_id.
      - name: filter[flow_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_id.
      - name: filter[flow_version_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_version_id.
      - name: filter[virtual_environment_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by virtual_environment_id.
      - name: filter[trigger]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by trigger.
      - name: filter[status]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by status.
      - name: filter[search]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by search.
      - name: filter[started_before]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results to flow runs that started before the specified time. Accepts a Unix timestamp in milliseconds, e.g. `2026-03-01 19:00` converts to `1772391627000` so `1772391627000` is the parameter value.'
      - name: filter[started_after]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results to flow runs that started after the specified time. Accepts a Unix timestamp in milliseconds.'
      - name: filter[started_on]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results to flow runs that started on the specified date. Accepts a Unix timestamp in milliseconds.'
      - name: filter[retried]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by retried.
      - name: filter[has_warnings]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by has_warnings.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flowVersion, flowVersion.steps, flow, flowRunLogs, errorWarningLogs, flowRunLogs.flowStep, trackedData, metrics, cpuTime, payloadSize, operationsSent, operationsReceived, retriedFlowRun, virtualEnvironmentVersion, virtualEnvironmentVersion.virtualEnvironment'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: started_at'
      - name: fields[trackedData]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of trackedData fields to return. Available: id'
      - name: fields[flow]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of flow fields to return. Available: id, name'
      - name: fields[flowVersion]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of flowVersion fields to return. Available: steps.name'
      - name: fields[retriedFlowRun]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of retriedFlowRun fields to return. Available: id, status'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRunsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: string
                      flow_id: 0
                      flow_version_id: 0
                      user_id: null
                      trigger: string
                      status: 0
                      summary: null
                      started_at: '2025-01-15T10:30:00.000000Z'
                      finished_at: '2025-01-15T10:30:00.000000Z'
                      duration: 0
                      retry_flow_run_id: null
                      has_warnings: false
                      starting_payload_count: 0
                      starting_payload_size: 0
                      flow:
                        id: 0
                        name: string
                      flow_version:
                        id: 0
                        flow_id: 0
                        iteration: 0
                        status: string
                        is_deployed: false
                example-2:
                  summary: Flow run details
                  value:
                    data:
                      id: 01kk6zdrsgvha89vrqhv9ye3xh
                      flow_id: 2
                      flow_version_id: 2
                      user_id: null
                      trigger: Schedule
                      status: 2
                      summary: null
                      started_at: '2026-03-08T15:00:35.248000Z'
                      finished_at: '2026-03-08T15:00:59.241000Z'
                      duration: 23.99
                      retry_flow_run_id: null
                      has_warnings: false
                      starting_payload_count: 0
                      starting_payload_size: 0
                      flow:
                        id: 2
                        name: Sync Customer Data (France)
                        description: Sync customers
                        is_enabled: true
                        priority: 3
                        prod_flag: false
                      flow_version:
                        id: 2
                        flow_id: 2
                        flow_name: Sync Customer Data (France)
                        iteration: 1
                        status: Deployed
                        is_deployed: true
                        is_editable: false
                        deployed_at: null
                        has_callback_step: false
                        latest_run: '2026-03-08 15:00:36'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Run Logs
  /api/v1/flow-runs/{flow_run}/download:
    get:
      summary: Download Run Logs
      description: Queues a download of the detailed logs for a specific flow run. The downloaded file is added to the File Downloads section in General Settings.
      parameters:
      - name: flow_run
        in: path
        required: true
        schema:
          type: string
        description: The flow run identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Download queued
                  value:
                    message: Flow run logs download queued successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Run Logs
  /api/v1/flow-runs/{flow_run}/flow-run-logs:
    get:
      summary: List Run Logs
      description: Retrieves a paginated list of logs for a specific flow run. Can be filtered by `flow_step_id`.
      parameters:
      - name: flow_run
        in: path
        required: true
        schema:
          type: string
        description: The flow run identifier.
      - name: filter[flow_step_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_step_id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flowRun, flowStep, flowRunLogMetadata, flowRunLogPayloads, flowStep.payloads'
      - name: fields[flowStep]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of flowStep fields to return. Available: id, name, payload.id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRunsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      name: My Example
                      payload.id: example_payload.id
                      steps.name: example_steps.name
                      status: Draft
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      flow_id: 1
                      flow_version_id: 1
                      virtual_environment_version: {}
                      user_id: 1
                      trigger: API
                      summary: example_summary
                      started_at: '2025-01-15T10:30:00.000000Z'
                      finished_at: '2025-01-15T10:30:00.000000Z'
                      duration: {}
                      retry_flow_run_id: 1
                      retried_flow_run: []
                      has_warnings: []
                      flow_run_logs: []
                      flow: []
                      flow_version: []
                      metrics: []
                      cpu_time: example_cpu_time
                      payload_size: example_payload_size
                      operations_sent: example_operations_sent
                      operations_received: example_operations_received
                      score: example_score
                      starting_payload_count: 5
                      starting_payload_size: example_starting_payload_size
                      flow_steps_with_errors: example_flow_steps_with_errors
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/flow-runs/{flow_run}/flow-run-logs
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/flow-runs/{flow_run}/flow-run-logs?page=1
                      last: https://api.example.com/api/v1/flow-runs/{flow_run}/flow-run-logs?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Flow run logs
                  value:
                    data:
                      - id: 01km5w6vj4m5efk1a14m453f6n
                        flow_run_id: 01km5w6s7vp33xjy5r1n4w7rrr
                        flow_step_id: null
                        log_level: environment
                        log_message: 'Running in environment: Germany (DE) LIVE #1'
                        message: null
                        meta: null
                        page_number: null
                        attempts: null
                        created_at: '2026-03-20T15:00:50.000000Z'
                        flow_step_payload_count: 1
                      - id: 01km5w6vjf9d6eyn86w4917fh1
                        flow_run_id: 01km5w6s7vp33xjy5r1n4w7rrr
                        flow_step_id: null
                        log_level: info
                        log_message: Flow initialised by Schedule trigger.
                        message: null
                        meta: null
                        page_number: null
                        attempts: null
                        created_at: '2026-03-20T15:00:50.000000Z'
                        flow_step_payload_count: 1
                      - id: 01km5w7md3qscfcxyp4akmrv0v
                        flow_run_id: 01km5w6s7vp33xjy5r1n4w7rrr
                        flow_step_id: 49
                        log_level: info
                        log_message: Flow step Flow Control started
                        message: null
                        meta: null
                        page_number: null
                        attempts: null
                        created_at: '2026-03-20T15:01:15.000000Z'
                        flow_step_payload_count: 5
                    links:
                      first: 'https://app.wearepatchworks.com/core-main/api/v1/flow-runs/01km5w6s7vp33xjy5r1n4w7rrr/flow-run-logs?page=1'
                      last: 'https://app.wearepatchworks.com/core-main/api/v1/flow-runs/01km5w6s7vp33xjy5r1n4w7rrr/flow-run-logs?page=2'
                      prev: null
                      next: 'https://app.wearepatchworks.com/core-main/api/v1/flow-runs/01km5w6s7vp33xjy5r1n4w7rrr/flow-run-logs?page=2'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 2
                      path: 'https://app.wearepatchworks.com/core-main/api/v1/flow-runs/01km5w6s7vp33xjy5r1n4w7rrr/flow-run-logs'
                      per_page: 15
                      to: 15
                      total: 23
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Run Logs
  /api/v1/flow-runs/{flow_run}/flow-run-logs/{flow_run_log}:
    get:
      summary: Get Run Log
      description: Retrieves the details of a specific flow run log.
      parameters:
      - name: flow_run
        in: path
        required: true
        schema:
          type: string
        description: The flow run identifier.
      - name: flow_run_log
        in: path
        required: true
        schema:
          type: string
        description: The flow run log identifier.
      - name: filter[flow_step_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_step_id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flowRun, flowStep, flowRunLogMetadata, flowRunLogPayloads, flowStep.payloads'
      - name: fields[flowStep]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of flowStep fields to return. Available: id, name, payload.id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRunsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      name: My Example
                      payload.id: example_payload.id
                      steps.name: example_steps.name
                      status: Draft
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      flow_id: 1
                      flow_version_id: 1
                      virtual_environment_version: {}
                      user_id: 1
                      trigger: API
                      summary: example_summary
                      started_at: '2025-01-15T10:30:00.000000Z'
                      finished_at: '2025-01-15T10:30:00.000000Z'
                      duration: {}
                      retry_flow_run_id: 1
                      retried_flow_run: []
                      has_warnings: []
                      flow_run_logs: []
                      flow: []
                      flow_version: []
                      metrics: []
                      cpu_time: example_cpu_time
                      payload_size: example_payload_size
                      operations_sent: example_operations_sent
                      operations_received: example_operations_received
                      score: example_score
                      starting_payload_count: 5
                      starting_payload_size: example_starting_payload_size
                      flow_steps_with_errors: example_flow_steps_with_errors
                example-2:
                  summary: Flow run log details
                  value:
                    data:
                      id: 01km5w6vj4m5efk1a14m453f6n
                      flow_run_id: 01km5w6s7vp33xjy5r1n4w7rrr
                      flow_step_id: null
                      log_level: environment
                      log_message: 'Running in environment: Germany (DE) LIVE #1'
                      message: null
                      meta: null
                      page_number: null
                      attempts: null
                      created_at: '2026-03-20T15:00:50.000000Z'
                      flow_step_payload_count: 1
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Run Logs
  /api/v1/flow-runs/{flow_run}/retry:
    post:
      summary: Retry Flow Run
      description: Retries a specific flow run.
      parameters:
      - name: flow_run
        in: path
        required: true
        schema:
          type: string
        description: The flow run identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value: {}
                example-2:
                  summary: Retry initiated
                  value:
                    '0':
                      flow_id: 5
                      flow_version_id: 8
                      previous_flow_run_id: 01km5wy48s9tsaw7w35qez30r3
                    message: Attempting to retry flow run.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Run Logs
  /api/v1/flow-runs/{flow_run}/stop:
    post:
      summary: Stop Flow Run
      description: Stops a specific flow run that is currently in progress.
      parameters:
      - name: flow_run
        in: path
        required: true
        schema:
          type: string
        description: The flow run identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value: {}
                example-2:
                  summary: Stop initiated
                  value:
                    message: Attempting to stop flow run.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Run Logs
  /api/v1/flow-steps/{flow_step}/routes:
    get:
      summary: List Flow Step Routes
      description: 'Retrieves a list of routes (legs) for a specific Route or Branch flow step. The `flow_step` identifier can be obtained from `GET /api/v1/flow-versions/{flow_version}/steps`.'
      parameters:
      - name: flow_step
        in: path
        required: true
        schema:
          type: string
        description: The flow step identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowStepsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      first_step_id: 1
                      filter_logic_operator: example_filter_logic_operator
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      flow_version_id: 1
                      name: My Example
                      microservice: {}
                      config: {}
                      parent_id: 1
                      flow_version: {}
                      children: {}
                      endpoint: {}
                      connector: []
                      data_pool: []
                      filters: []
                      parent_flow_step: []
                      routes: []
                      variables: []
                      script_version: []
                      cache: []
                      payloads: []
                      flow: {}
                      cross_references: example_cross_references
                      notes_count: 5
                      notification_group: {}
                      order: example_order
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/flow-steps/{flow_step}/routes
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/flow-steps/{flow_step}/routes?page=1
                      last: https://api.example.com/api/v1/flow-steps/{flow_step}/routes?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Route step
                  value:
                    data:
                      - id: 5
                        flow_step_id: 80
                        name: First route
                        first_step_id: 81
                        filter_logic_operator: and
                        order: null
                      - id: 6
                        flow_step_id: 80
                        name: Second route
                        first_step_id: 82
                        filter_logic_operator: and
                        order: null
                example-3:
                  summary: Branch step
                  value:
                    data:
                      - id: 7
                        flow_step_id: 86
                        name: First Branch
                        first_step_id: 87
                        filter_logic_operator: and
                        order: 1
                      - id: 8
                        flow_step_id: 86
                        name: Second Branch
                        first_step_id: 88
                        filter_logic_operator: and
                        order: 2
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Routes & Branches
    post:
      summary: Create Flow Step Route
      description: 'Creates a new route (leg) on a Route or Branch flow step. Requires a `name`, and optionally accepts a `first_step_id` and `filter_logic_operator`. The `flow_step` identifier can be obtained from `GET /api/v1/flow-versions/{flow_version}/steps`.'
      parameters:
      - name: flow_step
        in: path
        required: true
        schema:
          type: string
        description: The flow step identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowStepsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      first_step_id: 1
                      filter_logic_operator: example_filter_logic_operator
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      flow_version_id: 1
                      name: My Example
                      microservice: {}
                      config: {}
                      parent_id: 1
                      flow_version: {}
                      children: {}
                      endpoint: {}
                      connector: []
                      data_pool: []
                      filters: []
                      parent_flow_step: []
                      routes: []
                      variables: []
                      script_version: []
                      cache: []
                      payloads: []
                      flow: {}
                      cross_references: example_cross_references
                      notes_count: 5
                      notification_group: {}
                      order: example_order
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      filter_logic_operator:
                      - The filter logic operator must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowStepsStoreRoutesRequest'
      tags:
      - Flow Routes & Branches
  /api/v1/flow-steps/{flow_step}/routes/{route}:
    put:
      summary: Update Flow Step Route
      description: 'Updates an existing route (leg) on a Route or Branch flow step. Accepts `name`, `first_step_id`, and `filter_logic_operator`. The `flow_step` identifier can be obtained from `GET /api/v1/flow-versions/{flow_version}/steps`.'
      parameters:
      - name: flow_step
        in: path
        required: true
        schema:
          type: string
        description: The flow step identifier.
      - name: route
        in: path
        required: true
        schema:
          type: string
        description: The route identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowStepsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      first_step_id: 1
                      filter_logic_operator: example_filter_logic_operator
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      flow_version_id: 1
                      name: My Example
                      microservice: {}
                      config: {}
                      parent_id: 1
                      flow_version: {}
                      children: {}
                      endpoint: {}
                      connector: []
                      data_pool: []
                      filters: []
                      parent_flow_step: []
                      routes: []
                      variables: []
                      script_version: []
                      cache: []
                      payloads: []
                      flow: {}
                      cross_references: example_cross_references
                      notes_count: 5
                      notification_group: {}
                      order: example_order
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      filter_logic_operator:
                      - The filter logic operator must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowStepsUpdateRoutesRequest'
      tags:
      - Flow Routes & Branches
    delete:
      summary: Delete Flow Step Route
      description: 'Permanently deletes a specific route (leg) from a Route or Branch flow step. The `flow_step` identifier can be obtained from `GET /api/v1/flow-versions/{flow_version}/steps`.'
      parameters:
      - name: flow_step
        in: path
        required: true
        schema:
          type: string
        description: The flow step identifier.
      - name: route
        in: path
        required: true
        schema:
          type: string
        description: The route identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Routes & Branches
  /api/v1/flow-steps/{flowStep}/routes/order:
    post:
      summary: Order Flow Step Route
      description: 'Updates the display order of routes (legs) on a Route or Branch flow step. The `flow_step` identifier can be obtained from `GET /api/v1/flow-versions/{flow_version}/steps`.'
      parameters:
      - name: flowStep
        in: path
        required: true
        schema:
          type: string
        description: The flowStep identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Routes & Branches
  /api/v1/patchworks/flow-templates:
    get:
      summary: List Flow Templates
      description: 'Retrieves a paginated list of flow templates included in marketplace blueprints.'
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[hidden_from_marketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by hidden_from_marketplace.
      - name: filter[visible_for_marketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visible_for_marketplace.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[blueprint_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by blueprint_id.
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: filter[marketplaceApps]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by marketplaceApps.
      - name: filter[marketplace_apps.blueprint_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by marketplace_apps.blueprint_id.
      - name: filter[blueprint_version_number]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by blueprint_version_number.
      - name: filter[marketplace_apps.version]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by marketplace_apps.version.
      - name: filter[private]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by private.
      - name: filter[visibility]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visibility.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: systemTemplates.logo, flowStepTemplates, flowStepTemplates.children, flowStepTemplates.parentFlowStep, flowTemplateSchedules, marketplaceCompany, publicCompany, marketplaceApps'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowTemplatesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/patchworks/flow-templates
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/patchworks/flow-templates?page=1
                      last: https://api.example.com/api/v1/patchworks/flow-templates?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Templates
  /api/v1/flow-version-deployments:
    get:
      summary: List Flow Version Deployments
      description: Retrieves a paginated list of all flow version deployments. Can be filtered by `package_id`, `virtual_environment_id`, `name`, and other criteria.
      tags:
      - Flow Version Deployments
      parameters:
      - name: filter[package_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by package_id.
      - name: filter[virtual_environment_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by virtual_environment_id.
      - name: filter[global]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by global.
      - name: filter[flowVersion.flow]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flowVersion.flow.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[LIKE]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by LIKE.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: enabledBy, flowVersion, virtualEnvironment, package, user'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: "Sort field. Prefix with - for descending. Available: created_at, enabled_at, flow_name, DESC, ASC, flow_versions, flow_version_deployments.flow_version_id, =, flow_versions.id, flows, flow_versions.flow_id, =, flows.id, flows.name, flow_version_iteration, DESC, ASC, flow_versions.id, (\n                            SELECT COUNT(*) \n                            FROM flow_versions fv2 \n                            WHERE fv2.flow_id = flow_versions.flow_id \n                            AND fv2.id <= flow_versions.id\n                        ) AS iteration, flow_versions, flow_versions.id, flow_versions, flow_version_deployments.flow_version_id, =, flow_versions.id, iteration_calc, flow_versions.id, =, iteration_calc.id, iteration_calc.iteration"
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      flow_version_id: 0
                      flow_version:
                        id: 0
                        iteration: 0
                        deleted_at: null
                        flow:
                          id: 0
                          name: string
                          deleted_at: null
                      virtual_environment_id: null
                      enabled_by: 0
                      enabled_at: string
                      package_id: null
                      user_id: 0
                      priority: null
                      created_at: string
                      updated_at: string
                    links:
                      first: string
                      last: string
                      prev: null
                      next: null
                    meta:
                      current_page: 0
                      from: 0
                      last_page: 0
                      path: string
                      per_page: 0
                      to: 0
                      total: 0
                example-2:
                  summary: Three deployments
                  value:
                    data:
                    - id: 1
                      flow_version_id: 5
                      flow_version:
                        id: 5
                        iteration: 1
                        deleted_at: null
                        flow:
                          id: 5
                          name: Sync Product Data (UK)
                          deleted_at: null
                      virtual_environment_id: 2
                      enabled_by: 1
                      enabled_at: '2026-03-16 13:59:13'
                      package_id: null
                      user_id: 1
                      priority: null
                      created_at: '2026-03-16T13:59:13.000000Z'
                      updated_at: '2026-03-16T13:59:13.000000Z'
                    - id: 2
                      flow_version_id: 4
                      flow_version:
                        id: 4
                        iteration: 1
                        deleted_at: null
                        flow:
                          id: 4
                          name: Sync Customer Data (UK)
                          deleted_at: null
                      virtual_environment_id: null
                      enabled_by: 1
                      enabled_at: '2026-03-16 14:02:15'
                      package_id: null
                      user_id: 1
                      priority: null
                      created_at: '2026-03-16T14:02:15.000000Z'
                      updated_at: '2026-03-16T14:02:15.000000Z'
                    - id: 3
                      flow_version_id: 6
                      flow_version:
                        id: 6
                        iteration: 2
                        deleted_at: null
                        flow:
                          id: 5
                          name: Sync Product Data (UK)
                          deleted_at: null
                      virtual_environment_id: 4
                      enabled_by: 1
                      enabled_at: '2026-03-18 15:36:30'
                      package_id: null
                      user_id: 1
                      priority: null
                      created_at: '2026-03-18T15:36:30.000000Z'
                      updated_at: '2026-03-18T15:36:30.000000Z'
                    links:
                      first: https://core.wearepatchworks.com/api/v1/flow-version-deployments?page=1
                      last: https://core.wearepatchworks.com/api/v1/flow-version-deployments?page=1
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      links:
                      - url: null
                        label: '&laquo; Previous'
                        active: false
                      - url: https://core.wearepatchworks.com/api/v1/flow-version-deployments?page=1
                        label: '1'
                        active: true
                      - url: null
                        label: Next &raquo;
                        active: false
                      path: https://core.wearepatchworks.com/api/v1/flow-version-deployments
                      per_page: 15
                      to: 3
                      total: 3
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/flow-version-deployments/packages:
    get:
      summary: Get Flow Version Deployment Package
      description: Retrieves a paginated list of packages that have been deployed to at least one virtual environment.
      tags:
      - Packages
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: createdBy, flowVersions.deployments, virtualEnvironments, deployments.virtualEnvironment.deployedVersion, deployments.user, package, flowVersionDeployments, flowVersionDeployments, flowVersionDeployments'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/flow-version-deployments/virtual-environments:
    get:
      summary: Get Virtual Environments
      description: Retrieves a list of virtual environments that have at least one flow version deployment. Can be filtered by `name`, `type`, `status`, `hasDeployedVersion`, and `labelled`.
      tags:
      - Virtual Environments
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by type.
      - name: filter[status]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by status.
      - name: filter[hasDeployedVersion]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by hasDeployedVersion.
      - name: filter[labelled]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results by label `id`.'
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: versions, firstVersion, firstVersion.user, deployments, deployedVersion.variables, deployments.flowVersion, deployments.flowVersion.flow, deployments.enabledBy, deployments.user, deployments.package, packageDeployments.user, packageDeployments.package, labels'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      name: string
                      deleted_at: null
                example-2:
                  summary: Two virtual environments
                  value:
                    data:
                    - id: 2
                      name: France (FR) Live
                      deleted_at: null
                    - id: 4
                      name: Germany (DE) LIVE
                      deleted_at: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/flows/{flow}/versions:
    get:
      summary: List Flow Versions
      description: Retrieves a paginated list of all versions for a specific flow.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - &id001
                      id: 0
                      flow_id: 0
                      flow_name: string
                      flow_priority: 0
                      iteration: 0
                      status: Draft
                      is_deployed: false
                      is_editable: true
                      deployed_at: null
                      deployed_by: null
                      created_at: '2024-01-01T00:00:00.000000Z'
                      updated_at: '2024-01-01T00:00:00.000000Z'
                      has_callback_step: false
                      latest_run: null
                      steps: []
                      schedules: []
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://core.wearepatchworks.com/api/v1/flows/4/versions
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://core.wearepatchworks.com/api/v1/flows/4/versions?page=1
                      last: https://core.wearepatchworks.com/api/v1/flows/4/versions?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Draft version
                  value:
                    data:
                    - &id002
                      id: 6
                      flow_id: 4
                      flow_name: Sync Customer Data (UK)
                      flow_priority: 3
                      iteration: 2
                      status: Draft
                      is_deployed: false
                      is_editable: true
                      deployed_at: null
                      deployed_by: null
                      created_at: '2026-03-05T10:41:18.000000Z'
                      updated_at: '2026-03-08T11:27:40.000000Z'
                      has_callback_step: false
                      latest_run: '2026-03-05 11:19:53'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://core.wearepatchworks.com/api/v1/flows/4/versions
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://core.wearepatchworks.com/api/v1/flows/4/versions?page=1
                      last: https://core.wearepatchworks.com/api/v1/flows/4/versions?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Versions
    post:
      summary: Create Flow Version
      description: Creates a new draft version of a flow. Intended for use when a flow has no existing versions.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsResponse'
              examples:
                example-1:
                  summary: Examples
                  value: &id003
                    data: *id001
                example-2:
                  summary: Newly created version
                  value:
                    data: *id002
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Versions
  /api/v1/flows/{flow}/versions/{version}:
    get:
      summary: Get Flow Version
      description: Retrieves the details of a specific flow version.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsResponse'
              examples:
                example-1:
                  summary: Examples
                  value: *id003
                example-2:
                  summary: Draft version
                  value:
                    data: *id002
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Versions
    put:
      summary: Update Flow Version
      description: Updates an existing flow version. Accepts a `deployed_at` timestamp.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsResponse'
              examples:
                example-1:
                  summary: Examples
                  value: *id003
                example-2:
                  summary: Updated version
                  value:
                    data: *id002
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowsUpdateVersionsRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  deployed_at: null
              example-2:
                summary: Set deployed timestamp
                value:
                  deployed_at: '2026-03-08T12:00:00.000000Z'
      tags:
      - Flow Versions
    delete:
      summary: Delete Flow Version
      description: Permanently deletes a specific flow version.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Successful deletion
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Versions
  /api/v1/flows/{flow}/versions/{version}/copy:
    post:
      summary: Copy Flow Version
      description: Copies an existing deployed flow version into a new draft version. Any existing draft for that flow is overwritten.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value: *id003
                example-2:
                  summary: Copied version
                  value:
                    data:
                      id: 29
                      flow_id: 4
                      flow_name: Sync Customer Data (UK)
                      flow_priority: 3
                      iteration: 6
                      status: Draft
                      is_deployed: false
                      is_editable: true
                      deployed_at: null
                      deployed_by: null
                      created_at: '2026-03-08T12:54:01.000000Z'
                      updated_at: '2026-03-08T12:54:01.000000Z'
                      has_callback_step: false
                      latest_run: '2026-03-05 11:19:53'
                      steps:
                      - &id004
                        id: 204
                        flow_version_id: 29
                        name: Trigger
                        microservice: trigger
                        config: []
                        parent_id: null
                        parent_flow_step: null
                        notification_group: null
                        order: 0
                      - &id009
                        id: 205
                        flow_version_id: 29
                        name: Connector
                        microservice: connector
                        config:
                          query: null
                          tries: 1
                          backoff: &id010 []
                          timeout: 30
                          endpoint_id: 3
                          connector_id: 6
                          response_field: null
                          replace_payload: false
                          script_version_id: null
                          database_item_path: null
                          wrapping_behaviour: Raw
                          expect_empty_response: false
                          save_response_in_payload: null
                          allow_unsuccessful_statuses: false
                        parent_id: 204
                        parent_flow_step: *id004
                        notification_group: null
                        order: 1
                      schedules:
                      - &id007
                        id: 29
                        flow_version_id: 29
                        cron_string: 0 * * * *
                        flow_template_schedule_id: null
                        deleted_at: null
                        created_at: '2026-03-08T12:54:01.000000Z'
                        updated_at: '2026-03-08T12:54:01.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Versions
  /api/v1/flow-versions/{flow_version}/upload:
    post:
      summary: Upload Flow Version
      description: "Uploads a given flow version to your `private` marketplace.\n\nThis operation requires `administrator` permissions. If you are authorising requests with an API key, this request won't work (company-level API keys are associated with manager-level permissions). If you are an `administrator`, you can use OAuth 2 credentials to complete this operation. For more information please see our [Authentication](https://doc.wearepatchworks.com/product-documentation/api-reference/getting-started/authentication#oauth-2-client-credentials) section."
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: 'Flow upload queued'
                  value:
                    message: 'Flow upload queued'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowVersionsUploadUploadRequest'
      tags:
      - Flow Versions
  /api/v1/flows/{flow}/version-metrics:
    get:
      summary: List Flow Version Metrics
      description: Retrieves paginated metrics for a flow's versions. Results can be filtered by time interval, metric type, and key.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      flow_version_id: 0
                      metric: string
                      key: string
                      value: 0
                      recorded_at: '2024-01-01T00:00:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://core.wearepatchworks.com/api/v1/flows/4/version-metrics
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://core.wearepatchworks.com/api/v1/flows/4/version-metrics?page=1
                      last: https://core.wearepatchworks.com/api/v1/flows/4/version-metrics?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Version metrics
                  value:
                    data:
                    - model_type: flow_version
                      model_id: '4'
                      total: 1031511
                      key: cpu_time
                      interval_start: '2026-03-01 00:00:00'
                      interval_end: '2026-03-31 23:59:59'
                      flow_version:
                        id: 4
                        flow_id: 4
                        flow_name: Sync Customer Data (UK)
                        flow_priority: 3
                        iteration: 1
                        status: Deployed
                        is_deployed: true
                        is_editable: false
                        deployed_at: null
                        deployed_by: null
                        created_at: '2026-03-05T09:50:23.000000Z'
                        updated_at: '2026-03-06T17:28:13.000000Z'
                        has_callback_step: false
                        latest_run: '2026-03-08 20:00:17'
                    - model_type: flow_version
                      model_id: '6'
                      total: 7020
                      key: cpu_time
                      interval_start: '2026-03-01 00:00:00'
                      interval_end: '2026-03-31 23:59:59'
                      flow_version:
                        id: 6
                        flow_id: 4
                        flow_name: Sync Customer Data (UK)
                        flow_priority: 3
                        iteration: 2
                        status: Deployed
                        is_deployed: true
                        is_editable: false
                        deployed_at: null
                        deployed_by: null
                        created_at: '2026-03-05T10:41:18.000000Z'
                        updated_at: '2026-03-08T12:39:08.000000Z'
                        has_callback_step: false
                        latest_run: '2026-03-05 11:19:53'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Versions
  /api/v1/flow-versions/{flow_version}/deployments:
    get:
      summary: List Flow Version Deployments
      description: Retrieves a paginated list of all deployments for a specific flow version.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - &id005
                      id: 0
                      flow_version_id: 0
                      virtual_environment_id: null
                      priority: 0
                      deploy_disabled: false
                      enabled_at: null
                      created_at: '2024-01-01T00:00:00.000000Z'
                      updated_at: '2024-01-01T00:00:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://core.wearepatchworks.com/api/v1/flow-versions/6/deployments
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://core.wearepatchworks.com/api/v1/flow-versions/6/deployments?page=1
                      last: https://core.wearepatchworks.com/api/v1/flow-versions/6/deployments?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Active deployment
                  value:
                    data:
                    - id: 1
                      flow_version_id: 4
                      virtual_environment_id: 3
                      enabled_by: 5500822
                      enabled_at: '2026-03-05 10:41:18'
                      package_id: null
                      user_id: 5500822
                      priority: null
                      created_at: '2026-03-05T10:41:18.000000Z'
                      updated_at: '2026-03-05T10:41:18.000000Z'
                    - id: 2
                      flow_version_id: 4
                      virtual_environment_id: 4
                      enabled_by: 5500822
                      enabled_at: '2026-03-05 10:41:25'
                      package_id: null
                      user_id: 5500822
                      priority: null
                      created_at: '2026-03-05T10:41:25.000000Z'
                      updated_at: '2026-03-05T10:41:25.000000Z'
                    links:
                      first: http://core.wearepatchworks.com/api/v1/flow-versions/4/deployments?page=1
                      last: http://core.wearepatchworks.com/api/v1/flow-versions/4/deployments?page=1
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      links:
                      - url: null
                        label: '&laquo; Previous'
                        active: false
                      - url: http://core.wearepatchworks.com/api/v1/flow-versions/4/deployments?page=1
                        label: '1'
                        active: true
                      - url: null
                        label: Next &raquo;
                        active: false
                      path: http://core.wearepatchworks.com/api/v1/flow-versions/4/deployments
                      per_page: 15
                      to: 2
                      total: 2
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Version Deployments
    post:
      summary: Create Flow Version Deployment
      description: Creates a new deployment for a flow version. Accepts an optional virtual environment and priority level.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id005
                example-2:
                  summary: New deployment
                  value:
                    data:
                      id: 12
                      flow_version_id: 6
                      virtual_environment_id: 3
                      priority: 1
                      deploy_disabled: false
                      enabled_at: '2026-03-05T10:45:00.000000Z'
                      created_at: '2026-03-05T10:45:00.000000Z'
                      updated_at: '2026-03-05T10:45:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      flow_version_id:
                      - The flow version id field is required.
                      priority:
                      - The priority must be an integer.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowVersionsStoreDeploymentsRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  flow_version_id: 0
                  virtual_environment_id: null
                  priority: 0
                  deploy_disabled: false
              example-2:
                summary: Deploy to virtual environment
                value:
                  flow_version_id: 6
                  virtual_environment_id: 3
                  priority: 1
                  deploy_disabled: false
      tags:
      - Flow Version Deployments
  /api/v1/flow-versions/{flow_version}/deployments/{deployment}:
    get:
      summary: Get Flow Version Deployment
      description: Retrieves the details of a specific flow version deployment.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: deployment
        in: path
        required: true
        schema:
          type: string
        description: The deployment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id005
                example-2:
                  summary: Active deployment
                  value:
                    data:
                      id: 1
                      flow_version_id: 4
                      virtual_environment_id: 3
                      enabled_by: 5500822
                      enabled_at: '2026-03-05 10:41:18'
                      package_id: null
                      user_id: 5500822
                      priority: null
                      created_at: '2026-03-05T10:41:18.000000Z'
                      updated_at: '2026-03-05T10:41:18.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Version Deployments
    put:
      summary: Update Flow Version Deployment
      description: Updates an existing deployment. Accepts a virtual environment, priority, and enabled timestamp.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: deployment
        in: path
        required: true
        schema:
          type: string
        description: The deployment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id005
                example-2:
                  summary: Updated deployment
                  value:
                    data:
                      id: 12
                      flow_version_id: 6
                      virtual_environment_id: 3
                      priority: 2
                      deploy_disabled: false
                      enabled_at: '2026-03-05T10:45:00.000000Z'
                      created_at: '2026-03-05T10:45:00.000000Z'
                      updated_at: '2026-03-05T10:45:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      priority:
                      - The priority must be an integer.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowVersionsUpdateDeploymentsRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  virtual_environment_id: null
                  priority: 0
                  deploy_disabled: false
                  enabled_at: null
              example-2:
                summary: Update priority
                value:
                  virtual_environment_id: 3
                  priority: 2
                  deploy_disabled: false
                  enabled_at: '2026-03-08T12:00:00.000000Z'
      tags:
      - Flow Version Deployments
    delete:
      summary: Delete Flow Version Deployment
      description: Permanently deletes a specific flow version deployment.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: deployment
        in: path
        required: true
        schema:
          type: string
        description: The deployment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Successful deletion
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Version Deployments
  /api/v1/flow-versions/{flow_version}/deployments/{deployment}/enable:
    post:
      summary: Enable Flow Version Deployment
      description: Enables a specific flow version deployment, allowing it to process runs.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: deployment
        in: path
        required: true
        schema:
          type: string
        description: The deployment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Deployment enabled
                  value:
                    message: Successfully enabled flow version deployment
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Version Deployments
  /api/v1/flow-versions/{flow_version}/deployments/{deployment}/disable:
    post:
      summary: Disable Flow Version Deployment
      description: Disables a specific flow version deployment, preventing it from processing runs.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: deployment
        in: path
        required: true
        schema:
          type: string
        description: The deployment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Deployment disabled
                  value:
                    message: Successfully disabled flow version deployment
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Version Deployments
  /api/v1/flow-versions/{flow_version}/schedules:
    get:
      summary: List Flow Version Schedules
      description: Retrieves a paginated list of all schedules for a specific flow version.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - &id006
                      id: 0
                      flow_version_id: 0
                      cron_string: string
                      flow_template_schedule_id: null
                      deleted_at: null
                      created_at: '2024-01-01T00:00:00.000000Z'
                      updated_at: '2024-01-01T00:00:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://core.wearepatchworks.com/api/v1/flow-versions/6/schedules
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://core.wearepatchworks.com/api/v1/flow-versions/6/schedules?page=1
                      last: https://core.wearepatchworks.com/api/v1/flow-versions/6/schedules?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Hourly schedule
                  value:
                    data:
                    - id: 4
                      flow_version_id: 4
                      cron_string: 0 * * * *
                    links:
                      first: http://core.wearepatchworks.com/api/v1/flow-versions/4/schedules?page=1
                      last: http://core.wearepatchworks.com/api/v1/flow-versions/4/schedules?page=1
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      links:
                      - url: null
                        label: '&laquo; Previous'
                        active: false
                      - url: http://core.wearepatchworks.com/api/v1/flow-versions/4/schedules?page=1
                        label: '1'
                        active: true
                      - url: null
                        label: Next &raquo;
                        active: false
                      path: http://core.wearepatchworks.com/api/v1/flow-versions/4/schedules
                      per_page: 15
                      to: 1
                      total: 1
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Versions
    post:
      summary: Create Flow Version Schedule
      description: Creates a new schedule for a flow version using a `cron_string`.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id006
                example-2:
                  summary: Created schedule
                  value:
                    data: *id007
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowVersionsStoreSchedulesRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  cron_string: string
                  deployed_at: null
              example-2:
                summary: Hourly schedule
                value:
                  cron_string: 0 * * * *
                  deployed_at: null
      tags:
      - Flow Versions
  /api/v1/flow-versions/{flow_version}/schedules/{schedule}:
    put:
      summary: Update Flow Version Schedule
      description: Updates the `cron_string` for an existing flow version schedule.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: schedule
        in: path
        required: true
        schema:
          type: string
        description: The schedule identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id006
                example-2:
                  summary: Updated schedule
                  value:
                    data:
                      id: 29
                      flow_version_id: 29
                      cron_string: 0 9 * * *
                      flow_template_schedule_id: null
                      deleted_at: null
                      created_at: '2026-03-08T12:54:01.000000Z'
                      updated_at: '2026-03-08T12:54:01.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowVersionsUpdateSchedulesRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  cron_string: string
                  deployed_at: null
              example-2:
                summary: Update to daily schedule
                value:
                  cron_string: 0 9 * * *
                  deployed_at: null
      tags:
      - Flow Versions
    delete:
      summary: Delete Flow Version Schedule
      description: Permanently deletes a specific flow version schedule.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: schedule
        in: path
        required: true
        schema:
          type: string
        description: The schedule identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Successful deletion
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Versions
  /api/v1/flow-versions/{flow_version}/steps:
    get:
      summary: List Flow Version Steps
      description: Retrieves a paginated list of all steps for a specific flow version.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - &id008
                      id: 0
                      flow_version_id: 0
                      name: string
                      microservice: string
                      config: {}
                      parent_id: null
                      parent_flow_step: null
                      notification_group: null
                      order: 0
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://core.wearepatchworks.com/api/v1/flow-versions/29/steps
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://core.wearepatchworks.com/api/v1/flow-versions/29/steps?page=1
                      last: https://core.wearepatchworks.com/api/v1/flow-versions/29/steps?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Two steps
                  value:
                    data:
                    - id: 25
                      flow_version_id: 4
                      name: Connector
                      microservice: connector
                      config:
                        query: null
                        tries: 1
                        backoff: []
                        timeout: 30
                        endpoint_id: 3
                        connector_id: 6
                        response_field: null
                        replace_payload: false
                        script_version_id: null
                        database_item_path: null
                        wrapping_behaviour: Raw
                        expect_empty_response: false
                        save_response_in_payload: null
                        allow_unsuccessful_statuses: false
                      parent_id: null
                      filters: []
                      routes: []
                      variables:
                      - id: 01kk4ery19kxw9ts7yjmwq6r0f
                        key: link_header
                        value: Link
                        label: Link header name
                        secret: false
                        locked: false
                        modified: false
                        pivot:
                          configurable: true
                          modified: false
                          required: true
                          advanced: false
                          alias: pagination_link_header_name
                          id: 111
                      notification_group: null
                      order: 1
                    - id: 26
                      flow_version_id: 4
                      name: Flow Control
                      microservice: batch
                      config:
                        path: results
                        size: 1
                        endpoint_id: null
                        connector_id: null
                        payload_format: null
                        remove_from_array: true
                      parent_id: 25
                      filters: []
                      routes: []
                      variables: []
                      notification_group: null
                      order: 1
                    links:
                      first: http://core.wearepatchworks.com/api/v1/flow-versions/4/steps?page=1
                      last: http://core.wearepatchworks.com/api/v1/flow-versions/4/steps?page=1
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      links:
                      - url: null
                        label: '&laquo; Previous'
                        active: false
                      - url: http://core.wearepatchworks.com/api/v1/flow-versions/4/steps?page=1
                        label: '1'
                        active: true
                      - url: null
                        label: Next &raquo;
                        active: false
                      path: http://core.wearepatchworks.com/api/v1/flow-versions/4/steps
                      per_page: 15
                      to: 2
                      total: 2
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Version Steps
    post:
      summary: Create Flow Version Step
      description: Creates a new step for a flow version. Requires a `name` and `microservice`, and optionally accepts configuration, a parent step, and variables.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id008
                example-2:
                  summary: Created step
                  value:
                    data: *id009
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowVersionsStoreStepsRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  flow_version_id: 0
                  name: string
                  microservice: string
                  config: {}
                  parent_id: null
                  variables: null
              example-2:
                summary: Create connector step
                value:
                  flow_version_id: 29
                  name: Connector
                  microservice: connector
                  config:
                    endpoint_id: 3
                    connector_id: 6
                    tries: 1
                    timeout: 30
                    replace_payload: false
                    wrapping_behaviour: Raw
                  parent_id: 204
                  variables: null
      tags:
      - Flow Version Steps
  /api/v1/flow-versions/{flow_version}/steps/{step}:
    get:
      summary: Get Flow Version Step
      description: Retrieves the details of a specific step for a flow version.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: step
        in: path
        required: true
        schema:
          type: string
        description: The step identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id008
                example-2:
                  summary: Connector step
                  value:
                    data: *id009
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Version Steps
    put:
      summary: Update Flow Version Step
      description: Updates an existing step. Accepts `name`, `microservice`, configuration, parent step, and variable changes.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: step
        in: path
        required: true
        schema:
          type: string
        description: The step identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id008
                example-2:
                  summary: Updated step
                  value:
                    data:
                      id: 205
                      flow_version_id: 29
                      name: Connector
                      microservice: connector
                      config:
                        query: null
                        tries: 3
                        backoff: *id010
                        timeout: 60
                        endpoint_id: 3
                        connector_id: 6
                        response_field: null
                        replace_payload: false
                        script_version_id: null
                        database_item_path: null
                        wrapping_behaviour: Raw
                        expect_empty_response: false
                        save_response_in_payload: null
                        allow_unsuccessful_statuses: false
                      parent_id: 204
                      parent_flow_step: *id004
                      notification_group: null
                      order: 1
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowVersionsUpdateStepsRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  name: string
                  microservice: string
                  config: {}
                  parent_id: null
                  variables: null
              example-2:
                summary: Update step config
                value:
                  name: Connector
                  microservice: connector
                  config:
                    endpoint_id: 3
                    connector_id: 6
                    tries: 3
                    timeout: 60
                    replace_payload: false
                    wrapping_behaviour: Raw
                  parent_id: 204
                  variables: null
      tags:
      - Flow Version Steps
    delete:
      summary: Delete Flow Version Step
      description: Permanently deletes a specific step from a flow version.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: step
        in: path
        required: true
        schema:
          type: string
        description: The step identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Successful deletion
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Version Steps
  /api/v1/flow-versions/{flow_version}/steps/{step}/children:
    post:
      summary: Create Flow Version Step Children
      description: Creates a new child step beneath a specified step, connected via a flow step route.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: step
        in: path
        required: true
        schema:
          type: string
        description: The step identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id008
                example-2:
                  summary: Created child step
                  value:
                    data:
                      id: 208
                      flow_version_id: 29
                      name: Script
                      microservice: script
                      config:
                        skip: false
                        script_version_id: 01kfg5kj60ff9dcq5q4e7c0mrp
                      parent_id: 207
                      parent_flow_step: null
                      notification_group: null
                      order: 1
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowVersionsStoreChildrenRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  name: string
                  microservice: string
                  config: {}
                  flow_step_route_id: null
                  variables: null
              example-2:
                summary: Create script child step
                value:
                  name: Script
                  microservice: script
                  config:
                    skip: false
                    script_version_id: 01kfg5kj60ff9dcq5q4e7c0mrp
                  flow_step_route_id: null
                  variables: null
      tags:
      - Flow Version Steps
  /api/v1/flow-versions/{flow_version}/steps/{step}/parents:
    post:
      summary: Create Flow Version Step Parent
      description: Creates a new parent step above a specified step.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: step
        in: path
        required: true
        schema:
          type: string
        description: The step identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id008
                example-2:
                  summary: Created parent step
                  value:
                    data:
                      id: 209
                      flow_version_id: 29
                      name: Map
                      microservice: map
                      config:
                        skip: false
                        mapping_id: 24
                        wrap_array: false
                        wrap_output: false
                      parent_id: 208
                      parent_flow_step: null
                      notification_group: null
                      order: 1
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowVersionsStoreParentsRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  name: string
                  microservice: string
                  config: {}
              example-2:
                summary: Create map parent step
                value:
                  name: Map
                  microservice: map
                  config:
                    skip: false
                    mapping_id: 24
                    wrap_array: false
                    wrap_output: false
      tags:
      - Flow Version Steps
  /api/v1/flow-versions/{flow_version}/variables:
    post:
      summary: Create Flow Version Variable
      description: Creates a new variable for a flow version. Requires a `type` and `key`, and optionally accepts a `value`, `date_format`, and `secret` flag.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: &id011
                      id: 0
                      flow_version_id: 0
                      type: string
                      key: string
                      value: string
                      date_format: null
                      secret: false
                      created_at: '2024-01-01T00:00:00.000000Z'
                      updated_at: '2024-01-01T00:00:00.000000Z'
                example-2:
                  summary: Created variable
                  value:
                    data:
                      id: 7
                      flow_version_id: 6
                      type: String
                      key: api_base_url
                      value: https://api.acmeltd.com/v2
                      date_format: null
                      secret: false
                      created_at: '2026-03-05T10:41:18.000000Z'
                      updated_at: '2026-03-05T10:41:18.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      type:
                      - The type field is required.
                      key:
                      - The key field is required.
                      date_format:
                      - The date format must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowVersionsStoreVariablesRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  type: string
                  key: string
                  value: string
                  date_format: null
                  secret: false
              example-2:
                summary: Create string variable
                value:
                  type: String
                  key: api_base_url
                  value: https://api.acmeltd.com/v2
                  date_format: null
                  secret: false
      tags:
      - Flow Version Variables
  /api/v1/flow-versions/{flow_version}/variables/{variable}:
    put:
      summary: Update Flow Version Variable
      description: Updates an existing flow version variable. Accepts `type`, `key`, `value`, `date_format`, and `secret` flag.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: variable
        in: path
        required: true
        schema:
          type: string
        description: The variable identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id011
                example-2:
                  summary: Updated variable
                  value:
                    data:
                      id: 7
                      flow_version_id: 6
                      type: String
                      key: api_base_url
                      value: https://api.acmeltd.com/v3
                      date_format: null
                      secret: false
                      created_at: '2026-03-05T10:41:18.000000Z'
                      updated_at: '2026-03-05T10:41:18.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      type:
                      - The type field is required.
                      key:
                      - The key field is required.
                      date_format:
                      - The date format must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowVersionsUpdateVariablesRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  type: string
                  key: string
                  value: string
                  date_format: null
                  secret: false
              example-2:
                summary: Update variable value
                value:
                  type: String
                  key: api_base_url
                  value: https://api.acmeltd.com/v3
                  date_format: null
                  secret: false
      tags:
      - Flow Version Variables
    delete:
      summary: Delete Flow Version Variable
      description: Permanently deletes a specific flow version variable.
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: variable
        in: path
        required: true
        schema:
          type: string
        description: The variable identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Successful deletion
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Version Variables
  /api/v1/flow-versions/{flow_version}/graph:
    get:
      summary: Get Graph
      description: Retrieves the graph for a given flow version.
      tags:
      - Canvas Steps
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/flow-versions/{flow_version}/graph/connections:
    post:
      summary: Create Connections
      description: Creates connections between steps on the canvas for a specific flow version.
      tags:
      - Canvas Step Connections
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/flow-versions/{flow_version}/graph/steps:
    post:
      summary: Create Flow Version Graph Step
      description: Creates a new step on the canvas for a specific flow version.
      tags:
      - Canvas Steps
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
    delete:
      summary: Delete Flow Version Graph Steps
      description: Permanently deletes all steps from the canvas for a specific flow version.
      tags:
      - Canvas Steps
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/flow-versions/{flow_version}/graph/positions:
    patch:
      summary: Update Positions
      description: Updates the canvas positions of steps for a specific flow version.
      tags:
      - Canvas Positions
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/flow-versions/{flow_version}/graph/steps/{step}:
    get:
      summary: Get Flow Version Graph Step
      description: Retrieves the details of a specific canvas step for a specific flow version.
      tags:
      - Canvas Steps
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: step
        in: path
        required: true
        schema:
          type: string
        description: The step identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
    delete:
      summary: Delete Flow Version Graph Step
      description: Permanently deletes a specific canvas step for a specific flow version.
      tags:
      - Canvas Steps
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: step
        in: path
        required: true
        schema:
          type: string
        description: The step identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/flow-versions/{flow_version}/graph/paste-steps:
    post:
      summary: Paste Steps
      description: Pastes copied steps onto the canvas for a specific flow version.
      tags:
      - Canvas Steps
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/flow-versions/{flow_version}/graph/steps/{step}/connection:
    delete:
      summary: Delete Flow Version Graph Step Connection
      description: Permanently deletes the connection for a specific canvas step.
      tags:
      - Canvas Step Connections
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: step
        in: path
        required: true
        schema:
          type: string
        description: The step identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/flow-versions/{flow_version}/notes:
    get:
      summary: List Flow Version Notes
      description: Retrieves a list of notes on the canvas for a specific flow version.
      tags:
      - Canvas Notes
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
    post:
      summary: Create Flow Version Note
      description: Creates a new note on the canvas for a specific flow version.
      tags:
      - Canvas Notes
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/flow-versions/{flow_version}/notes/positions:
    patch:
      summary: Update Positions
      description: Updates the canvas positions of notes for a specific flow version.
      tags:
      - Canvas Positions
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/flow-versions/{flow_version}/notes/{note}:
    get:
      summary: Get Flow Version Note
      description: Retrieves the details of a specific canvas note for a specific flow version.
      tags:
      - Canvas Notes
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: note
        in: path
        required: true
        schema:
          type: string
        description: The note identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
    put:
      summary: Update Flow Version Note
      description: Updates an existing canvas note for a specific flow version.
      tags:
      - Canvas Notes
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: note
        in: path
        required: true
        schema:
          type: string
        description: The note identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
    delete:
      summary: Delete Flow Version Note
      description: Permanently deletes a specific canvas note for a specific flow version.
      tags:
      - Canvas Notes
      parameters:
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      - name: note
        in: path
        required: true
        schema:
          type: string
        description: The note identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/flows:
    get:
      summary: List Flows
      description: 'List all process flows associated with your company profile.


        ## Pagination


        Pagination is available for this request. Please see the section on using pagination for more details.


        ## Available Includes


        These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.


        - latestVersion

        - latestVersion_count

        - latestVersionExists

        - latestVersion.variables

        - deployedVersion

        - deployedVersion_count

        - deployedVersionExists

        - deployedVersion.variables

        - currentVersion

        - currentVersion_count

        - currentVersionExists

        - currentVersion.latestRun

        - currentVersion.steps

        - currentVersion.steps.connector

        - currentVersion.steps.connector.authenticationImplementation

        - currentVersion.steps.connector.authenticationImplementation.system

        - currentVersion.steps.variables

        - currentVersion.steps.cache

        - currentVersion.steps.dataPool

        - currentVersion.steps.scriptVersion

        - currentVersion.steps.scriptVersion.script

        - currentVersion.schedules

        - currentVersion.variables

        - versions

        - versions_count

        - versionsExists

        - versions.schedules

        - versions.variables

        - versions.deployedByUser

        - labels

        - labels_count

        - labelsExists

        - webhooks

        - webhooks_count

        - webhooksExists

        - callbacks

        - callbacks_count

        - callbacksExists

        - notificationGroups

        - notificationGroups_count

        - notificationGroupsExists

        - messageBrokers

        - messageBrokers_count

        - messageBrokersExists

        - messageBrokerQueues

        - messageBrokerQueues_count

        - messageBrokerQueuesExists

        - deployments

        - deployments_count

        - deploymentsExists

        - deployments.virtualEnvironment

        - deployments.flowVersion

        - deployments.package

        - deployments.enabledBy



        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - name

        - marketplace_app_id

        - labelled

        - enabled

        - deployed



        ## Available Fields


        These are the fields that can be requested to limit the data returned. Please see the section on using fields for more details.


        - flows.id

        - flows.name

        - flows.enabled_at



        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - name

        - enabled_at

        - created_at

        - id'
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[marketplace_app_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by marketplace_app_id.
      - name: filter[blueprint_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by blueprint_id.
      - name: filter[blueprint_version_number]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by blueprint_version_number.
      - name: filter[labelled]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results by label `id`.'
      - name: filter[enabled]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by enabled.
      - name: filter[deployed]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by deployed.
      - name: filter[versions.id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by versions.id.
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: filter[versions]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by versions.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: latestVersion, latestVersion.variables, deployedVersion, deployedVersion.variables, latestDeployedVersion, latestDeployedVersion.variables, latestDeployedVersion.steps.connector.authenticationImplementation.system, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion.script, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion.script, latestDeployedVersion.steps.scriptVersion.script, latestDeployedVersion.steps.cache, latestDeployedVersion.steps.dataPool, deployedVersion.steps.connector.authenticationImplementation.system, deployedVersion.steps.connector.authenticationImplementation.system.endpoints, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion.script'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, enabled_at, created_at, id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      name: string
                      description: string
                      is_enabled: false
                      enabled_at: null
                      layout_direction: TB
                      use_queued_time: false
                      remove_failed_payloads: false
                      priority: 0
                      prod_flag: false
                      labels: []
                      notification_group_ids: []
                      webhooks: []
                      callbacks: []
                      message_brokers: []
                      message_broker_queues: []
                      created_at: '2024-01-01T00:00:00.000000Z'
                      updated_at: '2024-01-01T00:00:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://core.wearepatchworks.com/api/v1/flows
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://core.wearepatchworks.com/api/v1/flows?page=1
                      last: https://core.wearepatchworks.com/api/v1/flows?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Two flows
                  value:
                    data:
                    - id: 1
                      name: Sync Customer Data (Sandbox)
                      description: Sync customers
                      layout_direction: TB
                      is_enabled: true
                      enabled_at: null
                      created_at: '2026-03-05T09:49:52.000000Z'
                      use_queued_time: true
                      remove_failed_payloads: false
                      priority: 3
                      prod_flag: false
                      marketplace_app_id: null
                      blueprint_id: null
                      blueprint_version_number: null
                    - id: 2
                      name: Sync Customer Data (France)
                      description: Sync customers
                      layout_direction: TB
                      is_enabled: true
                      enabled_at: null
                      created_at: '2026-03-05T09:50:00.000000Z'
                      use_queued_time: true
                      remove_failed_payloads: false
                      priority: 3
                      prod_flag: false
                      marketplace_app_id: null
                      blueprint_id: null
                      blueprint_version_number: null
                    links:
                      first: http://core.wearepatchworks.com/api/v1/flows?page=1
                      last: http://core.wearepatchworks.com/api/v1/flows?page=1
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      links:
                      - url: null
                        label: '&laquo; Previous'
                        active: false
                      - url: http://core.wearepatchworks.com/api/v1/flows?page=1
                        label: '1'
                        active: true
                      - url: null
                        label: Next &raquo;
                        active: false
                      path: http://core.wearepatchworks.com/api/v1/flows
                      per_page: 15
                      to: 2
                      total: 2
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flows
    post:
      summary: Create Flow
      description: 'Create a new process flow.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | flow.name | string | &#x2611; |

        | flow.description | string | |

        | flow.prod_flag | | &#x2611; |'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsResponse'
              examples:
                example-1:
                  summary: Examples
                  value: &id012
                    data:
                      id: 0
                      name: string
                      description: string
                      is_enabled: false
                      enabled_at: null
                      layout_direction: TB
                      use_queued_time: false
                      remove_failed_payloads: false
                      priority: 0
                      prod_flag: false
                      labels: []
                      notification_group_ids: []
                      webhooks: []
                      callbacks: []
                      message_brokers: []
                      message_broker_queues: []
                      created_at: '2024-01-01T00:00:00.000000Z'
                      updated_at: '2024-01-01T00:00:00.000000Z'
                example-2:
                  summary: Newly created flow
                  value:
                    data:
                      id: 1
                      name: Shopify to Brightpearl - Sales Orders
                      description: Syncs sales orders from Shopify to Brightpearl.
                      is_enabled: false
                      enabled_at: null
                      layout_direction: TB
                      use_queued_time: true
                      remove_failed_payloads: false
                      priority: 2
                      prod_flag: false
                      labels: []
                      notification_group_ids: &id013 []
                      webhooks: &id014 []
                      callbacks: &id015 []
                      message_brokers: &id016 []
                      message_broker_queues: &id017 []
                      created_at: '2024-01-10T08:30:00.000000Z'
                      updated_at: '2024-01-10T08:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      flow.name:
                      - The flow name field is required.
                      flow.description:
                      - The flow description must be a string.
                      flow.prod_flag:
                      - The flow prod flag field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowsStoreRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  flow:
                    name: string
                    description: string
                    prod_flag: false
              example-2:
                summary: Create staging flow
                value:
                  flow:
                    name: Shopify to Brightpearl - Sales Orders
                    description: Syncs sales orders from Shopify to Brightpearl.
                    prod_flag: false
      tags:
      - Flows
      parameters: []
  /api/v1/flows/{flow}:
    get:
      summary: Get Flow
      description: 'Retrieves details for a single process flow by the flow `id`.


        ## Available Includes


        These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.


        - latestVersion

        - latestVersion_count

        - latestVersionExists

        - latestVersion.variables

        - deployedVersion

        - deployedVersion_count

        - deployedVersionExists

        - deployedVersion.variables

        - currentVersion

        - currentVersion_count

        - currentVersionExists

        - currentVersion.latestRun

        - currentVersion.steps

        - currentVersion.steps.connector

        - currentVersion.steps.connector.authenticationImplementation

        - currentVersion.steps.connector.authenticationImplementation.system

        - currentVersion.steps.variables

        - currentVersion.steps.cache

        - currentVersion.steps.dataPool

        - currentVersion.steps.scriptVersion

        - currentVersion.steps.scriptVersion.script

        - currentVersion.schedules

        - currentVersion.variables

        - versions

        - versions_count

        - versionsExists

        - versions.schedules

        - versions.variables

        - versions.deployedByUser

        - labels

        - labels_count

        - labelsExists

        - webhooks

        - webhooks_count

        - webhooksExists

        - callbacks

        - callbacks_count

        - callbacksExists

        - notificationGroups

        - notificationGroups_count

        - notificationGroupsExists

        - messageBrokers

        - messageBrokers_count

        - messageBrokersExists

        - messageBrokerQueues

        - messageBrokerQueues_count

        - messageBrokerQueuesExists

        - deployments

        - deployments_count

        - deploymentsExists

        - deployments.virtualEnvironment

        - deployments.flowVersion

        - deployments.package

        - deployments.enabledBy



        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - name

        - marketplace_app_id

        - labelled

        - enabled

        - deployed



        ## Available Fields


        These are the fields that can be requested to limit the data returned. Please see the section on using fields for more details.


        - flows.id

        - flows.name

        - flows.enabled_at



        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - name

        - enabled_at

        - created_at

        - id'
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[marketplace_app_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by marketplace_app_id.
      - name: filter[blueprint_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by blueprint_id.
      - name: filter[blueprint_version_number]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by blueprint_version_number.
      - name: filter[labelled]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results by label `id`.'
      - name: filter[enabled]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by enabled.
      - name: filter[deployed]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by deployed.
      - name: filter[versions.id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by versions.id.
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: filter[versions]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by versions.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: latestVersion, latestVersion.variables, deployedVersion, deployedVersion.variables, latestDeployedVersion, latestDeployedVersion.variables, latestDeployedVersion.steps.connector.authenticationImplementation.system, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion.script, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion.script, latestDeployedVersion.steps.scriptVersion.script, latestDeployedVersion.steps.cache, latestDeployedVersion.steps.dataPool, deployedVersion.steps.connector.authenticationImplementation.system, deployedVersion.steps.connector.authenticationImplementation.system.endpoints, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion.script'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, enabled_at, created_at, id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsResponse'
              examples:
                example-1:
                  summary: Examples
                  value: *id012
                example-2:
                  summary: Flow with label
                  value:
                    data:
                      id: 1
                      name: Sync Customer Data (Sandbox)
                      description: Sync customers
                      layout_direction: TB
                      is_enabled: true
                      enabled_at: null
                      created_at: '2026-03-05T09:49:52.000000Z'
                      use_queued_time: true
                      remove_failed_payloads: false
                      priority: 3
                      prod_flag: false
                      marketplace_app_id: null
                      blueprint_id: null
                      blueprint_version_number: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flows
    put:
      summary: Update Flow
      description: 'Updates an existing process flow.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | flow.name | string | |

        | flow.description | string | |

        | flow.enabled_at | | |

        | labels | | |

        | labels.*.id | | &#x2611; |

        | notification_groups | | |

        | flow.use_queued_time | | |

        | flow.remove_failed_payloads | | |

        | flow.priority | integer | |

        | flow.prod_flag | | |'
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsResponse'
              examples:
                example-1:
                  summary: Examples
                  value: *id012
                example-2:
                  summary: Updated flow
                  value:
                    data:
                      id: 1
                      name: Shopify to Brightpearl - Sales Orders (Updated)
                      description: Syncs sales orders from Shopify to Brightpearl.
                      is_enabled: true
                      enabled_at: '2024-06-01T09:00:00.000000Z'
                      layout_direction: TB
                      use_queued_time: true
                      remove_failed_payloads: false
                      priority: 2
                      prod_flag: true
                      labels: []
                      notification_group_ids: *id013
                      webhooks: *id014
                      callbacks: *id015
                      message_brokers: *id016
                      message_broker_queues: *id017
                      created_at: '2024-01-10T08:30:00.000000Z'
                      updated_at: '2024-06-01T09:00:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      flow.name:
                      - The flow name must be a string.
                      flow.description:
                      - The flow description must be a string.
                      labels.*.id:
                      - The labels * id field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowsUpdateRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  flow:
                    name: string
                    description: string
                    enabled_at: null
                    use_queued_time: false
                    remove_failed_payloads: false
                    priority: 0
                    prod_flag: false
                  labels: []
                  notification_groups: []
              example-2:
                summary: Update name and priority
                value:
                  flow:
                    name: Shopify to Brightpearl - Sales Orders (Updated)
                    description: Syncs sales orders from Shopify to Brightpearl.
                    enabled_at: '2024-06-01T09:00:00.000000Z'
                    use_queued_time: true
                    remove_failed_payloads: false
                    priority: 2
                    prod_flag: true
                  labels: []
                  notification_groups: []
      tags:
      - Flows
    delete:
      summary: Delete Flow
      description: Deletes a given process flow.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Successful deletion
                  value:
                    message: Flow deleted successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flows
  /api/v1/flows/export:
    post:
      summary: Export Flow
      description: 'Export process flow as a JSON file.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | flow_id | integer | &#x2611; |'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value: &id018
                    metadata:
                      company_name: string
                      flow_name: string
                      exported_at: '2024-01-01T00:00:00+00:00'
                      exported_by: string
                      flow_id: 0
                      flow_version: 0
                      import_summary:
                        setup_required:
                          connectors_needing_config: 0
                          auth_implementations_needing_credentials: 0
                          variables_needing_values: 0
                        dependencies: []
                        imported_resources: []
                        next_steps: []
                    flow:
                      id: 0
                      name: string
                      description: string
                      is_enabled: false
                      enabled_at: null
                      layout_direction: string
                      use_queued_time: false
                      remove_failed_payloads: false
                      priority: 0
                      prod_flag: false
                      labels: []
                      webhooks: []
                      callbacks: []
                      versions: []
                    systems: []
                    scripts: []
                    dependencies: []
                example-2:
                  summary: Exported flow
                  value: &id019
                    metadata:
                      company_name: Acme Ltd
                      flow_name: Shopify to Brightpearl - Sales Orders
                      exported_at: '2026-03-08T11:24:59+00:00'
                      exported_by: user@acmeltd.com
                      flow_id: 1
                      flow_version: 3
                      import_summary:
                        setup_required:
                          connectors_needing_config: 2
                          auth_implementations_needing_credentials: 1
                          variables_needing_values: 1
                        dependencies: []
                        imported_resources: []
                        next_steps: []
                    flow:
                      id: 1
                      name: Shopify to Brightpearl - Sales Orders
                      description: Syncs sales orders from Shopify to Brightpearl.
                      is_enabled: false
                      enabled_at: null
                      layout_direction: TB
                      use_queued_time: true
                      remove_failed_payloads: false
                      priority: 2
                      prod_flag: false
                      labels: []
                      webhooks: []
                      callbacks: []
                      versions: []
                    systems: []
                    scripts: []
                    dependencies: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowsExportExportRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  flow_id: 0
              example-2:
                summary: Export flow
                value:
                  flow_id: 1
      tags:
      - Flows
      parameters: []
  /api/v1/flows/import:
    post:
      summary: Import Flow
      description: 'Import a previously exported process flow (from a JSON file).


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | flow | | &#x2611; |

        | metadata | | &#x2611; |

        | as_marketplace | | |'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value: *id018
                example-2:
                  summary: Imported flow
                  value: *id019
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowsImportImportRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  flow: string
                  metadata: string
                  as_marketplace: null
              example-2:
                summary: Import flow
                value:
                  flow: '{"id":1,"name":"Shopify to Brightpearl - Sales Orders","description":"Syncs sales orders from Shopify to Brightpearl."}'
                  metadata: '{"company_name":"Acme Ltd","flow_name":"Shopify to Brightpearl - Sales Orders","exported_at":"2026-03-08T11:24:59+00:00","flow_id":1,"flow_version":3}'
                  as_marketplace: null
      tags:
      - Flows
      parameters: []
  /api/v1/flows/{flow_id}/manual/{version_id}:
    post:
      summary: Initialise Flow Manually
      description: 'Initialise a process flow manually - the equivalent of using the `initialise flow` button on the canvas. The flow starts immediately (it is not added to a queue).

        You can make up to 10 requests to this endpoint per minute. If you are implementing an automated, programmtic integration with Patchworks with greater request volumes, consider using the [Start Flow](https://doc.wearepatchworks.com/product-documentation/api-reference/process-flows/flows#post-api-v1-flows-flow_id-start-version_id) endpoint instead.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | flow_id | integer | &#x2611; |

        | version_id | integer | |

        | payload | string | &#x2611; |

        | flow_variables | | |

        | virtual_environment_id | integer | |'
      parameters:
      - name: flow_id
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier of the flow.
      - name: version_id
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier of the version.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                    data:
                      flow_run_id: string
                example-2:
                  summary: Flow initialised
                  value:
                    message: Flow initialised.
                    data:
                      flow_run_id: 01hvh37yjs9kt7dd1t27azryvb
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowsManualManualRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  flow_id: 0
                  version_id: 0
                  payload: string
                  flow_variables: null
                  virtual_environment_id: null
              example-2:
                summary: Initialise with payload
                value:
                  flow_id: 1
                  version_id: 5
                  payload: '{"order_id": 1001, "status": "new"}'
                  flow_variables: null
                  virtual_environment_id: null
      tags:
      - Flows
      servers:
      - url: https://start.wearepatchworks.com
  /api/v1/flows/{flow_id}/start/{version_id}:
    post:
      summary: Start Flow
      description: 'Intended for programmatic, system-to-system integrations, where flows are scheduled via the API. In this case, flow runs are added to a queue and picked up when concurrency is available.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | flow_id | integer | &#x2611; |

        | version_id | integer | |

        | payload | string | &#x2611; |

        | flow_variables | | |

        | virtual_environment_id | integer | |'
      parameters:
      - name: flow_id
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier of the flow.
      - name: version_id
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier of the version.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                    data:
                      scheduled_flow_id: string
                example-2:
                  summary: Flow scheduled
                  value:
                    message: Flow scheduled.
                    data:
                      scheduled_flow_id: 01hvh0ztea5zzjqqfd0a8a5h8y
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowsStartStartRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  flow_id: 0
                  version_id: 0
                  payload: string
                  flow_variables: null
                  virtual_environment_id: null
              example-2:
                summary: Start with payload
                value:
                  flow_id: 1
                  version_id: 5
                  payload: '{"order_id": 1001, "status": "new"}'
                  flow_variables: null
                  virtual_environment_id: null
      tags:
      - Flows
      servers:
      - url: https://start.wearepatchworks.com
  /api/v1/flows/{flow}/callbacks:
    get:
      summary: List Flow Callbacks
      description: Retrieves a paginated list of callbacks for a specific flow.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      name: My Example
                      enabled_at: '2025-01-15T10:30:00.000000Z'
                      status: Draft
                      format: csv
                      body: example_body
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      labels: example_labels
                      notification_groups: example_notification_groups
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      description: A description of the resource
                      layout_direction: example_layout_direction
                      is_enabled: {}
                      latest_version: {}
                      current_version: {}
                      deployed_version: {}
                      latest_deployed_version: []
                      versions: []
                      version_type_counts: []
                      message_brokers: []
                      message_broker_queues: []
                      notification_group_ids: []
                      webhooks: example_webhooks
                      callbacks: example_callbacks
                      current_version_step_count: 5
                      current_version_connector_count: 5
                      current_version_script_count: 5
                      current_version_cache_count: 5
                      current_version_data_pool_count: 5
                      current_version_cross_ref_count: 5
                      use_queued_time: example_use_queued_time
                      remove_failed_payloads: []
                      priority: 1
                      prod_flag: []
                      deployments: []
                      webhooks_count: 5
                      callbacks_count: 5
                      marketplace_app_id: 1
                      blueprint_id: 1
                      blueprint_version_number: example_blueprint_version_number
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/flows/{flow}/callbacks
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/flows/{flow}/callbacks?page=1
                      last: https://api.example.com/api/v1/flows/{flow}/callbacks?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Callbacks
    post:
      summary: Create Flow Callback
      description: 'Creates a new callback trigger for a specific flow.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | status | | |

        | format | | |'
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      name: My Example
                      enabled_at: '2025-01-15T10:30:00.000000Z'
                      status: Draft
                      format: csv
                      body: example_body
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      labels: example_labels
                      notification_groups: example_notification_groups
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      description: A description of the resource
                      layout_direction: example_layout_direction
                      is_enabled: {}
                      latest_version: {}
                      current_version: {}
                      deployed_version: {}
                      latest_deployed_version: []
                      versions: []
                      version_type_counts: []
                      message_brokers: []
                      message_broker_queues: []
                      notification_group_ids: []
                      webhooks: example_webhooks
                      callbacks: example_callbacks
                      current_version_step_count: 5
                      current_version_connector_count: 5
                      current_version_script_count: 5
                      current_version_cache_count: 5
                      current_version_data_pool_count: 5
                      current_version_cross_ref_count: 5
                      use_queued_time: example_use_queued_time
                      remove_failed_payloads: []
                      priority: 1
                      prod_flag: []
                      deployments: []
                      webhooks_count: 5
                      callbacks_count: 5
                      marketplace_app_id: 1
                      blueprint_id: 1
                      blueprint_version_number: example_blueprint_version_number
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowsStoreCallbacksRequest'
      tags:
      - Flow Callbacks
  /api/v1/flows/{flow}/callbacks/{callback}:
    put:
      summary: Update Flow Callback
      description: 'Updates an existing callback for a specific flow.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | status | | |

        | format | | |'
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      - name: callback
        in: path
        required: true
        schema:
          type: string
        description: The callback identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      name: My Example
                      enabled_at: '2025-01-15T10:30:00.000000Z'
                      status: Draft
                      format: csv
                      body: example_body
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      labels: example_labels
                      notification_groups: example_notification_groups
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      description: A description of the resource
                      layout_direction: example_layout_direction
                      is_enabled: {}
                      latest_version: {}
                      current_version: {}
                      deployed_version: {}
                      latest_deployed_version: []
                      versions: []
                      version_type_counts: []
                      message_brokers: []
                      message_broker_queues: []
                      notification_group_ids: []
                      webhooks: example_webhooks
                      callbacks: example_callbacks
                      current_version_step_count: 5
                      current_version_connector_count: 5
                      current_version_script_count: 5
                      current_version_cache_count: 5
                      current_version_data_pool_count: 5
                      current_version_cross_ref_count: 5
                      use_queued_time: example_use_queued_time
                      remove_failed_payloads: []
                      priority: 1
                      prod_flag: []
                      deployments: []
                      webhooks_count: 5
                      callbacks_count: 5
                      marketplace_app_id: 1
                      blueprint_id: 1
                      blueprint_version_number: example_blueprint_version_number
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowsUpdateCallbacksRequest'
      tags:
      - Flow Callbacks
    delete:
      summary: Delete Flow Callback
      description: Permanently deletes a specific callback for a specific flow.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      - name: callback
        in: path
        required: true
        schema:
          type: string
        description: The callback identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Callbacks
  /api/v1/flows/{flow}/duplicate:
    post:
      summary: Duplicate Flow
      description: 'Duplicates - i.e. clones - an existing process flow.

        This is the API equivalent of what happens when you use the [duplicate option in the dashboard](https://doc.wearepatchworks.com/product-documentation/process-flows/managing-process-flows/duplicating-a-process-flow).

        The result is a new process flow in the same company, with the same name appended with an incremental number.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | flow_version_id | | &#x2611; |'
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value: *id012
                example-2:
                  summary: Duplicated flow
                  value:
                    data:
                      id: 2
                      name: Shopify to Brightpearl - Sales Orders (1)
                      description: Syncs sales orders from Shopify to Brightpearl.
                      is_enabled: false
                      enabled_at: null
                      created_at: '2024-06-01T10:00:00.000000Z'
                      updated_at: '2024-06-01T10:00:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowsDuplicateDuplicateRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  flow_version_id: '0'
              example-2:
                summary: Duplicate version
                value:
                  flow_version_id: '83'
      tags:
      - Flows
  /api/v1/flows/{flow}/layout-direction:
    patch:
      summary: Update Flow Layout Direction
      description: Toggles the canvas layout direction for a specific flow. If the flow is currently set to vertical then it switches to horizontal, and vice versa.
      tags:
      - Flows
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/flows/{flow}/webhooks:
    get:
      summary: List Flow Webhooks
      description: Retrieves a paginated list of webhooks for a specific flow.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      name: My Example
                      enabled_at: '2025-01-15T10:30:00.000000Z'
                      status: Draft
                      format: csv
                      body: example_body
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      labels: example_labels
                      notification_groups: example_notification_groups
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      description: A description of the resource
                      layout_direction: example_layout_direction
                      is_enabled: {}
                      latest_version: {}
                      current_version: {}
                      deployed_version: {}
                      latest_deployed_version: []
                      versions: []
                      version_type_counts: []
                      message_brokers: []
                      message_broker_queues: []
                      notification_group_ids: []
                      webhooks: example_webhooks
                      callbacks: example_callbacks
                      current_version_step_count: 5
                      current_version_connector_count: 5
                      current_version_script_count: 5
                      current_version_cache_count: 5
                      current_version_data_pool_count: 5
                      current_version_cross_ref_count: 5
                      use_queued_time: example_use_queued_time
                      remove_failed_payloads: []
                      priority: 1
                      prod_flag: []
                      deployments: []
                      webhooks_count: 5
                      callbacks_count: 5
                      marketplace_app_id: 1
                      blueprint_id: 1
                      blueprint_version_number: example_blueprint_version_number
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/flows/{flow}/webhooks
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/flows/{flow}/webhooks?page=1
                      last: https://api.example.com/api/v1/flows/{flow}/webhooks?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Webhooks
    post:
      summary: Create Flow Webhook
      description: 'Creates a new webhook trigger for a specific flow.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | status | | |

        | body | string | |

        | format | | |'
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      name: My Example
                      enabled_at: '2025-01-15T10:30:00.000000Z'
                      status: Draft
                      format: csv
                      body: example_body
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      labels: example_labels
                      notification_groups: example_notification_groups
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      description: A description of the resource
                      layout_direction: example_layout_direction
                      is_enabled: {}
                      latest_version: {}
                      current_version: {}
                      deployed_version: {}
                      latest_deployed_version: []
                      versions: []
                      version_type_counts: []
                      message_brokers: []
                      message_broker_queues: []
                      notification_group_ids: []
                      webhooks: example_webhooks
                      callbacks: example_callbacks
                      current_version_step_count: 5
                      current_version_connector_count: 5
                      current_version_script_count: 5
                      current_version_cache_count: 5
                      current_version_data_pool_count: 5
                      current_version_cross_ref_count: 5
                      use_queued_time: example_use_queued_time
                      remove_failed_payloads: []
                      priority: 1
                      prod_flag: []
                      deployments: []
                      webhooks_count: 5
                      callbacks_count: 5
                      marketplace_app_id: 1
                      blueprint_id: 1
                      blueprint_version_number: example_blueprint_version_number
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      body:
                      - The body must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowsStoreWebhooksRequest'
      tags:
      - Flow Webhooks
  /api/v1/flows/{flow}/webhooks/{webhook}:
    put:
      summary: Update Flow Webhook
      description: 'Updates an existing webhook for a specific flow.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | status | | |

        | body | string | |

        | format | | |'
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      - name: webhook
        in: path
        required: true
        schema:
          type: string
        description: The webhook identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      name: My Example
                      enabled_at: '2025-01-15T10:30:00.000000Z'
                      status: Draft
                      format: csv
                      body: example_body
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      labels: example_labels
                      notification_groups: example_notification_groups
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      description: A description of the resource
                      layout_direction: example_layout_direction
                      is_enabled: {}
                      latest_version: {}
                      current_version: {}
                      deployed_version: {}
                      latest_deployed_version: []
                      versions: []
                      version_type_counts: []
                      message_brokers: []
                      message_broker_queues: []
                      notification_group_ids: []
                      webhooks: example_webhooks
                      callbacks: example_callbacks
                      current_version_step_count: 5
                      current_version_connector_count: 5
                      current_version_script_count: 5
                      current_version_cache_count: 5
                      current_version_data_pool_count: 5
                      current_version_cross_ref_count: 5
                      use_queued_time: example_use_queued_time
                      remove_failed_payloads: []
                      priority: 1
                      prod_flag: []
                      deployments: []
                      webhooks_count: 5
                      callbacks_count: 5
                      marketplace_app_id: 1
                      blueprint_id: 1
                      blueprint_version_number: example_blueprint_version_number
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      body:
                      - The body must be a string.
                      hmac_secret_key:
                      - The hmac secret key must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowsUpdateWebhooksRequest'
      tags:
      - Flow Webhooks
    delete:
      summary: Delete Flow Webhook
      description: Permanently deletes a specific webhook for a specific flow.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      - name: webhook
        in: path
        required: true
        schema:
          type: string
        description: The webhook identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Webhooks
  /api/v1/labels:
    get:
      summary: List Labels
      description: Retrieves a paginated list of labels. Can be filtered by `name`.
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: name, colour'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      colour: blue
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/labels
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/labels?page=1
                      last: https://api.example.com/api/v1/labels?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Labels
    post:
      summary: Create Label
      description: Creates a new label.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      colour: blue
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      colour:
                      - The colour field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LabelsStoreRequest'
      tags:
      - Labels
      parameters: []
  /api/v1/labels/{label}:
    get:
      summary: Get Label
      description: Retrieves the details of a specific label.
      parameters:
      - name: label
        in: path
        required: true
        schema:
          type: string
        description: The label identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: name, colour'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      colour: blue
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Labels
    put:
      summary: Update Label
      description: Updates an existing label.
      parameters:
      - name: label
        in: path
        required: true
        schema:
          type: string
        description: The label identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      colour: blue
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LabelsUpdateRequest'
      tags:
      - Labels
    delete:
      summary: Delete Label
      description: Permanently deletes a specific label.
      parameters:
      - name: label
        in: path
        required: true
        schema:
          type: string
        description: The label identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Labels
  /api/v1/mapping:
    post:
      summary: Create Mapping
      description: Creates a new mapping for a specific flow step.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      flow_version_id: 1
                      flow_step_id: 1
                      mapping: example_mapping
                      mapping_file: example_mapping_file
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MappingStoreRequest'
      tags:
      - Mapping
      parameters: []
  /api/v1/mapping/generate/{sourceEndpoint}/{destinationEndpoint}:
    get:
      summary: Generate Mapping
      description: Auto-generates a mapping between a specific source endpoint and a specific destination endpoint using field tag matching.
      parameters:
      - name: sourceEndpoint
        in: path
        required: true
        schema:
          type: string
        description: The sourceEndpoint identifier.
      - name: destinationEndpoint
        in: path
        required: true
        schema:
          type: string
        description: The destinationEndpoint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Mapping
  /api/v1/mapping/{mapping}:
    get:
      summary: Get Mapping
      description: Retrieves the details of a specific mapping.
      parameters:
      - name: mapping
        in: path
        required: true
        schema:
          type: string
        description: The mapping identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      flow_version_id: 1
                      flow_step_id: 1
                      mapping: example_mapping
                      mapping_file: example_mapping_file
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Mapping
  /api/v1/mapping/{mapping}/export:
    get:
      summary: Export Mapping
      description: Exports the configuration of a specific mapping as a JSON file.
      parameters:
      - name: mapping
        in: path
        required: true
        schema:
          type: string
        description: The mapping identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Mapping
  /api/v1/patchworks/marketplace-apps:
    get:
      summary: List Marketplace Apps
      description: 'Retrieves a paginated list of marketplace app versions.

        Note: A marketplace app is a version of a blueprint.'
      parameters:
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[allowed]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by allowed.
      - name: filter[private]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by private.
      - name: filter[visibility]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visibility.
      - name: filter[private_or_allowed]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by private_or_allowed.
      - name: filter[labelled]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results by label `id`.'
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flowTemplates, crossReferenceLookupTemplates, crossReferenceLookupTemplates.crossReferenceLookupValueTemplates, systemTemplates, systemTemplates.logo, scriptTemplates, cacheTemplates, dataPoolTemplates, company, marketplaceCompany, publicCompany, installs'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, id, created_at, installs_avg_install_duration'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketplaceAppsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      help_guide: example_help_guide
                      flow_version_ids: example_flow_version_ids
                      cross_reference_lookup_ids: example_cross_reference_lookup_ids
                      system_ids: example_system_ids
                      script_version_ids: example_script_version_ids
                      cache_ids: example_cache_ids
                      data_pool_ids: example_data_pool_ids
                      private: example_private
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/patchworks/marketplace-apps
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/patchworks/marketplace-apps?page=1
                      last: https://api.example.com/api/v1/patchworks/marketplace-apps?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Marketplace Apps
  /api/v1/marketplace-apps:
    post:
      summary: Create Marketplace App
      description: 'Creates a new marketplace app version.

        Note: A marketplace app is a version of a blueprint.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketplaceAppsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      help_guide: example_help_guide
                      flow_version_ids: example_flow_version_ids
                      cross_reference_lookup_ids: example_cross_reference_lookup_ids
                      system_ids: example_system_ids
                      script_version_ids: example_script_version_ids
                      cache_ids: example_cache_ids
                      data_pool_ids: example_data_pool_ids
                      private: example_private
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      labels.*.id:
                      - The labels * id field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarketplaceAppsStoreRequest'
      tags:
      - Marketplace Apps
      parameters: []
  /api/v1/patchworks/marketplace-apps/{marketplace_app}:
    get:
      summary: Get Marketplace App
      description: 'Retrieves the details of a specific marketplace app version.

        Note: A marketplace app is a version of a blueprint.'
      parameters:
      - name: marketplace_app
        in: path
        required: true
        schema:
          type: string
        description: The marketplace app identifier.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[allowed]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by allowed.
      - name: filter[private]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by private.
      - name: filter[visibility]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visibility.
      - name: filter[private_or_allowed]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by private_or_allowed.
      - name: filter[labelled]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results by label `id`.'
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flowTemplates, crossReferenceLookupTemplates, crossReferenceLookupTemplates.crossReferenceLookupValueTemplates, systemTemplates, systemTemplates.logo, scriptTemplates, cacheTemplates, dataPoolTemplates, company, marketplaceCompany, publicCompany, installs'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, id, created_at, installs_avg_install_duration'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketplaceAppsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      help_guide: example_help_guide
                      flow_version_ids: example_flow_version_ids
                      cross_reference_lookup_ids: example_cross_reference_lookup_ids
                      system_ids: example_system_ids
                      script_version_ids: example_script_version_ids
                      cache_ids: example_cache_ids
                      data_pool_ids: example_data_pool_ids
                      private: example_private
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Marketplace Apps
    delete:
      summary: Delete Marketplace App
      description: 'Permanently deletes a specific marketplace app version.

        Note: A marketplace app is a version of a blueprint.'
      parameters:
      - name: marketplace_app
        in: path
        required: true
        schema:
          type: string
        description: The marketplace app identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Marketplace Apps
  /api/v1/mcp-servers:
    get:
      summary: List MCP Servers
      description: Retrieves a paginated list of MCP servers.
      tags:
      - MCP Servers
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      parameters: []
    post:
      summary: Create MCP Server
      description: Creates a new MCP server.
      tags:
      - MCP Servers
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
      parameters: []
  /api/v1/mcp-servers/{mcp_server}:
    get:
      summary: Get MCP Server
      description: Retrieves the details of a specific MCP server.
      tags:
      - MCP Servers
      parameters:
      - name: mcp_server
        in: path
        required: true
        schema:
          type: string
        description: The mcp server identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
    put:
      summary: Update MCP Server
      description: Updates an existing MCP server.
      tags:
      - MCP Servers
      parameters:
      - name: mcp_server
        in: path
        required: true
        schema:
          type: string
        description: The mcp server identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
    delete:
      summary: Delete MCP Server
      description: Permanently deletes a specific MCP server.
      tags:
      - MCP Servers
      parameters:
      - name: mcp_server
        in: path
        required: true
        schema:
          type: string
        description: The mcp server identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/mcp-servers/{mcp_server}/delete:
    delete:
      summary: Delete MCP Server
      description: Permanently deletes a specific MCP server.
      tags:
      - MCP Servers
      parameters:
      - name: mcp_server
        in: path
        required: true
        schema:
          type: string
        description: The mcp server identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/mcp-servers/{mcp_server}/deploy:
    post:
      summary: Deploy MCP Server
      description: Deploys a specific MCP server.
      tags:
      - MCP Servers
      parameters:
      - name: mcp_server
        in: path
        required: true
        schema:
          type: string
        description: The mcp server identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/mcp-servers/{mcp_server}/undeploy:
    post:
      summary: Undeploy MCP Server
      description: Undeploys a specific MCP server.
      tags:
      - MCP Servers
      parameters:
      - name: mcp_server
        in: path
        required: true
        schema:
          type: string
        description: The mcp server identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/mcp-servers/{mcp_server}/duplicate:
    post:
      summary: Duplicate MCP Server
      description: Creates a duplicate of a specific MCP server.
      tags:
      - MCP Servers
      parameters:
      - name: mcp_server
        in: path
        required: true
        schema:
          type: string
        description: The mcp server identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/mcp-servers/{mcp_server}/execute-tool:
    post:
      summary: Execute MCP Server Tool
      description: Executes a tool on a specific MCP server.
      tags:
      - MCP Servers
      parameters:
      - name: mcp_server
        in: path
        required: true
        schema:
          type: string
        description: The mcp server identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/mcp-servers/rate-limit-status:
    get:
      summary: Get Rate Limit Status
      description: Retrieves the current rate limit status for MCP servers.
      tags:
      - MCP Servers
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      parameters: []
  /api/v1/mcp-servers/{mcp_server}/logs:
    get:
      summary: Get Logs
      description: Retrieves logs for a specific MCP server.
      tags:
      - MCP Servers
      parameters:
      - name: mcp_server
        in: path
        required: true
        schema:
          type: string
        description: The mcp server identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/mcp-servers/{mcp_server}/tools:
    get:
      summary: Get Tools
      description: Retrieves the available tools for a specific MCP server.
      tags:
      - MCP Servers
      parameters:
      - name: mcp_server
        in: path
        required: true
        schema:
          type: string
        description: The mcp server identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/media-files:
    get:
      summary: List Media Files
      description: 'Retrieves a paginated list of media files.'
      parameters:
      - name: filter[model_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_type.
      - name: filter[model_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_id.
      - name: filter[mime_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by mime_type.
      - name: filter[is_downloadable_file]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by is_downloadable_file.
      - name: filter[not_expired]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by not_expired.
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaFilesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      model_type: example_model_type
                      model_id: 1
                      file_name: example_file_name
                      mime_type: example_mime_type
                      expires_at: '2025-01-15T10:30:00.000000Z'
                      is_expired: true
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/media-files
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/media-files?page=1
                      last: https://api.example.com/api/v1/media-files?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Media Files
  /api/v1/media-files/{media_file}/download:
    get:
      summary: Download Media File
      description: 'Downloads a specific media file.'
      parameters:
      - name: media_file
        in: path
        required: true
        schema:
          type: string
        description: The media file identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Media Files
  /api/v1/message-broker-queues/{message_broker_queue}/flows:
    post:
      summary: Create Message Broker Queue Flow
      description: 'Assigns a flow to a specific message broker queue.'
      parameters:
      - name: message_broker_queue
        in: path
        required: true
        schema:
          type: string
        description: The message broker queue identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      name: My Example
                      enabled_at: '2025-01-15T10:30:00.000000Z'
                      status: Draft
                      format: csv
                      body: example_body
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      labels: example_labels
                      notification_groups: example_notification_groups
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      description: A description of the resource
                      layout_direction: example_layout_direction
                      is_enabled: {}
                      latest_version: {}
                      current_version: {}
                      deployed_version: {}
                      latest_deployed_version: []
                      versions: []
                      version_type_counts: []
                      message_brokers: []
                      message_broker_queues: []
                      notification_group_ids: []
                      webhooks: example_webhooks
                      callbacks: example_callbacks
                      current_version_step_count: 5
                      current_version_connector_count: 5
                      current_version_script_count: 5
                      current_version_cache_count: 5
                      current_version_data_pool_count: 5
                      current_version_cross_ref_count: 5
                      use_queued_time: example_use_queued_time
                      remove_failed_payloads: []
                      priority: 1
                      prod_flag: []
                      deployments: []
                      webhooks_count: 5
                      callbacks_count: 5
                      marketplace_app_id: 1
                      blueprint_id: 1
                      blueprint_version_number: example_blueprint_version_number
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      flow_id:
                      - The flow id field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageBrokerQueuesStoreFlowsRequest'
      tags:
      - Message Broker Queues
  /api/v1/message-broker-queues/{message_broker_queue}/flows/{flow}:
    delete:
      summary: Delete Message Broker Queue Flow
      description: 'Removes a flow from a specific message broker queue.'
      parameters:
      - name: message_broker_queue
        in: path
        required: true
        schema:
          type: string
        description: The message broker queue identifier.
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Message Broker Queues
  /api/v1/message-brokers:
    get:
      summary: List Message Brokers
      description: 'Retrieves a paginated list of message brokers.'
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[description]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by description.
      - name: filter[host]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by host.
      - name: filter[protocol]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by protocol.
      - name: filter[auth_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by auth_type.
      - name: filter[port]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by port.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flows, messageBrokerQueues, variables, flowMessageBrokerQueues'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, description, host, port, protocol, auth_type'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageBrokersListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      description: A description of the resource
                      host: example_host
                      port: 1
                      protocol: HTTP
                      auth_type: example_auth_type
                      variables: example_variables
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/message-brokers
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/message-brokers?page=1
                      last: https://api.example.com/api/v1/message-brokers?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Message Brokers
    post:
      summary: Create Message Broker
      description: 'Creates a new message broker.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageBrokersResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      description: A description of the resource
                      host: example_host
                      port: 1
                      protocol: HTTP
                      auth_type: example_auth_type
                      variables: example_variables
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      description:
                      - The description field is required.
                      host:
                      - The host field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageBrokersStoreRequest'
      tags:
      - Message Brokers
      parameters: []
  /api/v1/message-brokers/{message_broker}:
    get:
      summary: Get Message Broker
      description: 'Retrieves the details of a specific message broker.'
      parameters:
      - name: message_broker
        in: path
        required: true
        schema:
          type: string
        description: The message broker identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[description]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by description.
      - name: filter[host]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by host.
      - name: filter[protocol]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by protocol.
      - name: filter[auth_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by auth_type.
      - name: filter[port]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by port.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flows, messageBrokerQueues, variables, flowMessageBrokerQueues'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, description, host, port, protocol, auth_type'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageBrokersResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      description: A description of the resource
                      host: example_host
                      port: 1
                      protocol: HTTP
                      auth_type: example_auth_type
                      variables: example_variables
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Message Brokers
    put:
      summary: Update Message Broker
      description: 'Updates an existing message broker.'
      parameters:
      - name: message_broker
        in: path
        required: true
        schema:
          type: string
        description: The message broker identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageBrokersResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      description: A description of the resource
                      host: example_host
                      port: 1
                      protocol: HTTP
                      auth_type: example_auth_type
                      variables: example_variables
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      description:
                      - The description must be a string.
                      host:
                      - The host must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageBrokersUpdateRequest'
      tags:
      - Message Brokers
    delete:
      summary: Delete Message Broker
      description: 'Permanently deletes a specific message broker.'
      parameters:
      - name: message_broker
        in: path
        required: true
        schema:
          type: string
        description: The message broker identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Message Brokers
  /api/v1/message-brokers/{message_broker}/message-broker-queues:
    get:
      summary: List Message Brokers
      description: 'Retrieves a paginated list of queues for a specific message broker.'
      parameters:
      - name: message_broker
        in: path
        required: true
        schema:
          type: string
        description: The message broker identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[message_broker_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by message_broker_id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flows, messageBroker'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, message_broker_id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageBrokerQueuesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      flow_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/message-brokers/{message_broker}/message-broker-queues
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/message-brokers/{message_broker}/message-broker-queues?page=1
                      last: https://api.example.com/api/v1/message-brokers/{message_broker}/message-broker-queues?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Message Broker Queues
    post:
      summary: Create Message Broker
      description: 'Creates a new queue for a specific message broker.'
      parameters:
      - name: message_broker
        in: path
        required: true
        schema:
          type: string
        description: The message broker identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageBrokerQueuesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      flow_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Message Broker Queues
  /api/v1/message-brokers/{message_broker}/message-broker-queues/{message_broker_queue}:
    get:
      summary: Get Message Broker
      description: 'Retrieves the details of a specific message broker queue.'
      parameters:
      - name: message_broker
        in: path
        required: true
        schema:
          type: string
        description: The message broker identifier.
      - name: message_broker_queue
        in: path
        required: true
        schema:
          type: string
        description: The message broker queue identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[message_broker_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by message_broker_id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flows, messageBroker'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, message_broker_id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageBrokerQueuesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      flow_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Message Broker Queues
    put:
      summary: Update Message Broker
      description: 'Updates an existing message broker queue.'
      parameters:
      - name: message_broker
        in: path
        required: true
        schema:
          type: string
        description: The message broker identifier.
      - name: message_broker_queue
        in: path
        required: true
        schema:
          type: string
        description: The message broker queue identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageBrokerQueuesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      flow_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Message Broker Queues
    delete:
      summary: Delete Message Broker
      description: 'Permanently deletes a specific message broker queue.'
      parameters:
      - name: message_broker
        in: path
        required: true
        schema:
          type: string
        description: The message broker identifier.
      - name: message_broker_queue
        in: path
        required: true
        schema:
          type: string
        description: The message broker queue identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Message Broker Queues
  /api/v1/model-filter-values:
    get:
      summary: List Model Filter Values
      description: 'Retrieves a paginated list of filter values associated with a model.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      parameters:
      - name: filter[filter_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by filter_id.
      - name: filter[model_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_type.
      - name: filter[model_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_id.
      - name: filter[filter.model_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by filter.model_type.
      - name: filter[filter.model_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by filter.model_id.
      - name: filter[does_not_belong_to_deleted_step]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by does_not_belong_to_deleted_step.
      - name: filter[model]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: filter'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: filter_id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelFilterValuesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      model_type: example_model_type
                      model_id: 1
                      filter_id: 1
                      value: example_value
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      filter: {}
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/model-filter-values
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/model-filter-values?page=1
                      last: https://api.example.com/api/v1/model-filter-values?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Model Filter Values
    post:
      summary: Create Model Filter Value
      description: 'Creates a new filter value for a model.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelFilterValuesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      model_type: example_model_type
                      model_id: 1
                      filter_id: 1
                      value: example_value
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      filter: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      model_type:
                      - The model type field is required.
                      model_id:
                      - The model id field is required.
                      filter_id:
                      - The filter id field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelFilterValuesStoreRequest'
      tags:
      - Model Filter Values
      parameters: []
  /api/v1/model-filter-values/{model_filter_value}:
    put:
      summary: Update Model Filter Value
      description: 'Updates an existing model filter value.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      parameters:
      - name: model_filter_value
        in: path
        required: true
        schema:
          type: string
        description: The model filter value identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelFilterValuesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      model_type: example_model_type
                      model_id: 1
                      filter_id: 1
                      value: example_value
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      filter: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      filter_id:
                      - The filter id must be an integer.
                      value:
                      - The value must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelFilterValuesUpdateRequest'
      tags:
      - Model Filter Values
    delete:
      summary: Delete Model Filter Value
      description: 'Permanently deletes a specific model filter value.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      parameters:
      - name: model_filter_value
        in: path
        required: true
        schema:
          type: string
        description: The model filter value identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Model Filter Values
  /api/v1/model-notes:
    get:
      summary: List Model Notes
      description: 'Retrieves a paginated list of notes associated with a model.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      parameters:
      - name: filter[user_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by user_id.
      - name: filter[my_notes]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by my_notes.
      - name: filter[model_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_type.
      - name: filter[model_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flowStep, user'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: id, created_at'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelNotesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      note: example_note
                      private: example_private
                      patchworks_only: example_patchworks_only
                      model_type: example_model_type
                      model_id: 1
                      colour: blue
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      user_id: 1
                      flow_step: {}
                      user: {}
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/model-notes
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/model-notes?page=1
                      last: https://api.example.com/api/v1/model-notes?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Model Notes
    post:
      summary: Create Model Note
      description: 'Creates a new note for a model.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelNotesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      note: example_note
                      private: example_private
                      patchworks_only: example_patchworks_only
                      model_type: example_model_type
                      model_id: 1
                      colour: blue
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      user_id: 1
                      flow_step: {}
                      user: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      note:
                      - The note field is required.
                      model_type:
                      - The model type field is required.
                      model_id:
                      - The model id field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelNotesStoreRequest'
      tags:
      - Model Notes
      parameters: []
  /api/v1/model-notes/{model_note}:
    get:
      summary: Get Model Note
      description: 'Retrieves the details of a specific model note.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      parameters:
      - name: model_note
        in: path
        required: true
        schema:
          type: string
        description: The model note identifier.
      - name: filter[user_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by user_id.
      - name: filter[my_notes]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by my_notes.
      - name: filter[model_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_type.
      - name: filter[model_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flowStep, user'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: id, created_at'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelNotesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      note: example_note
                      private: example_private
                      patchworks_only: example_patchworks_only
                      model_type: example_model_type
                      model_id: 1
                      colour: blue
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      user_id: 1
                      flow_step: {}
                      user: {}
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Model Notes
    put:
      summary: Update Model Note
      description: 'Updates an existing model note.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      parameters:
      - name: model_note
        in: path
        required: true
        schema:
          type: string
        description: The model note identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelNotesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      note: example_note
                      private: example_private
                      patchworks_only: example_patchworks_only
                      model_type: example_model_type
                      model_id: 1
                      colour: blue
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      user_id: 1
                      flow_step: {}
                      user: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      note:
                      - The note must be a string.
                      colour:
                      - The colour must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelNotesUpdateRequest'
      tags:
      - Model Notes
    delete:
      summary: Delete Model Note
      description: 'Permanently deletes a specific model note.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      parameters:
      - name: model_note
        in: path
        required: true
        schema:
          type: string
        description: The model note identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Model Notes
  /api/v1/model-variables:
    get:
      summary: List Model Variables
      description: 'Retrieves a paginated list of variables associated with a model.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      parameters:
      - name: filter[variable_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by variable_id.
      - name: filter[model_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_type.
      - name: filter[model_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: model, variable'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: variable_id, model_type, model_id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelVariablesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      variable_id: 1
                      alias: example_alias
                      configurable: example_configurable
                      required: example_required
                      advanced: example_advanced
                      model_type: example_model_type
                      model_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      variable: {}
                      modified: example_modified
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/model-variables
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/model-variables?page=1
                      last: https://api.example.com/api/v1/model-variables?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Model Variables
    post:
      summary: Create Model Variable
      description: 'Creates a new variable association for a model.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelVariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      variable_id: 1
                      alias: example_alias
                      configurable: example_configurable
                      required: example_required
                      advanced: example_advanced
                      model_type: example_model_type
                      model_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      variable: {}
                      modified: example_modified
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      variable_id:
                      - The variable id field is required.
                      alias:
                      - The alias must be a string.
                      model_type:
                      - The model type field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelVariablesStoreRequest'
      tags:
      - Model Variables
      parameters: []
  /api/v1/model-variables/{model_variable}:
    get:
      summary: Get Model Variable
      description: 'Retrieves the details of a specific model variable.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      parameters:
      - name: model_variable
        in: path
        required: true
        schema:
          type: string
        description: The model variable identifier.
      - name: filter[variable_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by variable_id.
      - name: filter[model_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_type.
      - name: filter[model_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: model, variable'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: variable_id, model_type, model_id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelVariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      variable_id: 1
                      alias: example_alias
                      configurable: example_configurable
                      required: example_required
                      advanced: example_advanced
                      model_type: example_model_type
                      model_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      variable: {}
                      modified: example_modified
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Model Variables
    put:
      summary: Update Model Variable
      description: 'Updates an existing model variable.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      parameters:
      - name: model_variable
        in: path
        required: true
        schema:
          type: string
        description: The model variable identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelVariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      variable_id: 1
                      alias: example_alias
                      configurable: example_configurable
                      required: example_required
                      advanced: example_advanced
                      model_type: example_model_type
                      model_id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      variable: {}
                      modified: example_modified
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      alias:
                      - The alias must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelVariablesUpdateRequest'
      tags:
      - Model Variables
    delete:
      summary: Delete Model Variable
      description: 'Permanently deletes a specific model variable.

        Note: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.'
      parameters:
      - name: model_variable
        in: path
        required: true
        schema:
          type: string
        description: The model variable identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Model Variables
  /api/v1/my/company/allowance:
    get:
      summary: Get Company Allowance
      tags:
      - Allowances
      description: Retrieves the current allowance limits, usage, and remaining capacity for the company associated with the current API key.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MyListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      allowance: {}
                      usage: {}
                      remaining: {}
                example-2:
                  summary: Company allowance
                  value:
                    data:
                      allowance:
                        allowed_flows: 200
                        allowed_connectors: 25
                        advanced_features: 1
                        allowed_apps: []
                        scheduled_flows: 50
                        webhook_limit: 120
                        cache_memory: 50
                        cpu_time_limit: 800
                        payload_size_limit: 64000
                        partner_features: 0
                        operation_limit: 500000
                        inbound_api_rate_limit: 240
                        flow_concurrency_limit: 25
                        notification_limit: 1000
                        tracking_summary_limit: 0
                        callback_limit: 0
                        allowed_virtual_environments: 25
                        allowed_virtual_environment_versions: 5
                        ai_daily_limit: 25
                        patchworks_analytics: 1
                        mcp_daily_limit: 0
                      usage:
                        allowed_flows: 10
                        allowed_connectors: 0
                        advanced_features: 0
                        cpu_time_limit: 3
                        payload_size_limit: 6
                        operation_limit: 784
                        allowed_virtual_environments: 6
                        ai_daily_limit: 3
                      remaining:
                        allowed_flows: 190
                        allowed_connectors: 25
                        advanced_features: 1
                        scheduled_flows: 50
                        webhook_limit: 120
                        cache_memory: 50
                        cpu_time_limit: 797
                        payload_size_limit: 63994
                        operation_limit: 499216
                        inbound_api_rate_limit: 240
                        flow_concurrency_limit: 25
                        notification_limit: 1000
                        tracking_summary_limit: 0
                        callback_limit: 0
                        allowed_virtual_environments: 19
                        ai_daily_limit: 22
                        mcp_daily_limit: 0
  /api/v1/my/company/stats:
    get:
      summary: Get Company Stats
      description: Retrieves activity statistics for the company associated with the current API key, including active flow count, successful and failed flow run counts, and average flow run time.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MyListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 0
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Company
      parameters: []
  /api/v1/my/company/transactions:
    get:
      summary: List Company Transactions
      description: Retrieves a paginated list of transactions for the company associated with the current API key. Can be sorted by `order_by` and `direction`.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MyListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/my/company/transactions
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/my/company/transactions?page=1
                      last: https://api.example.com/api/v1/my/company/transactions?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Company
      parameters: []
  /api/v1/notifications:
    get:
      summary: List Notifications
      description: 'Retrieves a paginated list of notifications for the current user.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      read: example_read
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      type: example_type
                      read_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/notifications
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/notifications?page=1
                      last: https://api.example.com/api/v1/notifications?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Notifications
      parameters: []
    patch:
      summary: Read Notifications
      description: 'Marks all notifications as read for the current user.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Notifications
      parameters: []
  /api/v1/notifications/{notification}:
    put:
      summary: Update Notification
      description: 'Updates a specific notification, for example to mark it as read.'
      parameters:
      - name: notification
        in: path
        required: true
        schema:
          type: string
        description: The notification identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      read: example_read
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      type: example_type
                      read_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      read:
                      - The read field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationsUpdateRequest'
      tags:
      - Notifications
    delete:
      summary: Delete Notification
      description: 'Permanently deletes a specific notification.'
      parameters:
      - name: notification
        in: path
        required: true
        schema:
          type: string
        description: The notification identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Notifications
  /api/v1/oauth/authenticate:
    post:
      summary: Authenticate Oauth
      description: 'To be confirmed.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Oauth
      parameters: []
  /api/v1/oauth/authorise:
    post:
      summary: Authorise Oauth
      description: 'Authorises a connector using OAuth, creating a new authenticated instance.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OauthAuthoriseAuthoriseRequest'
      tags:
      - Oauth
      parameters: []
  /api/v1/oauth/woo-app-auth:
    post:
      summary: Authenticate Woo App Auth
      description: 'To be confirmed.'
      tags:
      - Oauth
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
      parameters: []
  /api/v1/oauth/{connector}/reauthorise:
    patch:
      summary: Reauthorise Oauth
      description: 'Reauthorises an existing OAuth connector instance.'
      parameters:
      - name: connector
        in: path
        required: true
        schema:
          type: string
        description: The connector identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OauthReauthoriseReauthoriseRequest'
      tags:
      - Oauth
  /api/v1/otc/{tenant}/woo-app-auth-callback:
    get:
      summary: Woo App Auth Callback
      description: 'To be confirmed.'
      tags:
      - OTC
      parameters:
      - name: tenant
        in: path
        required: true
        schema:
          type: string
        description: The tenant identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
    post:
      summary: Woo App Auth Callback
      description: 'To be confirmed.'
      tags:
      - OTC
      parameters:
      - name: tenant
        in: path
        required: true
        schema:
          type: string
        description: The tenant identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/packages:
    get:
      summary: List Packages
      description: Retrieves a paginated list of packages.
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: createdBy, flowVersions.deployments, virtualEnvironments, deployments.virtualEnvironment.deployedVersion, deployments.user, package, flowVersionDeployments, flowVersionDeployments, flowVersionDeployments'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PackagesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      name: My Example
                      notes: example_notes
                      created_by: example_created_by
                      priority: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      created_by_user: []
                      flow_versions: []
                      virtual_environments: []
                      deployments: []
                      flow_versions_count: 5
                      deployments_count: 5
                      flow_version_deployments_count: 5
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/packages
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/packages?page=1
                      last: https://api.example.com/api/v1/packages?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Packages
    post:
      summary: Create Package
      description: Creates a new package.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PackagesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      name: My Example
                      notes: example_notes
                      created_by: example_created_by
                      priority: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      created_by_user: []
                      flow_versions: []
                      virtual_environments: []
                      deployments: []
                      flow_versions_count: 5
                      deployments_count: 5
                      flow_version_deployments_count: 5
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      notes:
                      - The notes must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PackagesStoreRequest'
      tags:
      - Packages
      parameters: []
  /api/v1/packages/{package}:
    get:
      summary: Get Package
      description: Retrieves the details of a specific package.
      parameters:
      - name: package
        in: path
        required: true
        schema:
          type: string
        description: The package identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: createdBy, flowVersions.deployments, virtualEnvironments, deployments.virtualEnvironment.deployedVersion, deployments.user, package, flowVersionDeployments, flowVersionDeployments, flowVersionDeployments'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PackagesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      name: My Example
                      notes: example_notes
                      created_by: example_created_by
                      priority: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      created_by_user: []
                      flow_versions: []
                      virtual_environments: []
                      deployments: []
                      flow_versions_count: 5
                      deployments_count: 5
                      flow_version_deployments_count: 5
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Packages
    put:
      summary: Update Package
      description: Updates an existing package.
      parameters:
      - name: package
        in: path
        required: true
        schema:
          type: string
        description: The package identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PackagesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      name: My Example
                      notes: example_notes
                      created_by: example_created_by
                      priority: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      created_by_user: []
                      flow_versions: []
                      virtual_environments: []
                      deployments: []
                      flow_versions_count: 5
                      deployments_count: 5
                      flow_version_deployments_count: 5
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      notes:
                      - The notes must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PackagesUpdateRequest'
      tags:
      - Packages
    delete:
      summary: Delete Package
      description: Permanently deletes a specific package.
      parameters:
      - name: package
        in: path
        required: true
        schema:
          type: string
        description: The package identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Packages
  /api/v1/packages/{package}/compare/{virtual_environment}:
    get:
      summary: Compare Package
      description: Compares a specific package against the current state of a specific virtual environment.
      parameters:
      - name: package
        in: path
        required: true
        schema:
          type: string
        description: The package identifier.
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Packages
  /api/v1/packages/{package}/deploy/{virtual_environment}:
    post:
      summary: Deploy Package
      description: Deploys a specific package to a specific virtual environment.
      parameters:
      - name: package
        in: path
        required: true
        schema:
          type: string
        description: The package identifier.
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PackagesDeployDeployRequest'
      tags:
      - Packages
  /api/v1/packages/{package}/flow-versions/{flow_version}:
    post:
      summary: Create Package
      description: Adds a specific flow version to a specific package.
      parameters:
      - name: package
        in: path
        required: true
        schema:
          type: string
        description: The package identifier.
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      virtual_environment_id: 1
                      flow_version_id: 1
                      priority: 1
                      cron_string: example_cron_string
                      microservice: example_microservice
                      config: example_config
                      flow_step_route_id: 1
                      variables: example_variables
                      parent_id: 1
                      type: example_type
                      key: example_key
                      value: example_value
                      date_format: example_date_format
                      secret: example_secret
                      enabled_at: '2025-01-15T10:30:00.000000Z'
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      flow_id: 1
                      flow_name: example_flow_name
                      flow_priority: example_flow_priority
                      iteration: example_iteration
                      status: Draft
                      is_deployed: true
                      is_editable: true
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      deployed_by: {}
                      deployed_by_user: {}
                      deployments: []
                      has_callback_step: []
                      steps: []
                      runs: example_runs
                      latest_run: example_latest_run
                      schedules: example_schedules
                      filters: []
                      steps_count: 5
                      pivot: example_pivot
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      priority:
                      - The priority must be an integer.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PackagesStoreFlowVersionsRequest'
      tags:
      - Packages
    delete:
      summary: Delete Package
      description: Removes a specific flow version from a specific package.
      parameters:
      - name: package
        in: path
        required: true
        schema:
          type: string
        description: The package identifier.
      - name: flow_version
        in: path
        required: true
        schema:
          type: string
        description: The flow version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Packages
  /api/v1/packages/{package}/virtual-environments/{virtual_environment}:
    delete:
      summary: Delete Package Virtual Environment
      description: Removes a specific virtual environment from a specific package.
      parameters:
      - name: package
        in: path
        required: true
        schema:
          type: string
        description: The package identifier.
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Packages
  /api/v1/patchworks/authentication-types:
    get:
      summary: List Authentication Types
      description: 'Retrieves a paginated list of supported authentication types.'
      parameters:
      - name: filter[hidden]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by hidden.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchworksListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      label: My Label
                      colour: blue
                      logo_url: example_logo_url
                      version: 1
                      version_name: example_version_name
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      system_type_id: 1
                      protocol: HTTP
                      company_id: 1
                      date_format: example_date_format
                      help_link: example_help_link
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/patchworks/authentication-types
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/patchworks/authentication-types?page=1
                      last: https://api.example.com/api/v1/patchworks/authentication-types?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Authentication Types
  /api/v1/patchworks/authentication-types/{authentication_type}:
    get:
      summary: Get Authentication Type
      description: 'Retrieves the details of a specific authentication type.'
      parameters:
      - name: authentication_type
        in: path
        required: true
        schema:
          type: string
        description: The authentication type identifier.
      - name: filter[hidden]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by hidden.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchworksResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      label: My Label
                      colour: blue
                      logo_url: example_logo_url
                      version: 1
                      version_name: example_version_name
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      system_type_id: 1
                      protocol: HTTP
                      company_id: 1
                      date_format: example_date_format
                      help_link: example_help_link
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Authentication Types
  /api/v1/patchworks/blueprints/{blueprint}/install:
    get:
      summary: Install Blueprint
      description: 'To be confirmed.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/blueprints/{blueprint}/installs:
    get:
      summary: List Blueprint Installs
      description: 'Retrieves a paginated list of installs for a specific blueprint.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/blueprints/{blueprint}/installs/bulk:
    get:
      summary: List Blueprint Bulk Installs
      description: 'Retrieves a paginated list of bulk install batches for a specific blueprint.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
    post:
      summary: Create Blueprint Bulk Install
      description: 'Creates a new bulk install batch for a specific blueprint.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/patchworks/blueprints/{blueprint}/installs/bulk/{batch}:
    get:
      summary: Get Blueprint Bulk Install Batch
      description: 'Retrieves the details of a specific bulk install batch.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      - name: batch
        in: path
        required: true
        schema:
          type: string
        description: The batch identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/blueprints/{blueprint}/installs/bulk/{batch}/cancel:
    post:
      summary: Cancel Blueprint Install Bulk
      description: 'Cancels a specific in-progress bulk install batch.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      - name: batch
        in: path
        required: true
        schema:
          type: string
        description: The batch identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/patchworks/blueprints/{blueprint}/installs/bulk/{batch}/items:
    get:
      summary: List Blueprint Bulk Install Batch Items
      description: 'Retrieves a paginated list of items for a specific bulk install batch.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      - name: batch
        in: path
        required: true
        schema:
          type: string
        description: The batch identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/blueprints/{blueprint}/installs/bulk/{batch}/items/{item}:
    get:
      summary: Get Blueprint Bulk Install Batch Item
      description: 'Retrieves the details of a specific bulk install batch item.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      - name: batch
        in: path
        required: true
        schema:
          type: string
        description: The batch identifier.
      - name: item
        in: path
        required: true
        schema:
          type: string
        description: The item identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/blueprints/{blueprint}/versions:
    get:
      summary: List Blueprint Versions
      description: 'Retrieves a paginated list of versions for a specific blueprint.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/blueprints/{blueprint}/versions/active:
    get:
      summary: Get Active Blueprint Version
      description: 'Retrieves the currently active version of a specific blueprint.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/blueprints/{blueprint}/versions/{version}:
    get:
      summary: Get Blueprint Version
      description: 'Retrieves the details of a specific blueprint version.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
    delete:
      summary: Delete Blueprint Version
      description: 'Permanently deletes a specific blueprint version.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/blueprints/{blueprint}/versions/{version}/activate:
    post:
      summary: Activate Blueprint Version
      description: 'Sets a specific blueprint version as the active version.'
      tags:
      - Blueprints
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/blueprints/{blueprint}/draft:
    get:
      summary: Get Blueprint Draft
      description: 'Retrieves the draft manifest for a specific blueprint.'
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlueprintsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Blueprints
    post:
      summary: Create Blueprint Draft
      description: 'Creates a new draft manifest for a specific blueprint.'
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlueprintsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Blueprints
    patch:
      summary: Update Blueprint Draft
      description: 'Updates the draft manifest for a specific blueprint.'
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlueprintsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Blueprints
    delete:
      summary: Delete Blueprint Draft
      description: 'Permanently deletes the draft manifest for a specific blueprint.'
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Blueprints
  /api/v1/blueprints/{blueprint}/draft/check:
    get:
      summary: Check Blueprint Draft
      description: 'To be confirmed.'
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Blueprints
  /api/v1/blueprints/{blueprint}/draft/publish:
    post:
      summary: Publish Blueprint Draft
      description: 'Publishes the draft manifest for a specific blueprint, creating a new version.'
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Blueprints
  /api/v1/blueprints/{blueprint}/draft/reset:
    post:
      summary: Reset Blueprint Draft
      description: 'Resets the draft manifest for a specific blueprint to match the current active version.'
      parameters:
      - name: blueprint
        in: path
        required: true
        schema:
          type: string
        description: The blueprint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Blueprints
  /api/v1/patchworks/cross-reference-lookup-templates:
    get:
      summary: List Cross Reference Lookup Templates
      description: Retrieves a paginated list of cross reference lookup templates. Can be filtered by `name`, `hidden_from_marketplace`, `visible_for_marketplace`, and `private`.
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[hidden_from_marketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by hidden_from_marketplace.
      - name: filter[visible_for_marketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visible_for_marketplace.
      - name: filter[private]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by private.
      - name: filter[visibility]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visibility.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: crossReferenceLookupValueTemplates'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchworksListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      label: My Label
                      colour: blue
                      logo_url: example_logo_url
                      version: 1
                      version_name: example_version_name
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      system_type_id: 1
                      protocol: HTTP
                      company_id: 1
                      date_format: example_date_format
                      help_link: example_help_link
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/patchworks/cross-reference-lookup-templates
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/patchworks/cross-reference-lookup-templates?page=1
                      last: https://api.example.com/api/v1/patchworks/cross-reference-lookup-templates?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Cross Reference Lookup Templates
  /api/v1/patchworks/cross-reference-lookup-templates/{cross_reference_lookup_template}/download:
    get:
      summary: Download Cross Reference Lookup Template
      description: Triggers the download of a specific cross reference lookup template as a CSV file with `left_value` and `right_value` columns. The file is added to the File Downloads section in General Settings.
      parameters:
      - name: cross_reference_lookup_template
        in: path
        required: true
        schema:
          type: string
        description: The cross reference lookup template identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Cross Reference Lookup Templates
  /api/v1/patchworks/duplicate-flow:
    post:
      summary: Duplicate Flow
      description: 'Duplicates a flow version from one company to another.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchworksDuplicateFlowDuplicateFlowRequest'
      tags:
      - Multi-Company Profiles
      parameters: []
  /api/v1/patchworks/endpoint-templates/{endpoint_template}/field-tags:
    get:
      summary: List Endpoint Template Field Tags
      description: Retrieves a paginated list of field tags for a specific endpoint template.
      parameters:
      - name: endpoint_template
        in: path
        required: true
        schema:
          type: string
        description: The endpoint template identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[entity_type_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by entity_type_id.
      - name: filter[store_as]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by store_as.
      - name: filter[is_required]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by is_required.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: entityType'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, entity_type_id, store_as, is_required'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchworksListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      label: My Label
                      colour: blue
                      logo_url: example_logo_url
                      version: 1
                      version_name: example_version_name
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      system_type_id: 1
                      protocol: HTTP
                      company_id: 1
                      date_format: example_date_format
                      help_link: example_help_link
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/patchworks/endpoint-templates/{endpoint_template}/field-tags
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/patchworks/endpoint-templates/{endpoint_template}/field-tags?page=1
                      last: https://api.example.com/api/v1/patchworks/endpoint-templates/{endpoint_template}/field-tags?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Endpoint Templates
  /api/v1/patchworks/entity-types:
    get:
      summary: List Entity Types
      description: 'Retrieves a paginated list of entity types.'
      parameters:
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: endpoints, fieldTags, systemFields'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchworksListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      label: My Label
                      colour: blue
                      logo_url: example_logo_url
                      version: 1
                      version_name: example_version_name
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      system_type_id: 1
                      protocol: HTTP
                      company_id: 1
                      date_format: example_date_format
                      help_link: example_help_link
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/patchworks/entity-types
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/patchworks/entity-types?page=1
                      last: https://api.example.com/api/v1/patchworks/entity-types?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Entity Types
  /api/v1/patchworks/entity-types/{entity_type}:
    get:
      summary: Get Entity Type
      description: 'Retrieves the details of a specific entity type.'
      parameters:
      - name: entity_type
        in: path
        required: true
        schema:
          type: string
        description: The entity type identifier.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: endpoints, fieldTags, systemFields'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchworksResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      label: My Label
                      colour: blue
                      logo_url: example_logo_url
                      version: 1
                      version_name: example_version_name
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      system_type_id: 1
                      protocol: HTTP
                      company_id: 1
                      date_format: example_date_format
                      help_link: example_help_link
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Entity Types
  /api/v1/patchworks/entity-types/download:
    get:
      summary: Download Entity Type
      description: 'To be confirmed.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Entity Types
      parameters: []
  /api/v1/patchworks/features:
    get:
      summary: List Features
      description: 'To be confirmed.'
      tags:
      - Features
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[scope]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by scope.
      - name: filter[model_name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_name.
      - name: filter[model_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by model_id.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, scope'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/features/{feature}:
    put:
      summary: Update Feature
      description: 'To be confirmed.'
      tags:
      - Features
      parameters:
      - name: feature
        in: path
        required: true
        schema:
          type: string
        description: The feature identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
    delete:
      summary: Delete Feature
      description: 'To be confirmed.'
      tags:
      - Features
      parameters:
      - name: feature
        in: path
        required: true
        schema:
          type: string
        description: The feature identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/field-tags:
    get:
      summary: List Field Tags
      description: Retrieves a paginated list of standard field tags used to label data fields in connector endpoint schemas.
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[entity_type_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by entity_type_id.
      - name: filter[store_as]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by store_as.
      - name: filter[is_required]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by is_required.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: entityType'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, entity_type_id, store_as, is_required'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchworksListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      label: My Label
                      colour: blue
                      logo_url: example_logo_url
                      version: 1
                      version_name: example_version_name
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      system_type_id: 1
                      protocol: HTTP
                      company_id: 1
                      date_format: example_date_format
                      help_link: example_help_link
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/patchworks/field-tags
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/patchworks/field-tags?page=1
                      last: https://api.example.com/api/v1/patchworks/field-tags?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Field Tags
  /api/v1/patchworks/flow-templates/{flow_template}:
    get:
      summary: Get Flow Template
      description: 'Retrieves the details of a specific flow template included in a marketplace blueprint.'
      parameters:
      - name: flow_template
        in: path
        required: true
        schema:
          type: string
        description: The flow template identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[hidden_from_marketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by hidden_from_marketplace.
      - name: filter[visible_for_marketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visible_for_marketplace.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[blueprint_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by blueprint_id.
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: filter[marketplaceApps]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by marketplaceApps.
      - name: filter[marketplace_apps.blueprint_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by marketplace_apps.blueprint_id.
      - name: filter[blueprint_version_number]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by blueprint_version_number.
      - name: filter[marketplace_apps.version]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by marketplace_apps.version.
      - name: filter[private]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by private.
      - name: filter[visibility]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visibility.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: systemTemplates.logo, flowStepTemplates, flowStepTemplates.children, flowStepTemplates.parentFlowStep, flowTemplateSchedules, marketplaceCompany, publicCompany, marketplaceApps'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowTemplatesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Templates
    delete:
      summary: Delete Flow Template
      description: 'Permanently deletes a specific flow template.'
      parameters:
      - name: flow_template
        in: path
        required: true
        schema:
          type: string
        description: The flow template identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Templates
  /api/v1/patchworks/flow-templates/{flow_template}/steps:
    get:
      summary: List Flow Template Steps
      description: 'Retrieves a paginated list of steps for a specific flow template.'
      parameters:
      - name: flow_template
        in: path
        required: true
        schema:
          type: string
        description: The flow template identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchworksListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      label: My Label
                      colour: blue
                      logo_url: example_logo_url
                      version: 1
                      version_name: example_version_name
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      system_type_id: 1
                      protocol: HTTP
                      company_id: 1
                      date_format: example_date_format
                      help_link: example_help_link
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/patchworks/flow-templates/{flow_template}/steps
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/patchworks/flow-templates/{flow_template}/steps?page=1
                      last: https://api.example.com/api/v1/patchworks/flow-templates/{flow_template}/steps?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Templates
  /api/v1/flow-templates/{flow_template}/install:
    post:
      summary: Install Flow Template
      description: 'Installs a specific flow template from a marketplace blueprint.'
      parameters:
      - name: flow_template
        in: path
        required: true
        schema:
          type: string
        description: The flow template identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Flow Templates
  /api/v1/patchworks/job-execution-logs:
    get:
      summary: List Job Execution Logs
      description: Retrieves a paginated list of job execution logs. Can be filtered by `company_id`, `status`, `executable_kind`, date range, and `name`.
      tags:
      - Job Execution Logs
      parameters:
      - name: filter[company_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by company_id.
      - name: filter[status]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by status.
      - name: filter[executable_kind]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by executable_kind.
      - name: filter[created_before]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by created_before.
      - name: filter[created_after]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by created_after.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[like]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by like.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: started_at, finished_at, duration_ms, status, name, company_id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/label-templates:
    get:
      summary: List Label Templates
      description: Retrieves a paginated list of standard label templates provided by Patchworks. Can be filtered by `name`.
      tags:
      - Label Templates
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at, name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/patchworks/label-templates/{label_template}:
    get:
      summary: Get Label Template
      description: Retrieves the details of a specific label template.
      tags:
      - Label Templates
      parameters:
      - name: label_template
        in: path
        required: true
        schema:
          type: string
        description: The label template identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at, name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/marketplace-apps/{marketplace_app}:
    put:
      summary: Update Marketplace App
      description: 'Updates an existing marketplace app version.

        Note: A marketplace app is a version of a blueprint.'
      parameters:
      - name: marketplace_app
        in: path
        required: true
        schema:
          type: string
        description: The marketplace app identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketplaceAppsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      help_guide: example_help_guide
                      flow_version_ids: example_flow_version_ids
                      cross_reference_lookup_ids: example_cross_reference_lookup_ids
                      system_ids: example_system_ids
                      script_version_ids: example_script_version_ids
                      cache_ids: example_cache_ids
                      data_pool_ids: example_data_pool_ids
                      private: example_private
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarketplaceAppsUpdateRequest'
      tags:
      - Marketplace Apps
  /api/v1/marketplace-apps/{marketplaceApp}/install:
    post:
      summary: Install Marketplace App
      description: 'Installs a specific marketplace app version.

        Note: A marketplace app is a version of a blueprint.'
      parameters:
      - name: marketplaceApp
        in: path
        required: true
        schema:
          type: string
        description: The marketplaceApp identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarketplaceAppsInstallInstallRequest'
      tags:
      - Marketplace Apps
  /api/v1/patchworks/marketplace-apps/convertible:
    get:
      summary: Get Convertible
      description: 'To be confirmed.

        Note: A marketplace app is a version of a blueprint.'
      tags:
      - Marketplace Apps
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      parameters: []
  /api/v1/patchworks/marketplace-apps/{marketplaceApp}/convert:
    post:
      summary: Convert Marketplace App
      description: 'To be confirmed.

        Note: A marketplace app is a version of a blueprint.'
      tags:
      - Marketplace Apps
      parameters:
      - name: marketplaceApp
        in: path
        required: true
        schema:
          type: string
        description: The marketplaceApp identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/patchworks/operations/summary/{company_id?}:
    get:
      summary: Get Summary
      description: Retrieves a summary of company details, connectors, and flows for the current company or another company profile that you manage.
      tags:
      - Operations
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    company:
                      id: 0
                      name: string
                      status: string
                      partner_name: null
                      hubspot_id: null
                      subscription:
                        tier: string
                        allowance: {}
                        trial_ends_at: null
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    connectors:
                      total: 0
                      all: []
                    flows:
                      total: 0
                      enabled: 0
                      all: []
                    next: null
                example-2:
                  summary: Company summary
                  value:
                    company:
                      id: 5503465
                      name: OpenAPI Sample Company
                      status: Active
                      partner_name: null
                      hubspot_id: null
                      subscription:
                        tier: Professional
                        allowance:
                          allowed_flows: 200
                          allowed_connectors: 25
                          advanced_features: 1
                          allowed_apps: []
                          scheduled_flows: 50
                          webhook_limit: 120
                          cache_memory: 50
                          cpu_time_limit: 800
                          payload_size_limit: 64000
                          partner_features: 0
                          operation_limit: 500000
                          inbound_api_rate_limit: 240
                          flow_concurrency_limit: 25
                          notification_limit: 1000
                          tracking_summary_limit: 0
                          callback_limit: 0
                          allowed_virtual_environments: 25
                          allowed_virtual_environment_versions: 5
                          ai_daily_limit: 25
                          patchworks_analytics: 1
                          mcp_daily_limit: 0
                        trial_ends_at: null
                      created_at: '2026-03-05T09:32:21.000000Z'
                      updated_at: '2026-03-09T19:04:36.000000Z'
                    connectors:
                      total: 3
                      all:
                      - id: 1
                        name: Product Magic
                        system_template_id: 31
                      - id: 2
                        name: Customer Magic
                        system_template_id: 2702
                    flows:
                      total: 7
                      enabled: 0
                      all:
                      - id: 1
                        name: Sync Customer Data (Sandbox)
                        status: Disabled
                        created_at: '2026-03-05T09:49:52.000000Z'
                        enabled_at: null
                      - id: 2
                        name: Sync Customer Data (France)
                        status: Disabled
                        created_at: '2026-03-05T09:50:00.000000Z'
                        enabled_at: null
                      - id: 5
                        name: Prototyping Flow
                        status: Disabled
                        created_at: '2026-03-05T10:39:08.000000Z'
                        enabled_at: null
                    next: 'http://core.wearepatchworks.com/api/v1/patchworks/operations/summary/5503466'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      parameters: []
  /api/v1/patchworks/script-languages:
    get:
      summary: List Script Languages
      description: Retrieves a list of available script languages.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchworksListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                  - value: string
                    label: string
                    alpha: false
                example-2:
                  summary: Nine script languages
                  value:
                  - value: c_sharp_8_0
                    label: 'C# 8.0'
                    alpha: true
                  - value: go_1_18
                    label: Go 1.18
                    alpha: false
                  - value: go_1_23
                    label: Go 1.23
                    alpha: false
                  - value: rust_1_82
                    label: Rust 1.82
                    alpha: true
                  - value: node_18
                    label: JavaScript (Node 18)
                    alpha: false
                  - value: php_8_1
                    label: PHP 8.1
                    alpha: false
                  - value: php_8_2
                    label: PHP 8.2
                    alpha: false
                  - value: python_3
                    label: Python 3
                    alpha: false
                  - value: ruby_3
                    label: Ruby 3
                    alpha: true
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Script Languages
      parameters: []
  /api/v1/patchworks/script-templates:
    get:
      summary: List Script Templates
      description: Retrieves a paginated list of script templates. Can be filtered by `name`, `hidden_from_marketplace`, `visible_for_marketplace`, and `private`.
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[hidden_from_marketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by hidden_from_marketplace.
      - name: filter[visible_for_marketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visible_for_marketplace.
      - name: filter[private]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by private.
      - name: filter[visibility]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visibility.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: content, marketplace_company'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScriptTemplatesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      name: string
                      description: string
                      language: string
                      company_id: 0
                      canonical_key: null
                      marketplace_company_id: null
                      tenant_script_version_id: null
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      created_at: '2025-01-15T10:30:00.000000Z'
                    links:
                      first: string
                      last: string
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      per_page: 15
                      to: 1
                      total: 1
                example-2:
                  summary: Three script templates
                  value:
                    data:
                    - id: 112
                      name: Add a Random Sleep
                      description: Adds a random sleep for 1 to 5 seconds
                      language: php_8_1
                      company_id: 5500558
                      canonical_key: null
                      marketplace_company_id: null
                      tenant_script_version_id: null
                      updated_at: '2024-02-02T16:48:53.000000Z'
                      created_at: '2024-02-02T16:48:53.000000Z'
                    - id: 815
                      name: Add line item discount Netsuite Orders (1)
                      description: Add line item discount for Netsuite Sales Orders
                      language: php_8_1
                      company_id: 5500116
                      canonical_key: null
                      marketplace_company_id: null
                      tenant_script_version_id: null
                      updated_at: '2024-09-16T14:39:50.000000Z'
                      created_at: '2024-09-16T14:39:50.000000Z'
                    - id: 153
                      name: Add lineNumber to SalesOrderLineItem and Remove zero qty lines
                      description: Add lineNumber to SalesOrderLineItem and Remove zero qty lines
                      language: php_8_1
                      company_id: 5501182
                      canonical_key: script_5501182_01K99P17BEFK5HNH0MJHB9N5W0
                      marketplace_company_id: null
                      tenant_script_version_id: null
                      updated_at: '2025-11-05T09:37:12.000000Z'
                      created_at: '2024-02-16T19:12:06.000000Z'
                    links:
                      first: 'http://core.wearepatchworks.com/api/v1/patchworks/script-templates?page=1'
                      last: 'http://core.wearepatchworks.com/api/v1/patchworks/script-templates?page=43'
                      prev: null
                      next: 'http://core.wearepatchworks.com/api/v1/patchworks/script-templates?page=2'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 43
                      per_page: 15
                      to: 15
                      total: 638
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Script Templates
  /api/v1/patchworks/script-templates/{script_template}:
    get:
      summary: Get Script Template
      description: Retrieves the details of a specific script template.
      parameters:
      - name: script_template
        in: path
        required: true
        schema:
          type: string
        description: The script template identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[hidden_from_marketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by hidden_from_marketplace.
      - name: filter[visible_for_marketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visible_for_marketplace.
      - name: filter[private]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by private.
      - name: filter[visibility]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visibility.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: content, marketplace_company'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScriptTemplatesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 0
                      name: string
                      description: string
                      language: string
                      company_id: 0
                      canonical_key: null
                      marketplace_company_id: null
                      tenant_script_version_id: null
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      created_at: '2025-01-15T10:30:00.000000Z'
                example-2:
                  summary: Script template details
                  value:
                    data:
                      id: 153
                      name: Add lineNumber to SalesOrderLineItem and Remove zero qty lines
                      description: Add lineNumber to SalesOrderLineItem and Remove zero qty lines
                      language: php_8_1
                      company_id: 5501182
                      canonical_key: script_5501182_01K99P17BEFK5HNH0MJHB9N5W0
                      marketplace_company_id: null
                      tenant_script_version_id: null
                      updated_at: '2025-11-05T09:37:12.000000Z'
                      created_at: '2024-02-16T19:12:06.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Script Templates
    delete:
      summary: Delete Script Template
      description: Permanently deletes a specific script template.
      parameters:
      - name: script_template
        in: path
        required: true
        schema:
          type: string
        description: The script template identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Script Templates
  /api/v1/patchworks/system-templates:
    get:
      summary: List System Templates
      description: 'Retrieves a paginated list of system templates.

        In the Patchworks dashboard, a `system` is known as a `connector`.'
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[hidden_from_marketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by hidden_from_marketplace.
      - name: filter[visible_for_marketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visible_for_marketplace.
      - name: filter[system_type_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by system_type_id.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[private]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by private.
      - name: filter[visibility]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by visibility.
      - name: filter[platformApp]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by platformApp.
      - name: filter[forPlatformApp]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by forPlatformApp.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: systemType, company, publicCompany, marketplaceCompany, logo, authenticationImplementationTemplates.variableTemplates, authenticationImplementationTemplates.authenticationType'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, created_at'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemTemplatesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/patchworks/system-templates
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/patchworks/system-templates?page=1
                      last: https://api.example.com/api/v1/patchworks/system-templates?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - System Templates
    post:
      summary: Create System Template
      description: 'Creates a new system template.

        In the Patchworks dashboard, a `system` is known as a `connector`.'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemTemplatesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      label:
                      - The label field is required.
                      colour:
                      - The colour field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchworksStoreSystemTemplatesRequest'
      tags:
      - System Templates
      parameters: []
  /api/v1/patchworks/system-templates/{system_template}:
    put:
      summary: Update System Template
      description: 'Updates an existing system template.

        In the Patchworks dashboard, a `system` is known as a `connector`.'
      parameters:
      - name: system_template
        in: path
        required: true
        schema:
          type: string
        description: The system template identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemTemplatesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      label:
                      - The label must be a string.
                      colour:
                      - The colour must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchworksUpdateSystemTemplatesRequest'
      tags:
      - System Templates
    delete:
      summary: Delete System Template
      description: 'Permanently deletes a specific system template.

        In the Patchworks dashboard, a `system` is known as a `connector`.'
      parameters:
      - name: system_template
        in: path
        required: true
        schema:
          type: string
        description: The system template identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - System Templates
  /api/v1/patchworks/system-types:
    get:
      summary: List System Types
      description: 'Retrieves a paginated list of system types (such as eCommerce, ERP, and Accounting).

        In the Patchworks dashboard, a `system` is known as a `connector`.'
      parameters:
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: systemTemplates'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchworksListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      label: My Label
                      colour: blue
                      logo_url: example_logo_url
                      version: 1
                      version_name: example_version_name
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      system_type_id: 1
                      protocol: HTTP
                      company_id: 1
                      date_format: example_date_format
                      help_link: example_help_link
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/patchworks/system-types
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/patchworks/system-types?page=1
                      last: https://api.example.com/api/v1/patchworks/system-types?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - System Types
  /api/v1/patchworks/system-types/{system_type}:
    get:
      summary: Get System Type
      description: 'Retrieves the details of a specific system type.

        In the Patchworks dashboard, a `system` is known as a `connector`.'
      parameters:
      - name: system_type
        in: path
        required: true
        schema:
          type: string
        description: The system type identifier.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: systemTemplates'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchworksResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      label: My Label
                      colour: blue
                      logo_url: example_logo_url
                      version: 1
                      version_name: example_version_name
                      rate_limit_unit: second
                      rate_limit_duration: 1
                      system_type_id: 1
                      protocol: HTTP
                      company_id: 1
                      date_format: example_date_format
                      help_link: example_help_link
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - System Types
  /api/v1/payload-metadata:
    get:
      summary: List Payload Metadata
      description: Retrieves a paginated list of payload metadata records. Can be filtered by `id`, `flow_run_id`, `flow_step_id`, and `flow_log_id`.
      parameters:
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[flow_run_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_run_id.
      - name: filter[flow_step_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_step_id.
      - name: filter[flow_log_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_log_id.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at, id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayloadMetadataListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      flow_version_id: 0
                      flow_step_id: 0
                      flow_run_id: string
                      payload_store_reference: string
                      payload_size: 0
                      dropped: false
                    links:
                      first: string
                      last: string
                      prev: null
                      next: null
                    meta:
                      current_page: 0
                      from: 0
                      last_page: 0
                      links: []
                      path: string
                      per_page: 0
                      to: 0
                      total: 0
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Payload Metadata
  /api/v1/payload-metadata/{payload_metadatum}:
    get:
      summary: Get Payload Metadata
      description: Retrieves the details of a specific payload metadata record.
      parameters:
      - name: payload_metadatum
        in: path
        required: true
        schema:
          type: string
        description: The payload metadatum identifier.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[flow_run_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_run_id.
      - name: filter[flow_step_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_step_id.
      - name: filter[flow_log_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_log_id.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at, id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayloadMetadataResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      flow_version_id: 1
                      flow_step_id: 1
                      flow_run_id: 1
                      payload_store_reference: example_payload_store_reference
                      payload_size: example_payload_size
                      dropped: example_dropped
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Payload Metadata
  /api/v1/payload-metadata/{payloadMetadatum}/meta:
    get:
      summary: Get Meta
      description: 'To be confirmed.'
      tags:
      - Payload Metadata
      parameters:
      - name: payloadMetadatum
        in: path
        required: true
        schema:
          type: string
        description: The payloadMetadatum identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/payload-metadata/{payloadMetadatum}/download:
    get:
      summary: Download Payload Metadata
      description: Downloads the payload data for a specific payload metadata record.
      parameters:
      - name: payloadMetadatum
        in: path
        required: true
        schema:
          type: string
        description: The payloadMetadatum identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Payload Metadata
  /api/v1/request-options:
    get:
      summary: List Request Options
      description: 'List all request options.


        ## Pagination


        Pagination is available for this request. Please see the section on using pagination for more details.




        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - type

        - key

        - value

        - requestable_type

        - requestable_id





        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - type

        - key

        - value'
      parameters:
      - name: filter[type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by type.
      - name: filter[key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by key.
      - name: filter[value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by value.
      - name: filter[requestable_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by requestable_type.
      - name: filter[requestable_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by requestable_id.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: type, key, value'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestOptionsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      type: example_type
                      key: example_key
                      value: example_value
                      requestable_type: example_requestable_type
                      requestable_id: 1
                      configurable: example_configurable
                      locked: example_locked
                      required: example_required
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      alias: example_alias
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/request-options
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/request-options?page=1
                      last: https://api.example.com/api/v1/request-options?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Request Options
    post:
      summary: Create Request Option
      description: 'Create a new request option.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | type | string | &#x2611; |

        | key | string | &#x2611; |

        | value | string | &#x2611; |

        | requestable_type | string | &#x2611; |

        | requestable_id | integer | &#x2611; |

        | configurable | | |

        | locked | | |

        | required | | |'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestOptionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      type: example_type
                      key: example_key
                      value: example_value
                      requestable_type: example_requestable_type
                      requestable_id: 1
                      configurable: example_configurable
                      locked: example_locked
                      required: example_required
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      alias: example_alias
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      type:
                      - The type field is required.
                      key:
                      - The key field is required.
                      value:
                      - The value field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestOptionsStoreRequest'
      tags:
      - Request Options
      parameters: []
  /api/v1/request-options/{request_option}:
    get:
      summary: Get Request Option
      description: 'Get a single request option.


        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - type

        - key

        - value

        - requestable_type

        - requestable_id





        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - type

        - key

        - value'
      parameters:
      - name: request_option
        in: path
        required: true
        schema:
          type: string
        description: The request option identifier.
      - name: filter[type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by type.
      - name: filter[key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by key.
      - name: filter[value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by value.
      - name: filter[requestable_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by requestable_type.
      - name: filter[requestable_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by requestable_id.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: type, key, value'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestOptionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      type: example_type
                      key: example_key
                      value: example_value
                      requestable_type: example_requestable_type
                      requestable_id: 1
                      configurable: example_configurable
                      locked: example_locked
                      required: example_required
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      alias: example_alias
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Request Options
    put:
      summary: Update Request Option
      description: 'Update an existing request option.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | type | string | |

        | key | string | |

        | value | string | |'
      parameters:
      - name: request_option
        in: path
        required: true
        schema:
          type: string
        description: The request option identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestOptionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      type: example_type
                      key: example_key
                      value: example_value
                      requestable_type: example_requestable_type
                      requestable_id: 1
                      configurable: example_configurable
                      locked: example_locked
                      required: example_required
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      alias: example_alias
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      type:
                      - The type must be a string.
                      key:
                      - The key must be a string.
                      value:
                      - The value must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestOptionsUpdateRequest'
      tags:
      - Request Options
    delete:
      summary: Delete Request Option
      description: Delete a request option.
      parameters:
      - name: request_option
        in: path
        required: true
        schema:
          type: string
        description: The request option identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Request Options
  /api/v1/scheduled-flows:
    get:
      summary: List Scheduled Flows
      description: Retrieves a paginated list of scheduled flow runs. Can be filtered by `status` and `flow_version_id`.
      parameters:
      - name: filter[status]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by status.
      - name: filter[flow_version_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_version_id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flowVersion, payloadMetadata, flow, virtualEnvironmentVersion, virtualEnvironmentVersion.virtualEnvironment'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: status, created_at, updated_at, flow_version_id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledFlowsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      flow_version_id: 1
                      flow_version: {}
                      virtual_environment_version_id: 1
                      virtual_environment_version: {}
                      payload_metadata_id: 1
                      payload_metadata: {}
                      trigger: API
                      status: Draft
                      flow: {}
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/scheduled-flows
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/scheduled-flows?page=1
                      last: https://api.example.com/api/v1/scheduled-flows?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Scheduled Flows
    delete:
      summary: Delete All
      description: Permanently deletes all scheduled flow runs for the company.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Scheduled Flows
      parameters: []
  /api/v1/scheduled-flows/{flow}/delete:
    delete:
      summary: Delete Scheduled Flow
      description: Permanently deletes all scheduled flow runs for a specific flow.
      parameters:
      - name: flow
        in: path
        required: true
        schema:
          type: string
        description: The flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Scheduled Flows
  /api/v1/scheduled-flows/{scheduled_flow}:
    delete:
      summary: Delete Scheduled Flow
      description: Permanently deletes a specific scheduled flow run.
      parameters:
      - name: scheduled_flow
        in: path
        required: true
        schema:
          type: string
        description: The scheduled flow identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Scheduled Flows
  /api/v1/script-templates/{script_template}/install:
    post:
      summary: Install Script Template
      description: 'Installs a specific script template.'
      parameters:
      - name: script_template
        in: path
        required: true
        schema:
          type: string
        description: The script template identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Script Templates
  /api/v1/script-version-metrics:
    get:
      summary: List Script Version Metrics
      description: Retrieves a paginated list of metrics for one or more script versions. Can be filtered by `interval_start`, `interval_end`, `interval_unit`, and `script_version_ids`.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScriptVersionMetricsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/script-version-metrics
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/script-version-metrics?page=1
                      last: https://api.example.com/api/v1/script-version-metrics?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Script Version Metrics
      parameters: []
  /api/v1/script-versions/{script_version}:
    get:
      summary: Get Script Version
      description: Retrieves the details of a specific script version.
      parameters:
      - name: script_version
        in: path
        required: true
        schema:
          type: string
        description: The script version identifier.
      - name: filter[is_deployed]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by is_deployed.
      - name: filter[deployed_at]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by deployed_at.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: content, script'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScriptVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: string
                      script_id: string
                      name: string
                      version: 0
                      status: string
                      deployment_failure_reason: null
                      last_invoked_on: null
                      created_at: '2025-01-15T10:30:00.000000Z'
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      deployment_failed_at: null
                      deploying: false
                example-2:
                  summary: Script version details
                  value:
                    data:
                      id: 01kk926t8npyay6rcjxjcpj4dw
                      script_id: 01kk926t1j1efjy3e7vrvence0
                      name: v1
                      version: 1
                      status: deployed
                      deployment_failure_reason: null
                      last_invoked_on: null
                      created_at: '2026-03-09T10:27:41.000000Z'
                      deployed_at: '2026-03-09T10:28:05.000000Z'
                      deployment_failed_at: null
                      deploying: false
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Script Versions
    delete:
      summary: Delete Script Version
      description: Permanently deletes a specific script version.
      parameters:
      - name: script_version
        in: path
        required: true
        schema:
          type: string
        description: The script version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Script Versions
  /api/v1/script-versions/{script_version}/upload:
    post:
      summary: Upload Script Version
      description: "Uploads a given script version to your `private` marketplace.\n\nThis operation requires `administrator` permissions. If you are authorising requests with an API key, this request won't work (company-level API keys are associated with manager-level permissions). If you are an `administrator`, you can use OAuth 2 credentials to complete this operation. For more information please see our [Authentication](https://doc.wearepatchworks.com/product-documentation/api-reference/getting-started/authentication#oauth-2-client-credentials) section."
      parameters:
      - name: script_version
        in: path
        required: true
        schema:
          type: string
        description: The script version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: 'Script uploaded'
                  value:
                    message: 'Script uploaded successfully'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScriptVersionsScriptUploadUploadRequest'
      tags:
      - Script Versions
  /api/v1/script-versions/{script_version}/deploy:
    post:
      summary: Deploy Script Version
      description: Deploys a specific script version.
      parameters:
      - name: script_version
        in: path
        required: true
        schema:
          type: string
        description: The script version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Script Versions
  /api/v1/script-versions/{script_version}/invoke:
    post:
      summary: Invoke Script Version
      description: Invokes a specific script version.
      parameters:
      - name: script_version
        in: path
        required: true
        schema:
          type: string
        description: The script version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScriptVersionsInvokeInvokeRequest'
      tags:
      - Script Versions
  /api/v1/script-versions/{script_version}/logs:
    get:
      summary: List Script Version Logs
      description: Retrieves a list of logs for a specific script version.
      parameters:
      - name: script_version
        in: path
        required: true
        schema:
          type: string
        description: The script version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScriptVersionsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - timestamp: '2025-01-15T10:30:00+00:00'
                      text: string
                example-2:
                  summary: Script version logs
                  value:
                    data:
                    - timestamp: '2026-03-09T18:24:49+00:00'
                      text: '{"time":"2026-03-09T18:24:49.609942256Z","level":"INFO","msg":"invoking function"}'
                    - timestamp: '2026-03-09T18:24:31+00:00'
                      text: '{"time":"2026-03-09T18:24:31.061301367Z","level":"INFO","msg":"serving on :8080"}'
                    - timestamp: '2026-03-09T18:24:31+00:00'
                      text: '{"time":"2026-03-09T18:24:31.061154636Z","level":"INFO","msg":"starting function"}'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Script Versions
  /api/v1/scripts:
    get:
      summary: List Scripts
      description: Retrieves a paginated list of scripts. Can be filtered by `name` and `versions.id`.
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[versions.id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by versions.id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: versions, versions.content, latestVersion, latestVersion.content'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: fields[versions]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of versions fields to return. Available: id, script_id, version, name, deployed_at, deployment_failed_at, deploying, deployment_failure_reason'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScriptsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: string
                      script_template_id: null
                      name: string
                      description: string
                      language: string
                      ai_created: false
                    links:
                      first: string
                      last: string
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      per_page: 15
                      to: 1
                      total: 1
                example-2:
                  summary: Three scripts
                  value:
                    data:
                    - id: 01kk926t1j1efjy3e7vrvence0
                      script_template_id: null
                      name: Add field to orders payload
                      description: Add field to orders payload
                      language: php_8_2
                      ai_created: true
                    - id: 01kagdsxcy77gvtvv5yvxtjrgh
                      script_template_id: 4752
                      name: Customer sync - regional changes - DE
                      description: Regional customer data changes - DE
                      language: php_8_2
                      ai_created: false
                    - id: 01kagd4yn0ejq2x1fm9t9f06v9
                      script_template_id: 4751
                      name: Customer sync - regional changes - FR
                      description: Regional data changes - France
                      language: php_8_2
                      ai_created: false
                    links:
                      first: 'http://core.wearepatchworks.com/api/v1/scripts?page=1'
                      last: 'http://core.wearepatchworks.com/api/v1/scripts?page=1'
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      per_page: 15
                      to: 5
                      total: 5
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Scripts
    post:
      summary: Create Script
      description: Creates a new script.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScriptsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: string
                      script_template_id: null
                      name: string
                      description: string
                      language: string
                      ai_created: false
                example-2:
                  summary: Created script
                  value:
                    data:
                      id: 01kagd4yn0ejq2x1fm9t9f06v9
                      script_template_id: 4751
                      name: Customer sync - regional changes - FR
                      description: Regional data changes - France
                      language: php_8_2
                      ai_created: false
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      description:
                      - The description must be a string.
                      language:
                      - The language field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScriptsStoreRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  name: string
                  description: string
                  language: string
                  ai_created: false
              example-2:
                summary: Create script
                value:
                  name: Customer sync - regional changes - FR
                  description: Regional data changes - France
                  language: php_8_2
                  ai_created: false
      tags:
      - Scripts
      parameters: []
  /api/v1/scripts/{script}:
    get:
      summary: Get Script
      description: Retrieves the details of a specific script.
      parameters:
      - name: script
        in: path
        required: true
        schema:
          type: string
        description: The script identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[versions.id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by versions.id.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: versions, versions.content, latestVersion, latestVersion.content'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: fields[versions]
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of versions fields to return. Available: id, script_id, version, name, deployed_at, deployment_failed_at, deploying, deployment_failure_reason'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScriptsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: string
                      script_template_id: null
                      name: string
                      description: string
                      language: string
                      ai_created: false
                example-2:
                  summary: Script details
                  value:
                    data:
                      id: 01kagd4yn0ejq2x1fm9t9f06v9
                      script_template_id: 4751
                      name: Customer sync - regional changes - FR
                      description: Regional data changes - France
                      language: php_8_2
                      ai_created: false
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Scripts
    put:
      summary: Update Script
      description: Updates an existing script.
      parameters:
      - name: script
        in: path
        required: true
        schema:
          type: string
        description: The script identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScriptsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: string
                      script_template_id: null
                      name: string
                      description: string
                      language: string
                      ai_created: false
                example-2:
                  summary: Updated script
                  value:
                    data:
                      id: 01kagd4yn0ejq2x1fm9t9f06v9
                      script_template_id: 4751
                      name: Customer sync - regional changes - FR
                      description: Regional data changes - France
                      language: php_8_2
                      ai_created: false
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      description:
                      - The description must be a string.
                      language:
                      - The language must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScriptsUpdateRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  name: string
                  description: string
                  language: string
                  value: string
              example-2:
                summary: Update script
                value:
                  name: Customer sync - regional changes - FR
                  description: Regional data changes - France
                  language: php_8_2
                  value: string
      tags:
      - Scripts
    delete:
      summary: Delete Script
      description: Permanently deletes a specific script.
      parameters:
      - name: script
        in: path
        required: true
        schema:
          type: string
        description: The script identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Scripts
  /api/v1/scripts/{script}/script-versions:
    get:
      summary: List Script Versions
      description: Retrieves a paginated list of versions for a specific script. Can be filtered by `is_deployed` and `deployed_at`.
      parameters:
      - name: script
        in: path
        required: true
        schema:
          type: string
        description: The script identifier.
      - name: filter[is_deployed]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by is_deployed.
      - name: filter[deployed_at]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by deployed_at.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: content, script'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScriptVersionsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: string
                      script_id: string
                      name: string
                      version: 0
                      status: string
                      deployment_failure_reason: null
                      last_invoked_on: null
                      created_at: '2025-01-15T10:30:00.000000Z'
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      deployment_failed_at: null
                      deploying: false
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: string
                      last: string
                      prev: null
                      next: null
                example-2:
                  summary: Two script versions
                  value:
                    data:
                    - id: 01kk926t8npyay6rcjxjcpj4dw
                      script_id: 01kk926t1j1efjy3e7vrvence0
                      name: v1
                      version: 1
                      status: deployed
                      deployment_failure_reason: null
                      last_invoked_on: null
                      created_at: '2026-03-09T10:27:41.000000Z'
                      deployed_at: '2026-03-09T10:28:05.000000Z'
                      deployment_failed_at: null
                      deploying: false
                    - id: 01kk927qxhxn0fqqkt0rs440nh
                      script_id: 01kk926t1j1efjy3e7vrvence0
                      name: v2
                      version: 2
                      status: deployed
                      deployment_failure_reason: null
                      last_invoked_on: null
                      created_at: '2026-03-09T10:28:12.000000Z'
                      deployed_at: '2026-03-09T10:28:22.000000Z'
                      deployment_failed_at: null
                      deploying: false
                    links:
                      first: 'http://core.wearepatchworks.com/api/v1/scripts/01kk926t1j1efjy3e7vrvence0/script-versions?page=1'
                      last: 'http://core.wearepatchworks.com/api/v1/scripts/01kk926t1j1efjy3e7vrvence0/script-versions?page=1'
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      per_page: 15
                      to: 2
                      total: 2
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Script Versions
    post:
      summary: Create Script Version
      description: Creates a new version for a specific script.
      parameters:
      - name: script
        in: path
        required: true
        schema:
          type: string
        description: The script identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScriptVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: string
                      script_id: string
                      name: string
                      version: 0
                      status: string
                      deployment_failure_reason: null
                      last_invoked_on: null
                      created_at: '2025-01-15T10:30:00.000000Z'
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      deployment_failed_at: null
                      deploying: false
                example-2:
                  summary: Created script version
                  value:
                    data:
                      id: 01kk926t8npyay6rcjxjcpj4dw
                      script_id: 01kk926t1j1efjy3e7vrvence0
                      name: v1
                      version: 1
                      status: deployed
                      deployment_failure_reason: null
                      last_invoked_on: null
                      created_at: '2026-03-09T10:27:41.000000Z'
                      deployed_at: '2026-03-09T10:28:05.000000Z'
                      deployment_failed_at: null
                      deploying: false
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      content:
                      - The content field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScriptsStoreScriptVersionsRequest'
      tags:
      - Script Versions
  /api/v1/system-templates/{systemTemplate}:
    post:
      summary: Install System Template
      description: 'Installs a specific system template into the current company.'
      parameters:
      - name: systemTemplate
        in: path
        required: true
        schema:
          type: string
        description: The systemTemplate identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemTemplatesInstallRequest'
      tags:
      - System Templates
  /api/v1/systems:
    get:
      summary: List Systems
      description: 'Lists all systems. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Pagination


        Pagination is available for this request. Please see the section on using pagination for more details.


        ## Available Includes


        These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.


        - logo

        - logo_count

        - logoExists

        - systemType

        - systemType_count

        - systemTypeExists

        - connectors

        - connectors_count

        - connectorsExists

        - connectors.authenticationImplementation

        - endpoints

        - endpoints_count

        - endpointsExists

        - authenticationImplementations

        - authenticationImplementations_count

        - authenticationImplementationsExists

        - authenticationImplementations.variables

        - authenticationImplementations.authenticationType

        - variables

        - variables_count

        - variablesExists

        - systemTemplate

        - systemTemplate_count

        - systemTemplateExists

        - systemTemplate.company

        - systemTemplate.marketplaceCompany



        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - name

        - withUpdatable

        - fromMarketplace

        - fromApp



        ## Available Fields


        These are the fields that can be requested to limit the data returned. Please see the section on using fields for more details.


        - systems.id

        - systems.name

        - systems.label

        - systems.colour

        - systems.system_template_id

        - systems.version

        - systems.version_name

        - systems.system_type_id

        - systems.protocol

        - systems.date_format

        - systems.help_link

        - systems.created_at

        - systems.updated_at

        - systems.rate_limit_unit

        - systems.rate_limit_duration



        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - name'
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[canonical_key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by canonical_key.
      - name: filter[withUpdatable]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by withUpdatable.
      - name: filter[fromMarketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by fromMarketplace.
      - name: filter[fromApp]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by fromApp.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: logo, systemType, connectors, connectors.authenticationImplementation, endpoints, authenticationImplementations.variables, authenticationImplementations.authenticationType, variables, systemTemplate.company, systemTemplate.marketplaceCompany, endpoints.preScriptVersion, endpoints.postScriptVersion, endpoints.preScriptVersion.script, endpoints.postScriptVersion.script'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - &id020
                      id: 0
                      name: string
                      label: string
                      colour: string
                      version: 0
                      version_name: string
                      rate_limit_unit: string
                      rate_limit_duration: 0
                      system_type_id: 0
                      protocol: string
                      system_template_id: 0
                      date_format: string
                      canonical_key: string
                      help_link: null
                    links: &id022
                      first: string
                      last: string
                      prev: null
                      next: null
                    meta: &id023
                      current_page: 0
                      from: 0
                      last_page: 0
                      links: []
                      path: string
                      per_page: 0
                      to: 0
                      total: 0
                example-2:
                  summary: Two systems
                  value:
                    data:
                    - &id021
                      id: 2
                      name: Customer Magic
                      label: Customer Magic
                      colour: ffffff
                      version: 1
                      version_name: '1'
                      rate_limit_unit: second
                      rate_limit_duration: 100
                      system_type_id: 2
                      protocol: HTTP
                      system_template_id: 2702
                      date_format: U
                      canonical_key: system_5503465_01KK232K8742PGNV03HS9MA31W
                      help_link: null
                    - id: 1
                      name: Product Magic
                      label: Inventory Magic
                      colour: ffffff
                      version: 1
                      version_name: '1'
                      rate_limit_unit: second
                      rate_limit_duration: 100
                      system_type_id: 10
                      protocol: HTTP
                      system_template_id: 31
                      date_format: U
                      canonical_key: null
                      help_link: null
                    links:
                      first: https://core.wearepatchworks.com/api/v1/systems?page=1
                      last: https://core.wearepatchworks.com/api/v1/systems?page=1
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      links:
                      - url: null
                        label: '&laquo; Previous'
                        active: false
                      - url: https://core.wearepatchworks.com/api/v1/systems?page=1
                        label: '1'
                        active: true
                      - url: null
                        label: Next &raquo;
                        active: false
                      path: https://core.wearepatchworks.com/api/v1/systems
                      per_page: 15
                      to: 0
                      total: 0
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
    post:
      summary: Create System
      description: 'Creates a new system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | name | string | &#x2611; |

        | version_name | string | &#x2611; |

        | label | string | &#x2611; |

        | colour | string | &#x2611; |

        | logo | | &#x2611; |

        | rate_limit_unit | string | &#x2611; |

        | rate_limit_duration | integer | &#x2611; |

        | system_type_id | | &#x2611; |

        | protocol | string | &#x2611; |

        | system_template_id | integer | |

        | date_format | string | &#x2611; |

        | help_link | string | |'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id020
                example-2:
                  summary: Newly created connector
                  value:
                    data: *id021
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      version_name:
                      - The version name field is required.
                      label:
                      - The label field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemsStoreRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  flow:
                    name: string
                    label: string
                    colour: string
                    system_type_id: 0
                    rate_limit_unit: string
                    rate_limit_duration: 0
                    protocol: string
                    date_format: string
              example-2:
                summary: Create connector
                value:
                  flow:
                    name: Customer Magic
                    label: Customer Magic
                    colour: ffffff
                    system_type_id: 2
                    rate_limit_unit: second
                    rate_limit_duration: 100
                    protocol: HTTP
                    date_format: U
      tags:
      - Systems
      parameters: []
  /api/v1/systems/{system}:
    get:
      summary: Get System
      description: 'Retrieves details for a given system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.

        ## Available Includes


        These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.


        - logo

        - logo_count

        - logoExists

        - systemType

        - systemType_count

        - systemTypeExists

        - connectors

        - connectors_count

        - connectorsExists

        - connectors.authenticationImplementation

        - endpoints

        - endpoints_count

        - endpointsExists

        - authenticationImplementations

        - authenticationImplementations_count

        - authenticationImplementationsExists

        - authenticationImplementations.variables

        - authenticationImplementations.authenticationType

        - variables

        - variables_count

        - variablesExists

        - systemTemplate

        - systemTemplate_count

        - systemTemplateExists

        - systemTemplate.company

        - systemTemplate.marketplaceCompany



        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - name

        - withUpdatable

        - fromMarketplace

        - fromApp



        ## Available Fields


        These are the fields that can be requested to limit the data returned. Please see the section on using fields for more details.


        - systems.id

        - systems.name

        - systems.label

        - systems.colour

        - systems.system_template_id

        - systems.version

        - systems.version_name

        - systems.system_type_id

        - systems.protocol

        - systems.date_format

        - systems.help_link

        - systems.created_at

        - systems.updated_at

        - systems.rate_limit_unit

        - systems.rate_limit_duration



        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - name'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[canonical_key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by canonical_key.
      - name: filter[withUpdatable]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by withUpdatable.
      - name: filter[fromMarketplace]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by fromMarketplace.
      - name: filter[fromApp]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by fromApp.
      - name: filter[id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by id.
      - name: filter[,]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by ,.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: logo, systemType, connectors, connectors.authenticationImplementation, endpoints, authenticationImplementations.variables, authenticationImplementations.authenticationType, variables, systemTemplate.company, systemTemplate.marketplaceCompany, endpoints.preScriptVersion, endpoints.postScriptVersion, endpoints.preScriptVersion.script, endpoints.postScriptVersion.script'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id020
                example-2:
                  summary: Connector details
                  value:
                    data: *id021
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
    put:
      summary: Update System
      description: 'Updates an existing system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | name | string | |

        | version_name | string | |

        | label | string | |

        | colour | string | |

        | rate_limit_unit | string | |

        | rate_limit_duration | integer | |

        | system_type_id | | |

        | protocol | string | |

        | system_template_id | integer | |

        | logo | | |

        | date_format | string | |

        | help_link | string | |'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id020
                example-2:
                  summary: Updated connector
                  value:
                    data:
                      id: 2
                      name: Customer Magic
                      label: Customer Magic
                      colour: ffffff
                      version: 1
                      version_name: '1'
                      rate_limit_unit: minute
                      rate_limit_duration: 60
                      system_type_id: 2
                      protocol: HTTP
                      system_template_id: 2702
                      date_format: U
                      canonical_key: system_5503465_01KK232K8742PGNV03HS9MA31W
                      help_link: null
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      version_name:
                      - The version name must be a string.
                      label:
                      - The label must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemsUpdateRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  flow:
                    name: string
                    label: string
                    colour: string
                    rate_limit_unit: string
                    rate_limit_duration: 0
              example-2:
                summary: Update rate limit
                value:
                  flow:
                    name: Customer Magic
                    label: Customer Magic
                    colour: ffffff
                    rate_limit_unit: minute
                    rate_limit_duration: 60
      tags:
      - Systems
    delete:
      summary: Delete System
      description: 'Deletes a given system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Successful deletion
                  value: &id026
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
  /api/v1/systems/export:
    post:
      summary: Export System
      description: 'Exports a given system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | system_id | integer | &#x2611; |'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    metadata:
                      company_name: string
                      system_name: string
                      exported_at: '2025-01-15T10:30:00.000000Z'
                      exported_by: string
                      system_id: 0
                      system_version: null
                      import_summary:
                        setup_required:
                          connectors_needing_config: 0
                          auth_implementations_needing_credentials: 0
                          variables_needing_values: 0
                        dependencies: []
                        imported_resources:
                          systems_imported: 0
                          endpoints: 0
                          connectors: 0
                        next_steps: []
                    system:
                      id: 0
                      name: string
                      label: string
                      version: 0
                    scripts: []
                example-2:
                  summary: Exported system
                  value:
                    metadata:
                      company_name: OpenAPI Sample Company
                      system_name: Customer Magic
                      exported_at: '2026-03-09T13:23:57+00:00'
                      exported_by: demo.account@wearepatchworks.com
                      system_id: 2
                      system_version: null
                      import_summary:
                        setup_required:
                          connectors_needing_config: 4
                          auth_implementations_needing_credentials: 1
                          variables_needing_values: 3
                        dependencies: []
                        imported_resources:
                          systems_imported: 1
                          endpoints: 2
                          connectors: 4
                        next_steps:
                        - Configure Customer Data - Sandbox connector
                        - Configure French Customer Data connector
                        - Configure German Customer Data connector
                        - Configure United Kingdom Customer Data connector
                    system:
                      id: 2
                      name: Customer Magic
                      label: Customer Magic
                      colour: ffffff
                      version: 1
                      version_name: '1'
                      rate_limit_unit: second
                      rate_limit_duration: 100
                      system_type_id: 2
                      protocol: HTTP
                    scripts: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemsExportExportRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  system_id: 0
              example-2:
                summary: Export system
                value:
                  system_id: 2
      tags:
      - Systems
      parameters: []
  /api/v1/systems/import:
    post:
      summary: Import System
      description: 'To be confirmed. Note: In the Patchworks dashboard, a `system` is known as a `connector`. Import for import.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | system | | &#x2611; |

        | metadata | | &#x2611; |

        | as_marketplace | | |'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                    system_id: 0
                    system_name: string
                    import_summary:
                      setup_required:
                        connectors_needing_config: 0
                        auth_implementations_needing_credentials: 0
                        variables_needing_values: 0
                      dependencies: []
                      imported_resources:
                        systems_imported: 0
                        endpoints: 0
                        connectors: 0
                      next_steps: []
                example-2:
                  summary: Imported system
                  value:
                    message: System imported successfully
                    system_id: 7
                    system_name: Customer Magic
                    import_summary:
                      setup_required:
                        connectors_needing_config: 4
                        auth_implementations_needing_credentials: 1
                        variables_needing_values: 3
                      dependencies: []
                      imported_resources:
                        systems_imported: 1
                        endpoints: 2
                        connectors: 4
                      next_steps:
                      - Configure Customer Data - Sandbox connector
                      - Configure French Customer Data connector
                      - Configure German Customer Data connector
                      - Configure United Kingdom Customer Data connector
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemsImportImportRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  system: string
                  metadata: string
                  as_marketplace: false
              example-2:
                summary: Import system
                value:
                  system: '{"name":"Customer Magic","version":1}'
                  metadata: '{}'
                  as_marketplace: false
      tags:
      - Systems
      parameters: []
  /api/v1/systems/import-postman:
    post:
      summary: Postman Import
      description: 'Creates a system from a Postman import. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | collection_url | string | |

        | collection_file | | |

        | precog | | |'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemsPostmanImportImportPostmanRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  collection_url: string
                  precog: false
              example-2:
                summary: Import from Postman URL
                value:
                  collection_url: https://api.getpostman.com/collections/example-id
                  precog: false
      tags:
      - Systems
      parameters: []
  /api/v1/systems/{system}/upload:
    post:
      summary: Upload System
      description: 'Uploads a system to your private marketplace. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | private | | |'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemsUploadUploadRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  private: false
              example-2:
                summary: Upload to marketplace
                value:
                  private: true
      tags:
      - Systems
  /api/v1/systems/{system}/endpoints:
    get:
      summary: List System Endpoints
      description: 'Retrieves a paginated list of endpoints for a given system. Can be filtered by `name`, `direction`, `http_method`, and other criteria. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Pagination


        Pagination is available for this request. Please see the section on using pagination for more details.


        ## Available Includes


        These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.


        - connector

        - connector_count

        - connectorExists

        - system

        - system_count

        - systemExists

        - entityType

        - entityType_count

        - entityTypeExists

        - entityType.fieldTags

        - endpointTemplate

        - endpointTemplate_count

        - endpointTemplateExists

        - variables

        - variables_count

        - variablesExists

        - authenticationImplementations

        - authenticationImplementations_count

        - authenticationImplementationsExists

        - fieldTags

        - fieldTags_count

        - fieldTagsExists

        - filters

        - filters_count

        - filtersExists

        - endpointSchema

        - endpointSchema_count

        - endpointSchemaExists

        - preScriptVersion

        - preScriptVersion_count

        - preScriptVersionExists

        - preScriptVersion.script

        - postScriptVersion

        - postScriptVersion_count

        - postScriptVersionExists

        - postScriptVersion.script



        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - name

        - system_id

        - entity_type_id

        - endpoint

        - direction

        - http_method

        - endpoint_template_id

        - data_type

        - deprecated_at

        - data_path

        - body_format



        ## Available Fields


        These are the fields that can be requested to limit the data returned. Please see the section on using fields for more details.


        - endpoints.id

        - endpoints.name

        - endpoints.entity_type_id

        - endpoints.direction

        - endpoints.http_method



        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - name

        - system_id

        - entity_type_id

        - endpoint

        - direction

        - http_method

        - endpoint_template_id

        - data_type

        - deprecated_at

        - data_path

        - body_format'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[system_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by system_id.
      - name: filter[entity_type_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by entity_type_id.
      - name: filter[endpoint]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by endpoint.
      - name: filter[direction]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by direction.
      - name: filter[http_method]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by http_method.
      - name: filter[endpoint_template_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by endpoint_template_id.
      - name: filter[data_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by data_type.
      - name: filter[deprecated_at]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by deprecated_at.
      - name: filter[data_path]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by data_path.
      - name: filter[body_format]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by body_format.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: connector, system, entityType, entityType.fieldTags, endpointTemplate, variables, authenticationImplementations, fieldTags, filters, endpointSchema, preScriptVersion.script, postScriptVersion.script'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, system_id, entity_type_id, endpoint, direction, http_method, endpoint_template_id, data_type, deprecated_at, data_path, body_format'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - &id024
                      id: 0
                      name: string
                      system_id: 0
                      entity_type_id: 0
                      endpoint: string
                      http_method: string
                      data_type: string
                      pagination_method: null
                      deprecated_at: null
                      direction: string
                      returns_multiple_records: false
                      pre_script_version_id: null
                      post_script_version_id: null
                      data_path: null
                      body_format: string
                      raw_body: string
                      modified: false
                      help_link: null
                      disable_header_addition: 0
                      response_encoding: string
                    links: *id022
                    meta: *id023
                example-2:
                  summary: Two endpoints
                  value:
                    data:
                    - &id025
                      id: 3
                      name: Retrieve all customers
                      system_id: 2
                      entity_type_id: 47
                      endpoint: https://parseapi.back4app.com/classes/{{region}}
                      http_method: GET
                      data_type: json
                      pagination_method: Link Header
                      deprecated_at: null
                      direction: Receive
                      returns_multiple_records: false
                      pre_script_version_id: null
                      post_script_version_id: null
                      data_path: null
                      body_format: none
                      raw_body: ''
                      modified: true
                      help_link: null
                      disable_header_addition: 0
                      response_encoding: none
                    - id: 2
                      name: Retrieve customers
                      system_id: 2
                      entity_type_id: 47
                      endpoint: https://parseapi.back4app.com/classes/{{region}}
                      http_method: GET
                      data_type: json
                      pagination_method: null
                      deprecated_at: null
                      direction: Receive
                      returns_multiple_records: false
                      pre_script_version_id: null
                      post_script_version_id: null
                      data_path: results
                      body_format: raw
                      raw_body: ''
                      modified: true
                      help_link: null
                      disable_header_addition: 0
                      response_encoding: none
                    links:
                      first: https://core.wearepatchworks.com/api/v1/systems/2/endpoints?page=1
                      last: https://core.wearepatchworks.com/api/v1/systems/2/endpoints?page=1
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      links:
                      - url: null
                        label: '&laquo; Previous'
                        active: false
                      - url: https://core.wearepatchworks.com/api/v1/systems/2/endpoints?page=1
                        label: '1'
                        active: true
                      - url: null
                        label: Next &raquo;
                        active: false
                      path: https://core.wearepatchworks.com/api/v1/systems/2/endpoints
                      per_page: 15
                      to: 0
                      total: 0
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
    post:
      summary: Create System Endpoint
      description: 'Creates a new endpoint for a given system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | name | string | &#x2611; |

        | entity_type_id | integer | |

        | endpoint | string | &#x2611; |

        | direction | string | &#x2611; |

        | returns_multiple_records | | &#x2611; |

        | http_method | string | &#x2611; |

        | data_type | string | &#x2611; |

        | pagination_method | string | |

        | schema | string | |

        | endpoint_template_id | integer | |

        | data_path | string | |

        | body_format | string | |

        | raw_body | string | |

        | deprecated_at | | |

        | help_link | string | |

        | disable_header_addition | | |

        | response_encoding | string | |'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id024
                example-2:
                  summary: Newly created endpoint
                  value:
                    data: *id025
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      entity_type_id:
                      - The entity type id must be an integer.
                      endpoint:
                      - The endpoint field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemsStoreEndpointsRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  entity_type_id: 0
                  endpoint: string
                  direction: string
                  http_method: string
                  data_type: string
                  returns_multiple_records: false
              example-2:
                summary: Create endpoint
                value:
                  entity_type_id: 47
                  endpoint: https://parseapi.back4app.com/classes/{{region}}
                  direction: Receive
                  http_method: GET
                  data_type: json
                  returns_multiple_records: false
      tags:
      - Systems
  /api/v1/systems/{system}/endpoints/ingest-wsdl:
    post:
      summary: Wsdl Ingest
      description: 'To be confirmed. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | wsdl_url | string | |

        | update_existing | | &#x2611; |

        | wsdl_file | | |'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemsWsdlIngestIngestWsdlRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  wsdl_url: string
                  update_existing: false
              example-2:
                summary: Ingest WSDL from URL
                value:
                  wsdl_url: https://api.example.com/service.wsdl
                  update_existing: false
      tags:
      - Systems
  /api/v1/systems/{system}/endpoints/{endpoint}:
    get:
      summary: Get System Endpoint
      description: 'Retrieves the details for a given system endpoint. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Available Includes


        These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.


        - connector

        - connector_count

        - connectorExists

        - system

        - system_count

        - systemExists

        - entityType

        - entityType_count

        - entityTypeExists

        - entityType.fieldTags

        - endpointTemplate

        - endpointTemplate_count

        - endpointTemplateExists

        - variables

        - variables_count

        - variablesExists

        - authenticationImplementations

        - authenticationImplementations_count

        - authenticationImplementationsExists

        - fieldTags

        - fieldTags_count

        - fieldTagsExists

        - filters

        - filters_count

        - filtersExists

        - endpointSchema

        - endpointSchema_count

        - endpointSchemaExists

        - preScriptVersion

        - preScriptVersion_count

        - preScriptVersionExists

        - preScriptVersion.script

        - postScriptVersion

        - postScriptVersion_count

        - postScriptVersionExists

        - postScriptVersion.script



        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - name

        - system_id

        - entity_type_id

        - endpoint

        - direction

        - http_method

        - endpoint_template_id

        - data_type

        - deprecated_at

        - data_path

        - body_format



        ## Available Fields


        These are the fields that can be requested to limit the data returned. Please see the section on using fields for more details.


        - endpoints.id

        - endpoints.name

        - endpoints.entity_type_id

        - endpoints.direction

        - endpoints.http_method



        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - name

        - system_id

        - entity_type_id

        - endpoint

        - direction

        - http_method

        - endpoint_template_id

        - data_type

        - deprecated_at

        - data_path

        - body_format'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[system_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by system_id.
      - name: filter[entity_type_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by entity_type_id.
      - name: filter[endpoint]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by endpoint.
      - name: filter[direction]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by direction.
      - name: filter[http_method]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by http_method.
      - name: filter[endpoint_template_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by endpoint_template_id.
      - name: filter[data_type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by data_type.
      - name: filter[deprecated_at]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by deprecated_at.
      - name: filter[data_path]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by data_path.
      - name: filter[body_format]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by body_format.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: connector, system, entityType, entityType.fieldTags, endpointTemplate, variables, authenticationImplementations, fieldTags, filters, endpointSchema, preScriptVersion.script, postScriptVersion.script'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, system_id, entity_type_id, endpoint, direction, http_method, endpoint_template_id, data_type, deprecated_at, data_path, body_format'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id024
                example-2:
                  summary: Endpoint details
                  value:
                    data: *id025
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
    put:
      summary: Update System Endpoint
      description: 'Updates an existing system endpoint. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | name | string | |

        | entity_type_id | integer | |

        | endpoint | string | |

        | direction | string | |

        | returns_multiple_records | | |

        | http_method | string | |

        | data_type | string | |

        | pagination_method | string | |

        | schema | string | |

        | endpoint_template_id | integer | |

        | data_path | string | |

        | body_format | string | |

        | raw_body | string | |

        | deprecated_at | | |

        | help_link | string | |

        | pre_script_version_id | string | |

        | post_script_version_id | string | |

        | disable_header_addition | | |

        | response_encoding | string | |'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id024
                example-2:
                  summary: Updated endpoint
                  value:
                    data:
                      id: 3
                      name: Retrieve all customers
                      system_id: 2
                      entity_type_id: 47
                      endpoint: https://parseapi.back4app.com/classes/{{region}}
                      http_method: GET
                      data_type: json
                      pagination_method: Cursor
                      deprecated_at: null
                      direction: Receive
                      returns_multiple_records: false
                      pre_script_version_id: null
                      post_script_version_id: null
                      data_path: null
                      body_format: none
                      raw_body: ''
                      modified: true
                      help_link: null
                      disable_header_addition: 0
                      response_encoding: none
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      entity_type_id:
                      - The entity type id must be an integer.
                      endpoint:
                      - The endpoint must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemsUpdateEndpointsRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  entity_type_id: 0
                  endpoint: string
                  direction: string
                  http_method: string
                  data_type: string
              example-2:
                summary: Update pagination method
                value:
                  entity_type_id: 47
                  endpoint: https://parseapi.back4app.com/classes/{{region}}
                  direction: Receive
                  http_method: GET
                  data_type: json
                  pagination_method: Cursor
      tags:
      - Systems
    delete:
      summary: Delete System Endpoint
      description: 'Deletes an existing system endpoint. Note: In the Patchworks dashboard, a `system` is known as a `connector`.'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Successful deletion
                  value: *id026
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
  /api/v1/systems/{system}/endpoints/{endpoint}/clone:
    post:
      summary: Clone System Endpoint
      description: 'Clones a given system endpoint. Note: In the Patchworks dashboard, a `system` is known as a `connector`.'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      - name: endpoint
        in: path
        required: true
        schema:
          type: string
        description: The endpoint identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Endpoint cloned
                  value:
                    message: Action completed successfully.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
  /api/v1/systems/{system}/endpoint-metrics:
    get:
      summary: List System Endpoint Metrics
      description: 'Retrieves metrics for endpoints associated with a given system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | interval_start | | |

        | interval_end | | |

        | interval_unit | string | |

        | model_type | string | |

        | key | string | |

        | keys | | |

        | managed_companies | | |'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      name: string
                      direction: string
                      http_method: string
                      total_runs: 0
                      success_rate: 0.0
                    links: *id022
                    meta: *id023
                example-2:
                  summary: Endpoint metrics
                  value:
                    data:
                    - model_type: connector
                      model_id: '3'
                      total: 239960
                      key: cpu_time
                      interval_start: '2026-03-01 00:00:00'
                      interval_end: '2026-03-31 23:59:59'
                      connector:
                        id: 3
                        authentication_implementation_id: 2
                        name: Customer Data - Sandbox
                        rate_limit_unit: second
                        rate_limit_duration: 100
                        date_format: U
                        timezone: Europe/London
                        connection_pool_id: 1
                    - model_type: connector
                      model_id: '4'
                      total: 154196
                      key: cpu_time
                      interval_start: '2026-03-01 00:00:00'
                      interval_end: '2026-03-31 23:59:59'
                      connector:
                        id: 4
                        authentication_implementation_id: 2
                        name: French Customer Data
                        rate_limit_unit: second
                        rate_limit_duration: 100
                        date_format: U
                        timezone: Europe/London
                        connection_pool_id: null
                    - model_type: connector
                      model_id: '5'
                      total: 165362
                      key: cpu_time
                      interval_start: '2026-03-01 00:00:00'
                      interval_end: '2026-03-31 23:59:59'
                      connector:
                        id: 5
                        authentication_implementation_id: 2
                        name: German Customer Data
                        rate_limit_unit: second
                        rate_limit_duration: 100
                        date_format: U
                        timezone: Europe/London
                        connection_pool_id: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
  /api/v1/systems/{system}/authentication-implementations:
    get:
      summary: List System Authentication Implementations
      description: 'Lists all authentication implementations for a given system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Pagination


        Pagination is available for this request. Please see the section on using pagination for more details.


        ## Available Includes


        These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.


        - system

        - system_count

        - systemExists

        - system.systemType

        - authenticationType

        - authenticationType_count

        - authenticationTypeExists

        - variables

        - variables_count

        - variablesExists

        - endpoints

        - endpoints_count

        - endpointsExists

        - preScriptVersion

        - preScriptVersion_count

        - preScriptVersionExists

        - preScriptVersion.script

        - postScriptVersion

        - postScriptVersion_count

        - postScriptVersionExists

        - postScriptVersion.script



        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - name

        - endpoint

        - method

        - additional_endpoint_1

        - additional_endpoint_2

        - system_id

        - authentication_type_id

        - version





        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - name

        - endpoint

        - method

        - additional_endpoint_1

        - additional_endpoint_2

        - system_id

        - authentication_type_id

        - version'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[endpoint]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by endpoint.
      - name: filter[method]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by method.
      - name: filter[additional_endpoint_1]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by additional_endpoint_1.
      - name: filter[additional_endpoint_2]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by additional_endpoint_2.
      - name: filter[system_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by system_id.
      - name: filter[authentication_type_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by authentication_type_id.
      - name: filter[version]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by version.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: system, system.systemType, authenticationType, variables, endpoints, preScriptVersion.script, postScriptVersion.script'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, endpoint, method, additional_endpoint_1, additional_endpoint_2, system_id, authentication_type_id, version'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationImplementationsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - &id027
                      id: 0
                      system_id: 0
                      name: string
                      method: string
                      endpoint: string
                      data_type: string
                      body_format: string
                      created_at: string
                      updated_at: string
                    links: *id022
                    meta: *id023
                example-2:
                  summary: Authentication implementations
                  value:
                    data:
                    - id: 2
                      name: Basic
                      endpoint: https://parseapi.back4app.com/classes/{{region}}
                      method: POST
                      additional_endpoint_1: null
                      additional_endpoint_2: null
                      authentication_type_id: 1
                      authentication_implementation_template_id: 4287
                      system_id: 2
                      body_format: raw
                      data_type: json
                      pre_script_version_id: null
                      post_script_version_id: null
                      timeout: 30
                      modified: true
                      help_link: null
                    links:
                      first: http://core.wearepatchworks.com/api/v1/systems/2/authentication-implementations?page=1
                      last: http://core.wearepatchworks.com/api/v1/systems/2/authentication-implementations?page=1
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      links:
                      - url: null
                        label: '&laquo; Previous'
                        active: false
                      - url: http://core.wearepatchworks.com/api/v1/systems/2/authentication-implementations?page=1
                        label: '1'
                        active: true
                      - url: null
                        label: Next &raquo;
                        active: false
                      path: http://core.wearepatchworks.com/api/v1/systems/2/authentication-implementations
                      per_page: 15
                      to: 1
                      total: 1
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
    post:
      summary: Create System Authentication Implementation
      description: 'Creates a new authentication implementation for a given system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | name | string | &#x2611; |

        | endpoint | string | &#x2611; |

        | method | string | &#x2611; |

        | data_type | | |

        | body_format | | |

        | additional_endpoint_1 | string | |

        | additional_endpoint_2 | string | |

        | timeout | integer | |

        | authentication_type_id | | &#x2611; |

        | help_link | string | |'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationImplementationsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id027
                example-2:
                  summary: Newly created auth implementation
                  value:
                    data: &id028
                      id: 1
                      system_id: 2
                      name: OAuth2 Token
                      method: POST
                      endpoint: https://api.custommagic.com/oauth/token
                      data_type: json
                      body_format: none
                      created_at: '2026-03-05T10:13:55.000000Z'
                      updated_at: '2026-03-05T10:13:55.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      endpoint:
                      - The endpoint must be a string.
                      method:
                      - The method field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemsStoreAuthenticationImplementationsRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  name: string
                  method: string
                  endpoint: string
                  data_type: string
                  body_format: string
              example-2:
                summary: Create auth implementation
                value:
                  name: OAuth2 Token
                  method: POST
                  endpoint: https://api.custommagic.com/oauth/token
                  data_type: json
                  body_format: none
      tags:
      - Systems
  /api/v1/systems/{system}/authentication-implementations/{authentication_implementation}:
    get:
      summary: Get System Authentication Implementation
      description: 'Retrieves a given authentication implementation for a system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Available Includes


        These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.


        - system

        - system_count

        - systemExists

        - system.systemType

        - authenticationType

        - authenticationType_count

        - authenticationTypeExists

        - variables

        - variables_count

        - variablesExists

        - endpoints

        - endpoints_count

        - endpointsExists

        - preScriptVersion

        - preScriptVersion_count

        - preScriptVersionExists

        - preScriptVersion.script

        - postScriptVersion

        - postScriptVersion_count

        - postScriptVersionExists

        - postScriptVersion.script



        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - name

        - endpoint

        - method

        - additional_endpoint_1

        - additional_endpoint_2

        - system_id

        - authentication_type_id

        - version





        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - name

        - endpoint

        - method

        - additional_endpoint_1

        - additional_endpoint_2

        - system_id

        - authentication_type_id

        - version'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      - name: authentication_implementation
        in: path
        required: true
        schema:
          type: string
        description: The authentication implementation identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[endpoint]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by endpoint.
      - name: filter[method]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by method.
      - name: filter[additional_endpoint_1]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by additional_endpoint_1.
      - name: filter[additional_endpoint_2]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by additional_endpoint_2.
      - name: filter[system_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by system_id.
      - name: filter[authentication_type_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by authentication_type_id.
      - name: filter[version]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by version.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: system, system.systemType, authenticationType, variables, endpoints, preScriptVersion.script, postScriptVersion.script'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, endpoint, method, additional_endpoint_1, additional_endpoint_2, system_id, authentication_type_id, version'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationImplementationsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id027
                example-2:
                  summary: Auth implementation details
                  value:
                    data:
                      id: 2
                      name: Basic
                      endpoint: https://parseapi.back4app.com/classes/{{region}}
                      method: POST
                      additional_endpoint_1: null
                      additional_endpoint_2: null
                      authentication_type_id: 1
                      authentication_implementation_template_id: 4287
                      system_id: 2
                      body_format: raw
                      data_type: json
                      pre_script_version_id: null
                      post_script_version_id: null
                      timeout: 30
                      modified: true
                      help_link: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
    put:
      summary: Update System Authentication Implementation
      description: 'Updates an existing authentication implementation for a system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | name | string | |

        | endpoint | string | |

        | method | string | |

        | data_type | | |

        | body_format | | |

        | additional_endpoint_1 | string | |

        | additional_endpoint_2 | string | |

        | timeout | integer | |

        | authentication_type_id | | |

        | pre_script_version_id | string | |

        | post_script_version_id | string | |

        | help_link | string | |






        ## Available Includes


        These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.


        - system

        - system_count

        - systemExists

        - system.systemType

        - authenticationType

        - authenticationType_count

        - authenticationTypeExists

        - variables

        - variables_count

        - variablesExists

        - endpoints

        - endpoints_count

        - endpointsExists

        - preScriptVersion

        - preScriptVersion_count

        - preScriptVersionExists

        - preScriptVersion.script

        - postScriptVersion

        - postScriptVersion_count

        - postScriptVersionExists

        - postScriptVersion.script



        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - name

        - endpoint

        - method

        - additional_endpoint_1

        - additional_endpoint_2

        - system_id

        - authentication_type_id

        - version





        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - name

        - endpoint

        - method

        - additional_endpoint_1

        - additional_endpoint_2

        - system_id

        - authentication_type_id

        - version'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      - name: authentication_implementation
        in: path
        required: true
        schema:
          type: string
        description: The authentication implementation identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationImplementationsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id027
                example-2:
                  summary: Updated auth implementation
                  value:
                    data: *id028
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name must be a string.
                      endpoint:
                      - The endpoint must be a string.
                      method:
                      - The method must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemsUpdateAuthenticationImplementationsRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  name: string
                  method: string
                  endpoint: string
                  data_type: string
                  body_format: string
              example-2:
                summary: Update auth implementation
                value:
                  name: OAuth2 Token
                  method: POST
                  endpoint: https://api.custommagic.com/oauth/token
                  data_type: json
                  body_format: none
      tags:
      - Systems
    delete:
      summary: Delete System Authentication Implementation
      description: 'Deletes a given authentication implementation for a system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      - name: authentication_implementation
        in: path
        required: true
        schema:
          type: string
        description: The authentication implementation identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Successful deletion
                  value: *id026
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
  /api/v1/systems/{system}/variables:
    get:
      summary: List System Variables
      description: 'List all variables for a given system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Pagination


        Pagination is available for this request. Please see the section on using pagination for more details.




        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - label

        - key

        - value





        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - label

        - key

        - value'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      - name: filter[label]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by label.
      - name: filter[key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by key.
      - name: filter[value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by value.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: label, key, value'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - &id029
                      id: 0
                      label: string
                      key: string
                      value: string
                      secret: false
                      created_at: string
                      updated_at: string
                    links: *id022
                    meta: *id023
                example-2:
                  summary: Connector variables
                  value:
                    data:
                    - id: 01kk7fmwtydra8qnfsn5cx4hgk
                      key: id
                      value: null
                      label: ID
                      secret: false
                      locked: false
                      modified: true
                      pivot:
                        configurable: true
                        modified: false
                        required: true
                        advanced: false
                        alias: null
                        id: 131
                    links:
                      first: http://core.wearepatchworks.com/api/v1/systems/2/variables?page=1
                      last: http://core.wearepatchworks.com/api/v1/systems/2/variables?page=1
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      links:
                      - url: null
                        label: '&laquo; Previous'
                        active: false
                      - url: http://core.wearepatchworks.com/api/v1/systems/2/variables?page=1
                        label: '1'
                        active: true
                      - url: null
                        label: Next &raquo;
                        active: false
                      path: http://core.wearepatchworks.com/api/v1/systems/2/variables
                      per_page: 15
                      to: 1
                      total: 1
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
    post:
      summary: Create System Variable
      description: 'Creates a new variable for a given system. Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | label | string | &#x2611; |

        | key | string | &#x2611; |

        | value | string | |

        | secret | | |

        | pivot.alias | string | |

        | pivot.configurable | | |

        | pivot.required | | |

        | pivot.advanced | | |'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: *id029
                example-2:
                  summary: Newly created variable
                  value:
                    data:
                      id: 1
                      label: API Base URL
                      key: api_base_url
                      value: https://api.custommagic.com/v2
                      secret: false
                      created_at: '2026-03-05T10:13:55.000000Z'
                      updated_at: '2026-03-05T10:13:55.000000Z'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemsStoreVariablesRequest'
            examples:
              example-1:
                summary: Examples
                value:
                  label: string
                  key: string
                  value: string
                  secret: false
              example-2:
                summary: Create variable
                value:
                  label: API Base URL
                  key: api_base_url
                  value: https://api.custommagic.com/v2
                  secret: false
      tags:
      - Systems
  /api/v1/systems/{system}/variables/{variable}:
    delete:
      summary: Delete System Variable
      description: 'Deletes a given system variable. Note: In the Patchworks dashboard, a `system` is known as a `connector`.'
      parameters:
      - name: system
        in: path
        required: true
        schema:
          type: string
        description: The system identifier.
      - name: variable
        in: path
        required: true
        schema:
          type: string
        description: The variable identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: string
                example-2:
                  summary: Successful deletion
                  value: *id026
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Systems
  /api/v1/tracked-data:
    get:
      summary: List Tracked Data
      description: Retrieves a paginated list of tracked data records. Can be filtered by `flow_id`, `flow_run_id`, `step_id`, `entity_type_id`, `value`, `created_before`, and `created_after`.
      parameters:
      - name: filter[flow_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_id.
      - name: filter[flow_run_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by flow_run_id.
      - name: filter[step_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by step_id.
      - name: filter[entity_type_id]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by entity_type_id.
      - name: filter[tracked_data_store_reference]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by tracked_data_store_reference.
      - name: filter[value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by value.
      - name: filter[created_before]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by created_before.
      - name: filter[created_after]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by created_after.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: flow, flowRun, flowStep, entityType'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: created_at, id'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrackedDataListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      flow_id: 1
                      flow_run_id: 1
                      step_id: 1
                      entity_type_id: 1
                      tracked_data_store_reference: example_tracked_data_store_reference
                      value: example_value
                      direction: Send
                      sent_count: 5
                      received_count: 5
                      success: {}
                      flow: {}
                      flow_step: {}
                      flow_run: {}
                      entity_type: {}
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/tracked-data
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/tracked-data?page=1
                      last: https://api.example.com/api/v1/tracked-data?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Tracked Data
  /api/v1/tracked-data/entity-types:
    get:
      summary: List Entity Types
      description: Retrieves a paginated list of entity types found in tracked data.
      tags:
      - Tracked Data
      parameters:
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: endpoints, fieldTags, systemFields'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
  /api/v1/tracked-data/search:
    get:
      summary: Search Tracked Data
      description: Searches tracked data.
      tags:
      - Tracked Data
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      parameters: []
  /api/v1/transforms:
    get:
      summary: List Transforms
      description: Retrieves a paginated list of available transform functions.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransformsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/transforms
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/transforms?page=1
                      last: https://api.example.com/api/v1/transforms?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Transforms
      parameters: []
  /api/v1/variables:
    get:
      summary: List Variables
      description: 'Retrieves a paginated list of global variables for a specific connector. Can be filtered by `label`, `key`, and `value`.

        Note: In the Patchworks dashboard, a `system` is known as a `connector`.'
      parameters:
      - name: filter[label]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by label.
      - name: filter[key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by key.
      - name: filter[value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by value.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: label, key, value'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 1
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      locked: example_locked
                      configurable: example_configurable
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      modified: example_modified
                      pivot: example_pivot
                      required: true
                      advanced: true
                      alias: example_alias
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/variables
                      per_page: 25
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/variables?page=1
                      last: https://api.example.com/api/v1/variables?page=1
                      prev: null
                      next: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Variables
    post:
      summary: Create Variable
      description: 'Creates a new global variable for a connector.

        Note: In the Patchworks dashboard, a `system` is known as a `connector`.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | label | string | &#x2611; |

        | key | string | &#x2611; |

        | value | string | |

        | secret | | |

        | locked | | |'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      locked: example_locked
                      configurable: example_configurable
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      modified: example_modified
                      pivot: example_pivot
                      required: true
                      advanced: true
                      alias: example_alias
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      label:
                      - The label field is required.
                      key:
                      - The key field is required.
                      value:
                      - The value must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VariablesStoreRequest'
      tags:
      - Variables
      parameters: []
  /api/v1/variables/{variable}:
    get:
      summary: Get Variable
      description: 'Retrieves the details of a specific global variable.


        ## Available Filters


        These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.


        - label

        - key

        - value





        ## Available Sorts


        These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.


        - label

        - key

        - value'
      parameters:
      - name: variable
        in: path
        required: true
        schema:
          type: string
        description: The variable identifier.
      - name: filter[label]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by label.
      - name: filter[key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by key.
      - name: filter[value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by value.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: label, key, value'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      locked: example_locked
                      configurable: example_configurable
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      modified: example_modified
                      pivot: example_pivot
                      required: true
                      advanced: true
                      alias: example_alias
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Variables
    put:
      summary: Update Variable
      description: 'Updates an existing global variable.


        ## Validation Rules


        These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements


        | Field | Type | Required |

        |---|---|---|

        | label | string | |

        | key | string | |

        | value | string | |

        | configurable | | |'
      parameters:
      - name: variable
        in: path
        required: true
        schema:
          type: string
        description: The variable identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      locked: example_locked
                      configurable: example_configurable
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      modified: example_modified
                      pivot: example_pivot
                      required: true
                      advanced: true
                      alias: example_alias
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      label:
                      - The label must be a string.
                      key:
                      - The key must be a string.
                      value:
                      - The value must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VariablesUpdateRequest'
      tags:
      - Variables
    delete:
      summary: Delete Variable
      description: Permanently deletes a specific global variable.
      parameters:
      - name: variable
        in: path
        required: true
        schema:
          type: string
        description: The variable identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Variables
  /api/v1/virtual-environment-versions/{virtual_environment_version}/flow-priorities:
    get:
      summary: List Virtual Environment Version Flow Priorities
      description: Retrieves a paginated list of flow priorities for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentVersionsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      virtual_environment_version_id: 0
                      flow_id: 0
                      priority: 0
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    links:
                      first: string
                      last: string
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      per_page: 15
                      to: 1
                      total: 1
                example-2:
                  summary: Two flow priorities
                  value:
                    data:
                    - id: 1
                      virtual_environment_version_id: 2
                      flow_id: 1
                      priority: 4
                      updated_at: '2026-03-09T19:39:07.000000Z'
                      created_at: '2026-03-09T19:39:07.000000Z'
                    - id: 2
                      virtual_environment_version_id: 2
                      flow_id: 2
                      priority: 2
                      updated_at: '2026-03-09T19:39:18.000000Z'
                      created_at: '2026-03-09T19:39:18.000000Z'
                    links:
                      first: 'http://core.wearepatchworks.com/api/v1/virtual-environment-versions/2/flow-priorities?page=1'
                      last: 'http://core.wearepatchworks.com/api/v1/virtual-environment-versions/2/flow-priorities?page=1'
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      per_page: 15
                      to: 2
                      total: 2
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environment Versions
    post:
      summary: Create Virtual Environment Version Flow Priority
      description: Creates a new flow priority for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      flow_id: 1
                      priority: 1
                      model_type: example_model_type
                      original_model_id: 1
                      replacement_model_id: 1
                      type: example_type
                      key: example_key
                      value: example_value
                      fallback: example_fallback
                      date_format: example_date_format
                      secret: example_secret
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      version: 1
                      virtual_environment_id: 1
                      virtual_environment: {}
                      status: Draft
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      deployed_by: []
                      notes: []
                      manifests: []
                      variables: []
                      counts: example_counts
                      user_id: 1
                      user: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualEnvironmentVersionsStoreFlowPrioritiesRequest'
      tags:
      - Virtual Environment Versions
  /api/v1/virtual-environment-versions/{virtual_environment_version}/flow-priorities/{flow_priority}:
    put:
      summary: Update Virtual Environment Version Flow Priority
      description: Updates an existing flow priority for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      - name: flow_priority
        in: path
        required: true
        schema:
          type: string
        description: The flow priority identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      flow_id: 1
                      priority: 1
                      model_type: example_model_type
                      original_model_id: 1
                      replacement_model_id: 1
                      type: example_type
                      key: example_key
                      value: example_value
                      fallback: example_fallback
                      date_format: example_date_format
                      secret: example_secret
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      version: 1
                      virtual_environment_id: 1
                      virtual_environment: {}
                      status: Draft
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      deployed_by: []
                      notes: []
                      manifests: []
                      variables: []
                      counts: example_counts
                      user_id: 1
                      user: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualEnvironmentVersionsUpdateFlowPrioritiesRequest'
      tags:
      - Virtual Environment Versions
    delete:
      summary: Delete Virtual Environment Version Flow Priority
      description: Permanently deletes a specific flow priority for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      - name: flow_priority
        in: path
        required: true
        schema:
          type: string
        description: The flow priority identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environment Versions
  /api/v1/virtual-environment-versions/{virtual_environment_version}/manifests:
    get:
      summary: List Virtual Environment Version Manifests
      description: Retrieves a paginated list of component replacement rules for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentVersionsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data: []
                    links:
                      first: string
                      last: string
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: null
                      last_page: 1
                      per_page: 15
                      to: null
                      total: 0
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environment Versions
    post:
      summary: Create Virtual Environment Version Manifest
      description: Creates a new component replacement rule for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      flow_id: 1
                      priority: 1
                      model_type: example_model_type
                      original_model_id: 1
                      replacement_model_id: 1
                      type: example_type
                      key: example_key
                      value: example_value
                      fallback: example_fallback
                      date_format: example_date_format
                      secret: example_secret
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      version: 1
                      virtual_environment_id: 1
                      virtual_environment: {}
                      status: Draft
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      deployed_by: []
                      notes: []
                      manifests: []
                      variables: []
                      counts: example_counts
                      user_id: 1
                      user: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      model_type:
                      - The model type field is required.
                      original_model_id:
                      - The original model id field is required.
                      replacement_model_id:
                      - The replacement model id field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualEnvironmentVersionsStoreManifestsRequest'
      tags:
      - Virtual Environment Versions
  /api/v1/virtual-environment-versions/{virtual_environment_version}/manifests/{manifest}:
    get:
      summary: Get Virtual Environment Version Manifest
      description: Retrieves the details of a specific component replacement rule for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      - name: manifest
        in: path
        required: true
        schema:
          type: string
        description: The manifest identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      flow_id: 1
                      priority: 1
                      model_type: example_model_type
                      original_model_id: 1
                      replacement_model_id: 1
                      type: example_type
                      key: example_key
                      value: example_value
                      fallback: example_fallback
                      date_format: example_date_format
                      secret: example_secret
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      version: 1
                      virtual_environment_id: 1
                      virtual_environment: {}
                      status: Draft
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      deployed_by: []
                      notes: []
                      manifests: []
                      variables: []
                      counts: example_counts
                      user_id: 1
                      user: {}
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environment Versions
    put:
      summary: Update Virtual Environment Version Manifest
      description: Updates an existing component replacement rule for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      - name: manifest
        in: path
        required: true
        schema:
          type: string
        description: The manifest identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentVersionsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      flow_id: 1
                      priority: 1
                      model_type: example_model_type
                      original_model_id: 1
                      replacement_model_id: 1
                      type: example_type
                      key: example_key
                      value: example_value
                      fallback: example_fallback
                      date_format: example_date_format
                      secret: example_secret
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      version: 1
                      virtual_environment_id: 1
                      virtual_environment: {}
                      status: Draft
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      deployed_by: []
                      notes: []
                      manifests: []
                      variables: []
                      counts: example_counts
                      user_id: 1
                      user: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      model_type:
                      - The model type must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualEnvironmentVersionsUpdateManifestsRequest'
      tags:
      - Virtual Environment Versions
    delete:
      summary: Delete Virtual Environment Version Manifest
      description: Permanently deletes a specific component replacement rule for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      - name: manifest
        in: path
        required: true
        schema:
          type: string
        description: The manifest identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environment Versions
  /api/v1/virtual-environment-versions/{virtual_environment_version}/variables:
    get:
      summary: List Virtual Environment Version Variables
      description: Retrieves a paginated list of variables for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      - name: filter[label]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by label.
      - name: filter[key]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by key.
      - name: filter[value]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by value.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: label, key, value'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      virtual_environment_version_id: 0
                      type: string
                      value: string
                      fallback: null
                      key: string
                      date_format: null
                      secret: 0
                    links:
                      first: string
                      last: string
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      per_page: 15
                      to: 1
                      total: 1
                example-2:
                  summary: One variable
                  value:
                    data:
                    - id: 1
                      virtual_environment_version_id: 13
                      type: string
                      value: bar
                      fallback: null
                      key: foo
                      date_format: null
                      secret: 0
                    links:
                      first: 'http://core.wearepatchworks.com/api/v1/virtual-environment-versions/13/variables?page=1'
                      last: 'http://core.wearepatchworks.com/api/v1/virtual-environment-versions/13/variables?page=1'
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      per_page: 15
                      to: 1
                      total: 1
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environment Versions
    post:
      summary: Create Virtual Environment Version Variable
      description: Creates a new variable for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      locked: example_locked
                      configurable: example_configurable
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      modified: example_modified
                      pivot: example_pivot
                      required: true
                      advanced: true
                      alias: example_alias
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      type:
                      - The type field is required.
                      key:
                      - The key field is required.
                      fallback:
                      - The fallback must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualEnvironmentVersionsStoreVariablesRequest'
      tags:
      - Virtual Environment Versions
  /api/v1/virtual-environment-versions/{virtual_environment_version}/variables/{variable}:
    put:
      summary: Update Virtual Environment Version Variable
      description: Updates an existing variable for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      - name: variable
        in: path
        required: true
        schema:
          type: string
        description: The variable identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariablesResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      label: My Label
                      key: example_key
                      value: example_value
                      secret: example_secret
                      locked: example_locked
                      configurable: example_configurable
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      modified: example_modified
                      pivot: example_pivot
                      required: true
                      advanced: true
                      alias: example_alias
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      type:
                      - The type must be a string.
                      key:
                      - The key must be a string.
                      fallback:
                      - The fallback must be a string.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualEnvironmentVersionsUpdateVariablesRequest'
      tags:
      - Virtual Environment Versions
    delete:
      summary: Delete Virtual Environment Version Variable
      description: Permanently deletes a specific variable for a specific virtual environment version.
      parameters:
      - name: virtual_environment_version
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment version identifier.
      - name: variable
        in: path
        required: true
        schema:
          type: string
        description: The variable identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environment Versions
  /api/v1/virtual-environments:
    get:
      summary: List Virtual Environments
      description: Retrieves a paginated list of virtual environments.
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by type.
      - name: filter[status]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by status.
      - name: filter[hasDeployedVersion]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by hasDeployedVersion.
      - name: filter[labelled]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results by label `id`.'
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: versions, firstVersion, firstVersion.user, deployments, deployedVersion.variables, deployments.flowVersion, deployments.flowVersion.flow, deployments.enabledBy, deployments.user, deployments.package, packageDeployments.user, packageDeployments.package, labels'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      name: string
                      description: string
                      type: string
                      flows: []
                      is_deployed: true
                      created_at: string
                    links:
                      first: string
                      last: string
                      prev: null
                      next: null
                    meta:
                      current_page: 0
                      from: 0
                      last_page: 0
                      links: []
                      path: string
                      per_page: 0
                      to: 0
                      total: 0
                example-2:
                  summary: Six virtual environments
                  value:
                    data:
                    - id: 1
                      name: France (FR) Test
                      description: France (FR) Test
                      type: TEST
                      flows: []
                      is_deployed: false
                      created_at: '2026-03-09T23:32:54.000000Z'
                      labels: []
                    - id: 2
                      name: France (FR) Live
                      description: France (FR) Live
                      type: LIVE
                      flows:
                      - Sync Product Data (UK)
                      is_deployed: true
                      created_at: '2026-03-09T23:33:08.000000Z'
                      labels: []
                    - id: 3
                      name: Germany (DE) Test
                      description: Germany (DE) Test
                      type: TEST
                      flows: []
                      is_deployed: false
                      created_at: '2026-03-09T23:34:37.000000Z'
                      labels: []
                    - id: 4
                      name: Germany (DE) LIVE
                      description: Germany (DE) Live
                      type: LIVE
                      flows:
                      - Sync Product Data (UK)
                      is_deployed: true
                      created_at: '2026-03-09T23:34:40.000000Z'
                      labels:
                      - id: '01jkabcdefgh1234567890abcd'
                        name: Staging
                        colour: yellow_inverted
                    - id: 6
                      name: United Kingdom (UK) Test
                      description: United Kingdom (UK) Test
                      type: TEST
                      flows: []
                      is_deployed: false
                      created_at: '2026-03-09T23:36:12.000000Z'
                      labels: []
                    - id: 7
                      name: United Kingdom (UK) Live
                      description: United Kingdom (UK) Live
                      type: LIVE
                      flows: []
                      is_deployed: false
                      created_at: '2026-03-09T23:36:16.000000Z'
                      labels: []
                    links:
                      first: https://core.wearepatchworks.com/api/v1/virtual-environments?page=1
                      last: https://core.wearepatchworks.com/api/v1/virtual-environments?page=1
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      links:
                      - url: null
                        label: '&laquo; Previous'
                        active: false
                      - url: https://core.wearepatchworks.com/api/v1/virtual-environments?page=1
                        label: '1'
                        active: true
                      - url: null
                        label: Next &raquo;
                        active: false
                      path: https://core.wearepatchworks.com/api/v1/virtual-environments
                      per_page: 15
                      to: 6
                      total: 6
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environments
    post:
      summary: Create Virtual Environment
      description: Creates a new virtual environment.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      notes: example_notes
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      description: A description of the resource
                      type: example_type
                      deployments: []
                      versions: []
                      versions_count: 5
                      first_version: example_first_version
                      deployed_version: example_deployed_version
                      flows: example_flows
                      is_deployed: true
                      deployments_count: 5
                      pivot: []
                      package_deployments: []
                      labels: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      description:
                      - The description must be a string.
                      labels.*.id:
                      - The labels * id field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualEnvironmentsStoreRequest'
      tags:
      - Virtual Environments
      parameters: []
  /api/v1/virtual-environments/{virtual_environment}:
    get:
      summary: Get Virtual Environment
      description: Retrieves the details of a specific virtual environment.
      parameters:
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by type.
      - name: filter[status]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by status.
      - name: filter[hasDeployedVersion]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by hasDeployedVersion.
      - name: filter[labelled]
        in: query
        required: false
        schema:
          type: string
        description: 'Filter results by label `id`.'
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: versions, firstVersion, firstVersion.user, deployments, deployedVersion.variables, deployments.flowVersion, deployments.flowVersion.flow, deployments.enabledBy, deployments.user, deployments.package, packageDeployments.user, packageDeployments.package, labels'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 0
                      name: string
                      description: string
                      type: string
                      flows: []
                      is_deployed: false
                      created_at: '2025-01-15T10:30:00.000000Z'
                example-2:
                  summary: Virtual environment details
                  value:
                    data:
                      id: 1
                      name: French Data (TEST)
                      description: French Data
                      type: TEST
                      flows:
                      - Sync Customer Data (France)
                      - Prototyping Flow
                      - Prototyping Flow
                      - Prototyping Flow
                      - Sample Flow 1
                      - Sync Customer Data (France)
                      - Sync Customer Data (Sandbox)
                      is_deployed: true
                      created_at: '2026-03-05T10:13:55.000000Z'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environments
    put:
      summary: Update Virtual Environment
      description: Updates an existing virtual environment.
      parameters:
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      notes: example_notes
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      description: A description of the resource
                      type: example_type
                      deployments: []
                      versions: []
                      versions_count: 5
                      first_version: example_first_version
                      deployed_version: example_deployed_version
                      flows: example_flows
                      is_deployed: true
                      deployments_count: 5
                      pivot: []
                      package_deployments: []
                      labels: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      name:
                      - The name field is required.
                      description:
                      - The description must be a string.
                      labels.*.id:
                      - The labels * id field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualEnvironmentsUpdateRequest'
      tags:
      - Virtual Environments
    delete:
      summary: Delete Virtual Environment
      description: Permanently deletes a specific virtual environment.
      parameters:
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environments
  /api/v1/virtual-environments/{virtual_environment}/copy:
    post:
      summary: Copy Virtual Environment
      description: Creates a copy of a specific virtual environment.
      parameters:
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environments
  /api/v1/virtual-environments/{virtual_environment}/versions:
    get:
      summary: List Virtual Environment Versions
      description: Retrieves a paginated list of versions for a specific virtual environment.
      parameters:
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentsListResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      version: 0
                      virtual_environment_id: 0
                      status: string
                      deployed_at: null
                      notes: null
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      user_id: 0
                    links:
                      first: string
                      last: string
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      per_page: 15
                      to: 1
                      total: 1
                example-2:
                  summary: Two virtual environment versions
                  value:
                    data:
                    - id: 1
                      version: 1
                      virtual_environment_id: 1
                      virtual_environment:
                        id: 1
                        name: French Data (TEST)
                        description: French Data
                        type: TEST
                        deployed_version:
                          id: 1
                          version: 1
                          virtual_environment_id: 1
                          status: Deployed
                          deployed_at: '2026-03-05 10:14:14'
                          deployed_by:
                            id: 5500822
                            name: Demo User
                            email: demo.account@wearepatchworks.com
                            email_verified_at: null
                            two_factor_secret: null
                            two_factor_recovery_codes: null
                            two_factor_confirmed_at: null
                            last_two_factor_challenge: null
                            created_at: '2023-07-04T09:17:05.000000Z'
                            updated_at: '2026-03-05T09:49:37.000000Z'
                            company_id: 0
                            acting_company_id: 5503465
                            bi_company_id: null
                            telephone: null
                            mobile: null
                            deleted_at: null
                          notes: null
                          created_at: '2026-03-05T10:13:55.000000Z'
                          updated_at: '2026-03-05T10:14:14.000000Z'
                          user_id: 5500822
                          user:
                            id: 5500822
                            company_id: 0
                            acting_company_id: 5503465
                            bi_company_id: null
                            name: Demo User
                            email: demo.account@wearepatchworks.com
                            email_verified_at: null
                            telephone: null
                            mobile: null
                            created_at: '2023-07-04T09:17:05.000000Z'
                            updated_at: '2026-03-05T09:49:37.000000Z'
                            deleted_at: null
                        flows:
                        - Sync Customer Data (France)
                        - Prototyping Flow
                        - Sample Flow 1
                        - Sync Customer Data (Sandbox)
                        is_deployed: true
                        created_at: '2026-03-05T10:13:55.000000Z'
                      status: Deployed
                      deployed_at: '2026-03-05 10:14:14'
                      deployed_by:
                        id: 5500822
                        name: Demo User
                        email: demo.account@wearepatchworks.com
                        email_verified_at: null
                        two_factor_secret: null
                        two_factor_recovery_codes: null
                        two_factor_confirmed_at: null
                        last_two_factor_challenge: null
                        created_at: '2023-07-04T09:17:05.000000Z'
                        updated_at: '2026-03-05T09:49:37.000000Z'
                        company_id: 0
                        acting_company_id: 5503465
                        bi_company_id: null
                        telephone: null
                        mobile: null
                        deleted_at: null
                      notes: null
                      created_at: '2026-03-05T10:13:55.000000Z'
                      updated_at: '2026-03-05T10:14:14.000000Z'
                      user_id: 5500822
                      user:
                        id: 5500822
                        company_id: 0
                        acting_company_id: 5503465
                        bi_company_id: null
                        name: Demo User
                        email: demo.account@wearepatchworks.com
                        email_verified_at: null
                        telephone: null
                        mobile: null
                        created_at: '2023-07-04T09:17:05.000000Z'
                        updated_at: '2026-03-05T09:49:37.000000Z'
                        deleted_at: null
                    - id: 2
                      version: 2
                      virtual_environment_id: 1
                      status: Draft
                      deployed_at: null
                      deployed_by:
                        id: 5500822
                        name: Demo User
                        email: demo.account@wearepatchworks.com
                        email_verified_at: null
                        two_factor_secret: null
                        two_factor_recovery_codes: null
                        two_factor_confirmed_at: null
                        last_two_factor_challenge: null
                        created_at: '2023-07-04T09:17:05.000000Z'
                        updated_at: '2026-03-05T09:49:37.000000Z'
                        company_id: 0
                        acting_company_id: 5503465
                        bi_company_id: null
                        telephone: null
                        mobile: null
                        deleted_at: null
                      notes: null
                      created_at: '2026-03-05T10:14:14.000000Z'
                      updated_at: '2026-03-05T10:14:14.000000Z'
                      user_id: 5500822
                      user:
                        id: 5500822
                        company_id: 0
                        acting_company_id: 5503465
                        bi_company_id: null
                        name: Demo User
                        email: demo.account@wearepatchworks.com
                        email_verified_at: null
                        telephone: null
                        mobile: null
                        created_at: '2023-07-04T09:17:05.000000Z'
                        updated_at: '2026-03-05T09:49:37.000000Z'
                        deleted_at: null
                    links:
                      first: 'http://core.wearepatchworks.com/api/v1/virtual-environments/1/versions?page=1'
                      last: 'http://core.wearepatchworks.com/api/v1/virtual-environments/1/versions?page=1'
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      per_page: 15
                      to: 2
                      total: 2
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environments
    post:
      summary: Create Virtual Environment Version
      description: Creates a new version for a specific virtual environment.
      parameters:
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      notes: example_notes
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      description: A description of the resource
                      type: example_type
                      deployments: []
                      versions: []
                      versions_count: 5
                      first_version: example_first_version
                      deployed_version: example_deployed_version
                      flows: example_flows
                      is_deployed: true
                      deployments_count: 5
                      pivot: []
                      package_deployments: []
                      labels: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualEnvironmentsStoreVersionsRequest'
      tags:
      - Virtual Environments
  /api/v1/virtual-environments/{virtual_environment}/versions/{version}:
    get:
      summary: Get Virtual Environment Version
      description: Retrieves the details of a specific version for a specific virtual environment.
      parameters:
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 0
                      version: 0
                      virtual_environment_id: 0
                      status: string
                      deployed_at: null
                      notes: null
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      user_id: 0
                example-2:
                  summary: Virtual environment version details
                  value:
                    data:
                      id: 1
                      version: 1
                      virtual_environment_id: 1
                      status: Deployed
                      deployed_at: '2026-03-05 10:14:14'
                      deployed_by:
                        id: 5500822
                        name: Demo User
                        email: demo.account@wearepatchworks.com
                        email_verified_at: null
                        two_factor_secret: null
                        two_factor_recovery_codes: null
                        two_factor_confirmed_at: null
                        last_two_factor_challenge: null
                        created_at: '2023-07-04T09:17:05.000000Z'
                        updated_at: '2026-03-05T09:49:37.000000Z'
                        company_id: 0
                        acting_company_id: 5503465
                        bi_company_id: null
                        telephone: null
                        mobile: null
                        deleted_at: null
                      notes: null
                      created_at: '2026-03-05T10:13:55.000000Z'
                      updated_at: '2026-03-05T10:14:14.000000Z'
                      user_id: 5500822
                      user:
                        id: 5500822
                        company_id: 0
                        acting_company_id: 5503465
                        bi_company_id: null
                        name: Demo User
                        email: demo.account@wearepatchworks.com
                        email_verified_at: null
                        telephone: null
                        mobile: null
                        created_at: '2023-07-04T09:17:05.000000Z'
                        updated_at: '2026-03-05T09:49:37.000000Z'
                        deleted_at: null
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environments
    put:
      summary: Update Virtual Environment Version
      description: Updates an existing version for a specific virtual environment.
      parameters:
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualEnvironmentsResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                      id: 1
                      notes: example_notes
                      deployed_at: '2025-01-15T10:30:00.000000Z'
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                      name: My Example
                      description: A description of the resource
                      type: example_type
                      deployments: []
                      versions: []
                      versions_count: 5
                      first_version: example_first_version
                      deployed_version: example_deployed_version
                      flows: example_flows
                      is_deployed: true
                      deployments_count: 5
                      pivot: []
                      package_deployments: []
                      labels: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualEnvironmentsUpdateVersionsRequest'
      tags:
      - Virtual Environments
    delete:
      summary: Delete Virtual Environment Version
      description: Permanently deletes a specific version for a specific virtual environment.
      parameters:
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: Action completed successfully.
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environments
  /api/v1/virtual-environments/{virtual_environment}/versions/{version}/copy:
    post:
      summary: Copy Virtual Environment Version
      description: Creates a copy of a specific version for a specific virtual environment.
      parameters:
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environments
  /api/v1/virtual-environments/{virtual_environment}/versions/{version}/deploy:
    post:
      summary: Deploy Virtual Environment Version
      description: Deploys a specific version of a specific virtual environment.
      parameters:
      - name: virtual_environment
        in: path
        required: true
        schema:
          type: string
        description: The virtual environment identifier.
      - name: version
        in: path
        required: true
        schema:
          type: string
        description: The version identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
      tags:
      - Virtual Environments
  /api/v1/{tenant}/{callback}/{environment?}:
    post:
      summary: Create General
      description: 'To be confirmed.'
      tags:
      - General
      parameters:
      - name: tenant
        in: path
        required: true
        schema:
          type: string
        description: The tenant identifier.
      - name: callback
        in: path
        required: true
        schema:
          type: string
        description: The callback identifier.
      - name: environment
        in: path
        required: true
        schema:
          type: string
        description: The environment identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/{tenant}/{callback}/{environment}:
    get:
      summary: Callback General
      description: 'To be confirmed.'
      parameters:
      - name: tenant
        in: path
        required: true
        schema:
          type: string
        description: The tenant identifier.
      - name: callback
        in: path
        required: true
        schema:
          type: string
        description: The callback identifier.
      - name: environment
        in: path
        required: true
        schema:
          type: string
        description: The environment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
      tags:
      - General
  /api/v1/{tenant}/{webhook}/{environment?}:
    post:
      summary: Create General
      description: 'To be confirmed.'
      tags:
      - General
      parameters:
      - name: tenant
        in: path
        required: true
        schema:
          type: string
        description: The tenant identifier.
      - name: webhook
        in: path
        required: true
        schema:
          type: string
        description: The webhook identifier.
      - name: environment
        in: path
        required: true
        schema:
          type: string
        description: The environment identifier.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
  /api/v1/{tenant}/{webhook}/{environment}:
    get:
      summary: Webhook General
      description: 'To be confirmed.'
      parameters:
      - name: tenant
        in: path
        required: true
        schema:
          type: string
        description: The tenant identifier.
      - name: webhook
        in: path
        required: true
        schema:
          type: string
        description: The webhook identifier.
      - name: environment
        in: path
        required: true
        schema:
          type: string
        description: The environment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
      tags:
      - General
  /api/v1/alerts:
    get:
      summary: List Alerts
      description: List all alerts.
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by type.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: notificationGroup, createdBy'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, type, created_at, last_triggered_at'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                example-1:
                  summary: Examples
                  value:
                    data:
                    - id: 0
                      name: string
                      type: string
                      config:
                        threshold: string
                      notification_group:
                        id: 0
                        company_id: 0
                        name: string
                        created_at: '2025-01-15T10:30:00.000000Z'
                        updated_at: '2025-01-15T10:30:00.000000Z'
                      last_triggered_at: null
                      created_at: '2025-01-15T10:30:00.000000Z'
                      updated_at: '2025-01-15T10:30:00.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: https://api.example.com/api/v1/alerts
                      per_page: 15
                      to: 1
                      total: 1
                    links:
                      first: https://api.example.com/api/v1/alerts?page=1
                      last: https://api.example.com/api/v1/alerts?page=1
                      prev: null
                      next: null
                example-2:
                  summary: Three alerts
                  value:
                    data:
                    - id: 3
                      name: Usage @ 10%
                      type: usage
                      config:
                        threshold: '10'
                      notification_group:
                        id: 593
                        company_id: 5503465
                        name: Usage Alerts
                        created_at: '2026-03-09T10:39:55.000000Z'
                        updated_at: '2026-03-09T10:39:55.000000Z'
                      last_triggered_at: null
                      created_at: '2026-03-09T10:40:56.000000Z'
                      updated_at: '2026-03-09T10:40:56.000000Z'
                    - id: 2
                      name: Usage @ 30%
                      type: usage
                      config:
                        threshold: '30'
                      notification_group:
                        id: 593
                        company_id: 5503465
                        name: Usage Alerts
                        created_at: '2026-03-09T10:39:55.000000Z'
                        updated_at: '2026-03-09T10:39:55.000000Z'
                      last_triggered_at: null
                      created_at: '2026-03-09T10:40:42.000000Z'
                      updated_at: '2026-03-09T10:40:42.000000Z'
                    - id: 1
                      name: Usage @ 50%
                      type: usage
                      config:
                        threshold: '50'
                      notification_group:
                        id: 593
                        company_id: 5503465
                        name: Usage Alerts
                        created_at: '2026-03-09T10:39:55.000000Z'
                        updated_at: '2026-03-09T10:39:55.000000Z'
                      last_triggered_at: null
                      created_at: '2026-03-09T10:40:30.000000Z'
                      updated_at: '2026-03-09T10:40:30.000000Z'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      path: http://core.wearepatchworks.com/api/v1/alerts
                      per_page: 15
                      to: 3
                      total: 3
                    links:
                      first: http://core.wearepatchworks.com/api/v1/alerts?page=1
                      last: http://core.wearepatchworks.com/api/v1/alerts?page=1
                      prev: null
                      next: null
      tags:
      - Alerts
    post:
      summary: Create Alert
      description: Create a new alert.
      responses:
        '200':
          description: OK
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
      tags:
      - Alerts
      parameters: []
  /api/v1/alerts/{alert}:
    get:
      summary: Get Alert
      description: Get a single alert.
      parameters:
      - name: filter[name]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by name.
      - name: filter[type]
        in: query
        required: false
        schema:
          type: string
        description: Filter results by type.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Comma-separated list of relationships to include. Available: notificationGroup, createdBy'
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: 'Sort field. Prefix with - for descending. Available: name, type, created_at, last_triggered_at'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
        description: Page number for pagination.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        description: Number of results per page.
      responses:
        '200':
          description: OK
      tags:
      - Alerts
    put:
      summary: Update Alert
      description: Update an existing alert.
      responses:
        '200':
          description: OK
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example-1:
                  summary: Examples
                  value:
                    message: The given data was invalid.
                    errors:
                      field:
                      - The field is required.
      tags:
      - Alerts
      parameters: []
    delete:
      summary: Delete Alert
      description: Delete a alert.
      responses:
        '200':
          description: OK
      tags:
      - Alerts
      parameters: []
components:
  schemas:
    PaginationMeta:
      type: object
      properties:
        current_page:
          type: integer
        from:
          type: integer
          nullable: true
        last_page:
          type: integer
        path:
          type: string
        per_page:
          type: integer
        to:
          type: integer
          nullable: true
        total:
          type: integer
    PaginationLinks:
      type: object
      properties:
        first:
          type: string
          format: uri
        last:
          type: string
          format: uri
        prev:
          type: string
          format: uri
          nullable: true
        next:
          type: string
          format: uri
          nullable: true
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    MessageResponse:
      type: object
      properties:
        message:
          type: string
    ActivityLogs:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        log_name:
          type: string
        description:
          type: string
        subject_id:
          type: integer
        subject_type:
          type: string
        causer_id:
          type: integer
        created_at:
          type: string
        updated_at:
          type: string
        event:
          type: string
        name:
          type: string
        email:
          type: string
    ActivityLogsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ActivityLogs'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    Ai:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    AiGenerateGenerateRequest:
      type: object
      properties:
        userPrompt:
          type: string
        examplePayload:
          type: string
        language:
          type: string
      required:
      - userPrompt
    AiReplyReplyRequest:
      type: object
      properties:
        userReply:
          type: string
      required:
      - userReply
    AiListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Ai'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    AuthenticationImplementations:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        endpoint_ids:
          type: string
        label:
          type: string
        key:
          type: string
        value:
          type: string
        secret:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        endpoint:
          type: string
        method:
          type: string
        additional_endpoint_1:
          type: string
        additional_endpoint_2:
          type: string
        authentication_type_id:
          type: integer
        authentication_implementation_template_id:
          type: object
        authentication_type:
          type: object
        system_id:
          type: integer
        body_format:
          type: string
          enum:
          - none
          - form-data
          - raw
          - text
        data_type:
          type: string
          enum:
          - csv
          - json
          - txt
          - xml
        pre_script_version_id:
          type: object
        post_script_version_id:
          type: object
        timeout:
          type: array
          items:
            type: object
        system:
          type: array
          items:
            type: object
        variables:
          type: array
          items:
            type: object
        endpoints:
          type: array
          items:
            type: object
        pre_script_version:
          type: string
        post_script_version:
          type: string
        modified:
          type: string
        help_link:
          type: string
    AuthenticationImplementationsStoreEndpointsRequest:
      type: object
      properties:
        endpoint_ids:
          type: string
          items:
            type: integer
      required:
      - endpoint_ids
    AuthenticationImplementationsStoreVariablesRequest:
      type: object
      properties:
        label:
          type: string
        key:
          type: string
        value:
          type: string
        secret:
          type: string
        pivot:
          type: object
          properties:
            alias:
              type: string
            configurable:
              type: string
            required:
              type: string
            advanced:
              type: string
      required:
      - label
      - key
    AuthenticationImplementationsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AuthenticationImplementations'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    AuthenticationImplementationsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AuthenticationImplementations'
    Blueprints:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        help_guide:
          type: string
        versionable:
          type: string
        active_marketplace_app_id:
          type: integer
        marketplace_company_id:
          type: integer
        public_company_id:
          type: integer
        marketplace_apps_count:
          type: integer
        update_available:
          type: string
        post_install_defaults:
          type: array
          items:
            type: object
        labels:
          type: array
          items:
            type: object
    BlueprintsInstallInstallRequest:
      type: object
      properties:
        flow_template_ids:
          type: string
        instances:
          type: string
        post_install:
          type: string
          properties:
            action:
              type: string
    BlueprintsInstallActiveInstallRequest:
      type: object
      properties:
        flow_template_ids:
          type: string
        instances:
          type: string
        post_install:
          type: string
          properties:
            action:
              type: string
    BlueprintsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Blueprints'
    CacheStep:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        scope:
          type: string
        flow_id:
          type: string
        ttl_unit:
          type: string
        ttl_number:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    CacheStepStoreRequest:
      type: object
      properties:
        scope:
          type: string
        flow_id:
          type: string
        ttl_unit:
          type: string
        ttl_number:
          type: string
      required:
      - scope
    CacheStepListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CacheStep'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    CacheStepResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CacheStep'
    Caches:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        scope:
          type: string
        ttl:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        flow_id:
          type: integer
        cache_template_id:
          type: integer
        content:
          type: string
        ttl_unit:
          type: string
        ttl_number:
          type: string
        flow:
          type: string
    CachesUpdateContentRequest:
      type: object
      properties:
        content:
          type: string
          nullable: true
    CachesUpdateRequest:
      type: object
      properties:
        ttl_unit:
          type: string
          nullable: true
        ttl_number:
          type: string
          nullable: true
        name:
          type: string
      required:
      - name
    CachesListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Caches'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    CachesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Caches'
    Certificates:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        connector_id:
          type: string
        certificate:
          type: string
        passphrase:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: object
        user_id:
          type: object
        connector:
          type: object
        user:
          type: object
    CertificatesStoreRequest:
      type: object
      properties:
        connector_id:
          type: string
          nullable: true
        certificate:
          type: string
        passphrase:
          type: string
          maxLength: 1000
          nullable: true
      required:
      - certificate
    CertificatesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Certificates'
    ConnectionPools:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        limit:
          type: integer
        timeout:
          type: integer
          items:
            type: object
        created_at:
          type: string
          format: date-time
          items:
            type: object
        updated_at:
          type: string
          format: date-time
          items:
            type: object
        name:
          type: string
        connectors:
          type: array
          items:
            type: object
    ConnectionPoolsStoreRequest:
      type: object
      properties:
        limit:
          type: integer
          minimum: 1
        timeout:
          type: integer
          minimum: 1
          nullable: true
        name:
          type: string
          maxLength: 255
      required:
      - limit
      - name
    ConnectionPoolsUpdateRequest:
      type: object
      properties:
        limit:
          type: integer
          minimum: 1
        timeout:
          type: integer
          minimum: 1
          nullable: true
        name:
          type: string
          minLength: 1
          maxLength: 255
    ConnectionPoolsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionPools'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    ConnectionPoolsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ConnectionPools'
    ConnectorInstances:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        authentication_implementation_template_id:
          type: string
        timezone:
          type: string
        date_format:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: integer
        connection_pool_id:
          type: integer
        variable_templates:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ConnectorInstancesStoreRequest:
      type: object
      properties:
        authentication_implementation_template_id:
          type: string
        timezone:
          type: string
        date_format:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: integer
        connection_pool_id:
          type: integer
          nullable: true
        variable_templates:
          type: string
          nullable: true
          properties:
            '*':
              type: object
              properties:
                key:
                  type: string
                value:
                  type: string
                  nullable: true
                label:
                  type: string
                secret:
                  type: boolean
                  nullable: true
                locked:
                  type: boolean
                  nullable: true
                pivot:
                  type: object
                  properties:
                    alias:
                      type: string
                      nullable: true
                    configurable:
                      type: boolean
                      nullable: true
                    required:
                      type: boolean
                      nullable: true
                    advanced:
                      type: boolean
                      nullable: true
        name:
          type: string
      required:
      - authentication_implementation_template_id
      - date_format
      - name
      - rate_limit_duration
      - rate_limit_unit
      - timezone
      - variable_templates
    ConnectorInstancesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ConnectorInstances'
    Connectors:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        authentication_implementation_id:
          type: string
        timezone:
          type: string
        date_format:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: integer
        connection_pool_id:
          type: integer
        variables:
          type: string
          items:
            type: object
        session_id:
          type: string
        platform_app_key:
          type: string
        certificate_id:
          type: string
        type:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        authentication_implementation:
          type: array
          items:
            type: object
        system:
          type: string
        certificate:
          type: string
    ConnectorsStoreRequest:
      type: object
      properties:
        authentication_implementation_id:
          type: string
        timezone:
          type: string
        date_format:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: integer
        connection_pool_id:
          type: integer
          nullable: true
        variables:
          type: string
          nullable: true
          properties:
            '*':
              type: object
              properties:
                key:
                  type: string
                value:
                  type: string
                  nullable: true
                label:
                  type: string
                secret:
                  type: boolean
                  nullable: true
                locked:
                  type: boolean
                  nullable: true
                pivot:
                  type: object
                  properties:
                    alias:
                      type: string
                      nullable: true
                    configurable:
                      type: boolean
                      nullable: true
                    required:
                      type: boolean
                      nullable: true
                    advanced:
                      type: boolean
                      nullable: true
        session_id:
          type: string
          nullable: true
        platform_app_key:
          type: string
        certificate_id:
          type: string
          nullable: true
        name:
          type: string
      required:
      - authentication_implementation_id
      - date_format
      - name
      - rate_limit_duration
      - rate_limit_unit
      - timezone
      - variables
    ConnectorsUpdateRequest:
      type: object
      properties:
        authentication_implementation_id:
          type: string
        type:
          type: string
        timezone:
          type: string
        date_format:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: integer
        connection_pool_id:
          type: integer
          nullable: true
        variables:
          type: string
          properties:
            '*':
              type: object
              properties:
                id:
                  type: string
                key:
                  type: string
                value:
                  type: string
                  nullable: true
                label:
                  type: string
                secret:
                  type: boolean
                  nullable: true
                locked:
                  type: boolean
                  nullable: true
                pivot:
                  type: object
                  properties:
                    alias:
                      type: string
                      nullable: true
                    configurable:
                      type: boolean
                      nullable: true
                    required:
                      type: boolean
                      nullable: true
                    advanced:
                      type: boolean
                      nullable: true
        name:
          type: string
      required:
      - variables
    ConnectorsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Connectors'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    ConnectorsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Connectors'
    CrossReferenceLookups:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        cross_reference_lookup_template_id:
          type: integer
        name:
          type: string
        description:
          type: string
          items:
            type: object
        default_value:
          type: string
          items:
            type: object
        created_at:
          type: string
        updated_at:
          type: string
        deleted_at:
          type: string
        left_value:
          type: string
        right_value:
          type: string
        cross_reference_lookup_values:
          type: array
          items:
            type: object
    CrossReferenceLookupsUploadUploadRequest:
      type: object
      properties:
        private:
          type: string
    CrossReferenceLookupsStoreCrossReferenceLookupValuesRequest:
      type: object
      properties:
        left_value:
          type: string
          nullable: true
        right_value:
          type: string
          nullable: true
    CrossReferenceLookupsUpdateCrossReferenceLookupValuesRequest:
      type: object
      properties:
        left_value:
          type: string
          nullable: true
        right_value:
          type: string
          nullable: true
    CrossReferenceLookupsImportImportRequest:
      type: object
      properties:
        values_file:
          type: string
      required:
      - values_file
    CrossReferenceLookupsUpdateRequest:
      type: object
      properties:
        description:
          type: string
        default_value:
          type: string
          nullable: true
        name:
          type: string
    CrossReferenceLookupsStoreRequest:
      type: object
      properties:
        description:
          type: string
        default_value:
          type: string
          nullable: true
        name:
          type: string
      required:
      - description
      - name
    CrossReferenceLookupsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CrossReferenceLookups'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    CrossReferenceLookupsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CrossReferenceLookups'
    DataPool:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        name:
          type: string
        description:
          type: string
        data_pool_template_id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    DataPoolStoreRequest:
      type: object
      properties:
        description:
          type: string
          maxLength: 255
          nullable: true
        name:
          type: string
          minLength: 3
          maxLength: 100
      required:
      - name
    DataPoolUpdateRequest:
      type: object
      properties:
        description:
          type: string
          maxLength: 255
          nullable: true
        name:
          type: string
          minLength: 3
          maxLength: 100
    DataPoolImportImportRequest:
      type: object
      properties:
        deduped_data_file:
          type: string
      required:
      - deduped_data_file
    DataPoolListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DataPool'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    DataPoolResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DataPool'
    Endpoints:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        field_path:
          type: string
        tags:
          type: string
        label:
          type: string
        key:
          type: string
        value:
          type: string
        secret:
          type: string
        variables:
          type: string
          items:
            type: object
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: object
        system_id:
          type: object
        system:
          type: object
        entity_type_id:
          type: object
        entity_type:
          type: object
        endpoint:
          type: string
        http_method:
          type: string
          enum:
          - CONNECT
          - DELETE
          - GET
          - HEAD
          - OPTIONS
          - PATCH
          - POST
          - PUT
          - TRACE
        data_type:
          type: string
          enum:
          - csv
          - json
          - txt
          - xml
        pagination_method:
          type: string
          enum:
          - Custom relative URI
          - Link Header
          - Next page token
          - Next Page URL
          - Page number parameter
          - Limit offset
          - default
          - PeopleVox
          - NetSuite SOAP
          - GraphQL Cursor
          - Database limit offset
          - Script
        deprecated_at:
          type: string
          format: date-time
        direction:
          type: string
          enum:
          - Send
          - Receive
        returns_multiple_records:
          type: boolean
        pre_script_version_id:
          type: object
        post_script_version_id:
          type: array
          items:
            type: object
        endpoint_schema:
          type: array
          items:
            type: object
        field_tags:
          type: array
          items:
            type: object
        data_path:
          type: array
          items:
            type: object
        body_format:
          type: array
          items:
            type: object
          enum:
          - none
          - form-data
          - raw
          - text
        raw_body:
          type: array
          items:
            type: object
        filters:
          type: array
          items:
            type: object
        modified:
          type: array
          items:
            type: object
        help_link:
          type: array
          items:
            type: object
        authentication_implementations:
          type: array
          items:
            type: object
        pre_script_version:
          type: string
        post_script_version:
          type: string
        disable_header_addition:
          type: boolean
        response_encoding:
          type: string
          enum:
          - base64
          - none
    EndpointsStoreFieldTagsRequest:
      type: object
      properties:
        field_path:
          type: string
        tags:
          type: string
          properties:
            '*':
              type: object
              properties:
                field_tag_id:
                  type: integer
                field_path:
                  type: string
                tracked:
                  type: boolean
      required:
      - field_path
      - tags
    EndpointsUpdatePaginationRequest:
      type: object
      properties:
        variables:
          type: string
          properties:
            '*':
              type: object
              properties:
                alias:
                  type: string
                value:
                  type: string
                  nullable: true
        request_options:
          type: array
          nullable: true
          properties:
            '*':
              type: object
              properties:
                key:
                  type: string
                alias:
                  type: string
                value:
                  type: string
                  nullable: true
      required:
      - request_options
      - variables
    EndpointsStoreVariablesRequest:
      type: object
      properties:
        label:
          type: string
        key:
          type: string
        value:
          type: string
        secret:
          type: string
        pivot:
          type: object
          properties:
            alias:
              type: string
            configurable:
              type: string
            required:
              type: string
            advanced:
              type: string
      required:
      - label
      - key
    EndpointsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Endpoints'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    EndpointsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Endpoints'
    Filters:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        type:
          type: string
        comparison:
          type: string
        value:
          type: string
        value_type:
          type: string
        keep_matching:
          type: string
        operator_logic:
          type: string
        match_order:
          type: string
        is_default:
          type: string
        location:
          type: string
        model_type:
          type: string
        model_id:
          type: integer
        date_format:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        field:
          type: string
    FiltersStoreRequest:
      type: object
      properties:
        type:
          type: string
        comparison:
          type: string
        value:
          type: string
          maximum: 1024
          nullable: true
        value_type:
          type: string
          nullable: true
        keep_matching:
          type: string
        operator_logic:
          type: string
          nullable: true
        match_order:
          type: string
        is_default:
          type: string
        location:
          type: string
          nullable: true
        model_type:
          type: string
        model_id:
          type: integer
        date_format:
          type: string
          nullable: true
        field:
          type: string
          minLength: 1
      required:
      - comparison
      - field
      - keep_matching
      - model_id
      - model_type
      - type
    FiltersUpdateRequest:
      type: object
      properties:
        type:
          type: string
        comparison:
          type: string
        value:
          type: string
          maximum: 1024
        value_type:
          type: string
          nullable: true
        keep_matching:
          type: string
        operator_logic:
          type: string
          nullable: true
        match_order:
          type: string
        is_default:
          type: string
        location:
          type: string
          nullable: true
        date_format:
          type: string
          nullable: true
        field:
          type: string
          minLength: 1
    FiltersListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Filters'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    FiltersResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Filters'
    FlowMetricValueSummaries:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    FlowMetricValueSummariesListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/FlowMetricValueSummaries'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    FlowRuns:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        name:
          type: string
        payload.id:
          type: string
        steps.name:
          type: string
        status:
          type: string
          enum:
          - Draft
          - Inactive
          - Deployed
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        flow_id:
          type: object
        flow_version_id:
          type: object
        virtual_environment_version:
          type: object
        user_id:
          type: integer
        trigger:
          type: string
          enum:
          - API
          - Manual
          - Router
          - Webhook
          - Schedule
          - Shape
          - Retry
          - Event
          - Callback
        summary:
          type: string
        started_at:
          type: string
          format: date-time
        finished_at:
          type: string
          format: date-time
        duration:
          type: object
        retry_flow_run_id:
          type: object
        retried_flow_run:
          type: array
          items:
            type: object
        has_warnings:
          type: array
          items:
            type: object
        flow_run_logs:
          type: array
          items:
            type: object
        flow:
          type: array
          items:
            type: object
        flow_version:
          type: array
          items:
            type: object
        metrics:
          type: array
          items:
            type: object
        cpu_time:
          type: string
        payload_size:
          type: string
        operations_sent:
          type: string
        operations_received:
          type: string
        score:
          type: string
        starting_payload_count:
          type: integer
        starting_payload_size:
          type: string
        flow_steps_with_errors:
          type: string
    FlowRunsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/FlowRuns'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    FlowRunsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/FlowRuns'
    FlowSteps:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        first_step_id:
          type: string
        filter_logic_operator:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        flow_version_id:
          type: integer
        name:
          type: string
        microservice:
          type: object
        config:
          type: object
        parent_id:
          type: object
        flow_version:
          type: object
        children:
          type: object
        endpoint:
          type: object
        connector:
          type: array
          items:
            type: object
        data_pool:
          type: array
          items:
            type: object
        filters:
          type: array
          items:
            type: object
        parent_flow_step:
          type: array
          items:
            type: object
        routes:
          type: array
          items:
            type: object
        variables:
          type: array
          items:
            type: object
        script_version:
          type: array
          items:
            type: object
        cache:
          type: array
          items:
            type: object
        payloads:
          type: array
          items:
            type: object
        flow:
          type: object
        cross_references:
          type: string
        notes_count:
          type: object
        notification_group:
          type: object
        order:
          type: string
    FlowStepsStoreRoutesRequest:
      type: object
      properties:
        first_step_id:
          type: string
          nullable: true
        filter_logic_operator:
          type: string
        name:
          type: string
          minLength: 1
          maxLength: 255
      required:
      - name
    FlowStepsUpdateRoutesRequest:
      type: object
      properties:
        first_step_id:
          type: string
          nullable: true
        filter_logic_operator:
          type: string
        name:
          type: string
          minLength: 1
          maxLength: 255
    FlowStepsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/FlowSteps'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    FlowStepsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/FlowSteps'
    FlowTemplates:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
          items:
            type: object
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        description:
          type: string
        step_count:
          type: integer
        cross_ref_count:
          type: integer
        script_count:
          type: integer
        system_count:
          type: integer
        webhook_count:
          type: array
          items:
            type: object
        advanced:
          type: array
          items:
            type: object
        system_templates:
          type: array
          items:
            type: object
        steps:
          type: array
          items:
            type: object
        schedules:
          type: object
        marketplace_company_id:
          type: object
        marketplace_company:
          type: object
        public_company_id:
          type: object
        public_company:
          type: object
        blueprint_id:
          type: array
          items:
            type: object
        blueprint_version_number:
          type: array
          items:
            type: object
        labels:
          type: array
          items:
            type: object
    FlowTemplatesListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/FlowTemplates'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    FlowTemplatesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/FlowTemplates'
    FlowVersions:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        virtual_environment_id:
          type: string
        flow_version_id:
          type: string
        priority:
          type: integer
        cron_string:
          type: string
        microservice:
          type: string
        config:
          type: string
        flow_step_route_id:
          type: integer
        variables:
          type: string
          items:
            type: object
        parent_id:
          type: integer
        type:
          type: string
        key:
          type: string
        value:
          type: string
        date_format:
          type: string
        secret:
          type: string
        enabled_at:
          type: string
        created_at:
          type: string
          format: date-time
          items:
            type: object
        updated_at:
          type: string
          format: date-time
          items:
            type: object
        flow_id:
          type: integer
        flow_name:
          type: string
        flow_priority:
          type: string
        iteration:
          type: string
        status:
          type: string
          enum:
          - Draft
          - Inactive
          - Deployed
        is_deployed:
          type: boolean
        is_editable:
          type: boolean
        deployed_at:
          type: object
        deployed_by:
          type: object
        deployed_by_user:
          type: object
        deployments:
          type: array
          items:
            type: object
        has_callback_step:
          type: array
          items:
            type: object
        steps:
          type: array
          items:
            type: object
        runs:
          type: string
        latest_run:
          type: string
        schedules:
          type: string
        filters:
          type: array
          items:
            type: object
        steps_count:
          type: array
          items:
            type: object
        pivot:
          type: string
    FlowVersionsStoreDeploymentsRequest:
      type: object
      properties:
        virtual_environment_id:
          type: string
          nullable: true
        flow_version_id:
          type: string
        priority:
          type: integer
          nullable: true
        deploy_disabled:
          type: boolean
          nullable: true
      required:
      - flow_version_id
    FlowVersionsUpdateDeploymentsRequest:
      type: object
      properties:
        virtual_environment_id:
          type: string
          nullable: true
        priority:
          type: integer
          nullable: true
        enabled_at:
          type: string
          format: date-time
          nullable: true
        deploy_disabled:
          type: boolean
          nullable: true
    FlowVersionsStoreSchedulesRequest:
      type: object
      properties:
        cron_string:
          type: string
        deployed_at:
          type: string
          format: date-time
          nullable: true
      required:
      - cron_string
    FlowVersionsUpdateSchedulesRequest:
      type: object
      properties:
        cron_string:
          type: string
        deployed_at:
          type: string
          format: date-time
          nullable: true
    FlowVersionsStoreChildrenRequest:
      type: object
      properties:
        microservice:
          type: string
        config:
          type: string
        flow_step_route_id:
          type: integer
        variables:
          type: string
        deployed_at:
          type: string
          format: date-time
          nullable: true
      required:
      - microservice
      - flow_step_route_id
    FlowVersionsStoreParentsRequest:
      type: object
      properties:
        microservice:
          type: string
        config:
          type: string
        deployed_at:
          type: string
          format: date-time
          nullable: true
      required:
      - microservice
    FlowVersionsUpdateStepsRequest:
      type: object
      properties:
        flow_version_id:
          type: string
        microservice:
          type: string
        config:
          type: string
        parent_id:
          type: integer
        variables:
          type: string
        deployed_at:
          type: string
          format: date-time
          nullable: true
    FlowVersionsStoreStepsRequest:
      type: object
      properties:
        flow_version_id:
          type: string
        microservice:
          type: string
        config:
          type: string
        parent_id:
          type: integer
        variables:
          type: string
        deployed_at:
          type: string
          format: date-time
          nullable: true
      required:
      - microservice
    FlowVersionsStoreVariablesRequest:
      type: object
      properties:
        type:
          type: string
        key:
          type: string
          minLength: 1
        value:
          type: string
          maximum: 1024
        date_format:
          type: string
          nullable: true
        secret:
          type: string
      required:
      - key
      - type
    FlowVersionsUpdateVariablesRequest:
      type: object
      properties:
        type:
          type: string
        key:
          type: string
          minLength: 1
        value:
          type: string
          maximum: 1024
        date_format:
          type: string
          nullable: true
        secret:
          type: string
      required:
      - key
      - type
    FlowVersionsUploadUploadRequest:
      type: object
      properties:
        private:
          type: string
    FlowVersionsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/FlowVersions'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    FlowVersionsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/FlowVersions'
    Flows:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        name:
          type: string
        enabled_at:
          type: string
        status:
          type: string
          enum:
          - Draft
          - Inactive
          - Deployed
        format:
          type: string
          enum:
          - csv
          - json
          - txt
          - xml
        body:
          type: string
        deployed_at:
          type: string
        labels:
          type: string
          items:
            type: object
        notification_groups:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        description:
          type: string
        layout_direction:
          type: string
        is_enabled:
          type: object
        latest_version:
          type: object
        current_version:
          type: object
        deployed_version:
          type: object
        latest_deployed_version:
          type: array
          items:
            type: object
        versions:
          type: array
          items:
            type: object
        version_type_counts:
          type: array
          items:
            type: object
        message_brokers:
          type: array
          items:
            type: object
        message_broker_queues:
          type: array
          items:
            type: object
        notification_group_ids:
          type: array
          items:
            type: object
        webhooks:
          type: string
        callbacks:
          type: string
        current_version_step_count:
          type: integer
        current_version_connector_count:
          type: integer
        current_version_script_count:
          type: integer
        current_version_cache_count:
          type: integer
        current_version_data_pool_count:
          type: integer
        current_version_cross_ref_count:
          type: integer
        use_queued_time:
          type: string
        remove_failed_payloads:
          type: array
          items:
            type: object
        priority:
          type: array
          items:
            type: object
        prod_flag:
          type: array
          items:
            type: object
        deployments:
          type: array
          items:
            type: object
        webhooks_count:
          type: integer
        callbacks_count:
          type: integer
        marketplace_app_id:
          type: integer
        blueprint_id:
          type: integer
        blueprint_version_number:
          type: string
    FlowsStoreCallbacksRequest:
      type: object
      properties:
        status:
          type: string
          enum:
          - Draft
          - Inactive
          - Deployed
        format:
          type: string
          enum:
          - csv
          - json
          - txt
          - xml
    FlowsUpdateCallbacksRequest:
      type: object
      properties:
        status:
          type: string
          enum:
          - Draft
          - Inactive
          - Deployed
        format:
          type: string
          enum:
          - csv
          - json
          - txt
          - xml
    FlowsUpdateVersionsRequest:
      type: object
      properties:
        deployed_at:
          type: string
          format: date-time
          nullable: true
    FlowsStoreWebhooksRequest:
      type: object
      properties:
        status:
          type: string
          enum:
          - Draft
          - Inactive
          - Deployed
        body:
          type: string
          nullable: true
        format:
          type: string
          enum:
          - csv
          - json
          - txt
          - xml
    FlowsUpdateWebhooksRequest:
      type: object
      properties:
        status:
          type: string
          enum:
          - Draft
          - Inactive
          - Deployed
        body:
          type: string
          nullable: true
        format:
          type: string
          enum:
          - csv
          - json
          - txt
          - xml
        hmac_algorithm:
          type: string
          nullable: true
        hmac_secret_key:
          type: string
          maxLength: 128
          nullable: true
    FlowsUpdateRequest:
      type: object
      properties:
        flow:
          type: object
          properties:
            name:
              type: string
              maxLength: 255
            description:
              type: string
              maxLength: 255
              nullable: true
            enabled_at:
              type: string
              format: date-time
              nullable: true
            use_queued_time:
              type: boolean
            remove_failed_payloads:
              type: boolean
            priority:
              type: integer
              maximum: 5
              minimum: 1
            prod_flag:
              type: boolean
        labels:
          type: string
          properties:
            '*':
              type: object
              properties:
                id:
                  type: string
        notification_groups:
          type: string
      required:
      - labels
    FlowsDuplicateDuplicateRequest:
      type: object
      properties:
        flow_version_id:
          type: string
      required:
      - flow_version_id
    FlowsExportExportRequest:
      type: object
      properties:
        flow_id:
          type: integer
      required:
      - flow_id
    FlowsImportImportRequest:
      type: object
      properties:
        flow:
          type: string
        metadata:
          type: string
        as_marketplace:
          type: string
      required:
      - flow
      - metadata
    FlowsStoreRequest:
      type: object
      properties:
        flow:
          type: object
          properties:
            name:
              type: string
              maxLength: 255
            description:
              type: string
              maxLength: 255
              nullable: true
            prod_flag:
              type: boolean
      required:
      - flow
    FlowsManualManualRequest:
      type: object
      properties:
        flow_id:
          type: integer
        version_id:
          type: integer
        payload:
          type: string
        flow_variables:
          type: string
        virtual_environment_id:
          type: integer
      required:
      - flow_id
      - payload
    FlowsStartStartRequest:
      type: object
      properties:
        flow_id:
          type: integer
        version_id:
          type: integer
        payload:
          type: string
        flow_variables:
          type: string
        virtual_environment_id:
          type: integer
      required:
      - flow_id
      - payload
    FlowsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Flows'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    FlowsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Flows'
    Labels:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
    LabelsStoreRequest:
      type: object
      properties:
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
        name:
          type: string
          maxLength: 20
      required:
      - colour
      - name
    LabelsUpdateRequest:
      type: object
      properties:
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
        name:
          type: string
          maxLength: 20
    LabelsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Labels'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    LabelsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Labels'
    Mapping:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        flow_version_id:
          type: string
        flow_step_id:
          type: string
        mapping:
          type: string
        mapping_file:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    MappingStoreRequest:
      type: object
      properties:
        flow_version_id:
          type: string
        flow_step_id:
          type: string
        mapping:
          type: string
        mapping_file:
          type: string
      required:
      - flow_version_id
      - flow_step_id
    MappingResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Mapping'
    MarketplaceApps:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        help_guide:
          type: string
        flow_version_ids:
          type: string
        cross_reference_lookup_ids:
          type: string
        system_ids:
          type: string
        script_version_ids:
          type: string
        cache_ids:
          type: string
        data_pool_ids:
          type: string
        private:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        blueprint_id:
          type: integer
        name:
          type: string
        version:
          type: integer
        version_name:
          type: string
        installed_count:
          type: integer
        company_id:
          type: integer
        flow_count:
          type: integer
        system_count:
          type: integer
        script_count:
          type: integer
        data_pool_count:
          type: array
          items:
            type: object
        cache_count:
          type: array
          items:
            type: object
        cross_ref_count:
          type: array
          items:
            type: object
        flow_templates:
          type: array
          items:
            type: object
        cross_reference_lookup_templates:
          type: array
          items:
            type: object
        system_templates:
          type: array
          items:
            type: object
        script_templates:
          type: array
          items:
            type: object
        cache_templates:
          type: array
          items:
            type: object
        data_pool_templates:
          type: array
          items:
            type: object
        company:
          type: object
        marketplace_company_id:
          type: object
        marketplace_company:
          type: object
        public_company_id:
          type: object
        public_company:
          type: object
        installs_avg_install_duration:
          type: string
        is_published:
          type: boolean
    MarketplaceAppsStoreRequest:
      type: object
      properties:
        help_guide:
          type: string
          format: uri
          nullable: true
        flow_version_ids:
          type: string
          items:
            type: integer
        cross_reference_lookup_ids:
          type: string
          items:
            type: integer
        system_ids:
          type: string
          items:
            type: integer
        script_version_ids:
          type: string
          items:
            type: integer
        cache_ids:
          type: string
          items:
            type: integer
        data_pool_ids:
          type: string
          items:
            type: integer
        private:
          type: string
        name:
          type: string
          maxLength: 100
        labels:
          type: array
          properties:
            '*':
              type: object
              properties:
                id:
                  type: string
      required:
      - labels
      - name
    MarketplaceAppsUpdateRequest:
      type: object
      properties:
        flow_version_ids:
          type: string
          items:
            type: integer
        cross_reference_lookup_ids:
          type: string
          items:
            type: integer
        system_ids:
          type: string
          items:
            type: integer
        script_version_ids:
          type: string
          items:
            type: integer
        cache_ids:
          type: string
          items:
            type: integer
        data_pool_ids:
          type: string
          items:
            type: integer
        name:
          type: string
          maxLength: 100
    MarketplaceAppsInstallInstallRequest:
      type: object
      properties:
        flow_template_ids:
          type: string
    MarketplaceAppsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MarketplaceApps'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    MarketplaceAppsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/MarketplaceApps'
    MediaFiles:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        model_type:
          type: string
        model_id:
          type: integer
        file_name:
          type: string
        mime_type:
          type: string
        expires_at:
          type: string
          format: date-time
        is_expired:
          type: boolean
    MediaFilesListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MediaFiles'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    MessageBrokerQueues:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
          items:
            type: object
        flow_id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: array
          items:
            type: object
        message_broker_id:
          type: array
          items:
            type: object
        flows:
          type: array
          items:
            type: object
        message_broker:
          type: object
    MessageBrokerQueuesStoreFlowsRequest:
      type: object
      properties:
        flow_id:
          type: integer
      required:
      - flow_id
    MessageBrokerQueuesListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MessageBrokerQueues'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    MessageBrokerQueuesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/MessageBrokerQueues'
    MessageBrokers:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        description:
          type: string
        host:
          type: string
          items:
            type: object
        port:
          type: integer
          items:
            type: object
        protocol:
          type: string
          enum:
          - HTTP
          - FTP
          - SFTP
          - FTPS
          - S3
          - MySQL
          - PGSQL
          - SQLSRV
          items:
            type: object
        auth_type:
          type: string
          items:
            type: object
        variables:
          type: string
          items:
            type: object
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        flows:
          type: array
          items:
            type: object
        message_broker_queues:
          type: array
          items:
            type: object
        message_broker_queues_count:
          type: array
          items:
            type: object
        flow_message_broker_queues:
          type: array
          items:
            type: object
    MessageBrokersUpdateRequest:
      type: object
      properties:
        description:
          type: string
          maxLength: 100
        host:
          type: string
        port:
          type: integer
        protocol:
          type: string
          enum:
          - HTTP
          - FTP
          - SFTP
          - FTPS
          - S3
          - MySQL
          - PGSQL
          - SQLSRV
        auth_type:
          type: string
        variables:
          type: string
          properties:
            '*':
              type: object
              properties:
                id:
                  type: string
                key:
                  type: string
                value:
                  type: string
                  nullable: true
                label:
                  type: string
                secret:
                  type: boolean
                  nullable: true
                locked:
                  type: boolean
                  nullable: true
                pivot:
                  type: object
                  properties:
                    alias:
                      type: string
                      nullable: true
                    configurable:
                      type: boolean
                      nullable: true
                    required:
                      type: boolean
                      nullable: true
                    advanced:
                      type: boolean
                      nullable: true
        name:
          type: string
          maxLength: 40
          pattern: ^[a-zA-Z0-9 -]+$
      required:
      - variables
    MessageBrokersStoreRequest:
      type: object
      properties:
        description:
          type: string
          maxLength: 100
        host:
          type: string
        port:
          type: integer
        protocol:
          type: string
          enum:
          - HTTP
          - FTP
          - SFTP
          - FTPS
          - S3
          - MySQL
          - PGSQL
          - SQLSRV
        auth_type:
          type: string
        name:
          type: string
          maxLength: 40
          pattern: ^[a-zA-Z0-9 -]+$
      required:
      - auth_type
      - description
      - host
      - name
      - port
      - protocol
    MessageBrokersListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MessageBrokers'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    MessageBrokersResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/MessageBrokers'
    ModelFilterValues:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        model_type:
          type: string
        model_id:
          type: integer
        filter_id:
          type: integer
        value:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        filter:
          type: object
    ModelFilterValuesStoreRequest:
      type: object
      properties:
        model_type:
          type: string
        model_id:
          type: integer
        filter_id:
          type: integer
        value:
          type: string
          maxLength: 1024
      required:
      - filter_id
      - model_id
      - model_type
      - value
    ModelFilterValuesUpdateRequest:
      type: object
      properties:
        filter_id:
          type: integer
        value:
          type: string
          maxLength: 1024
    ModelFilterValuesListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ModelFilterValues'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    ModelFilterValuesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ModelFilterValues'
    ModelNotes:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        note:
          type: string
        private:
          type: string
        patchworks_only:
          type: string
        model_type:
          type: string
        model_id:
          type: integer
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        user_id:
          type: object
        flow_step:
          type: object
        user:
          type: object
    ModelNotesStoreRequest:
      type: object
      properties:
        note:
          type: string
          minLength: 1
          maxLength: 65535
        private:
          type: string
        patchworks_only:
          type: string
        model_type:
          type: string
        model_id:
          type: integer
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
      required:
      - colour
      - model_id
      - model_type
      - note
    ModelNotesUpdateRequest:
      type: object
      properties:
        note:
          type: string
          minLength: 1
          maxLength: 65535
        private:
          type: string
        patchworks_only:
          type: string
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
    ModelNotesListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ModelNotes'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    ModelNotesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ModelNotes'
    ModelVariables:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        variable_id:
          type: string
        alias:
          type: string
        configurable:
          type: string
        required:
          type: string
        advanced:
          type: string
        model_type:
          type: string
        model_id:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        variable:
          type: object
        modified:
          type: string
    ModelVariablesStoreRequest:
      type: object
      properties:
        variable_id:
          type: string
        alias:
          type: string
          nullable: true
        configurable:
          type: string
        required:
          type: string
        advanced:
          type: string
        model_type:
          type: string
        model_id:
          type: string
      required:
      - model_id
      - model_type
      - variable_id
    ModelVariablesUpdateRequest:
      type: object
      properties:
        alias:
          type: string
          nullable: true
        configurable:
          type: string
        required:
          type: string
        advanced:
          type: string
    ModelVariablesListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ModelVariables'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    ModelVariablesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ModelVariables'
    My:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    MyListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/My'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    Notifications:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        read:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        type:
          type: string
        read_at:
          type: string
          format: date-time
    NotificationsUpdateRequest:
      type: object
      properties:
        read:
          type: string
      required:
      - read
    NotificationsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Notifications'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    NotificationsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Notifications'
    OauthAuthoriseAuthoriseRequest:
      type: object
      properties:
        authentication_implementation_id:
          type: string
        timezone:
          type: string
        date_format:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: integer
        connection_pool_id:
          type: integer
        variables:
          type: string
        session_id:
          type: string
        platform_app_key:
          type: string
        certificate_id:
          type: string
      required:
      - authentication_implementation_id
      - timezone
      - date_format
      - rate_limit_unit
      - rate_limit_duration
    OauthReauthoriseReauthoriseRequest:
      type: object
      properties:
        authentication_implementation_id:
          type: string
        type:
          type: string
        timezone:
          type: string
        date_format:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: integer
        connection_pool_id:
          type: integer
        variables:
          type: string
    Packages:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        name:
          type: string
        notes:
          type: string
        created_by:
          type: string
          items:
            type: object
        priority:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        created_by_user:
          type: array
          items:
            type: object
        flow_versions:
          type: array
          items:
            type: object
        virtual_environments:
          type: array
          items:
            type: object
        deployments:
          type: array
          items:
            type: object
        flow_versions_count:
          type: integer
        deployments_count:
          type: integer
        flow_version_deployments_count:
          type: integer
    PackagesStoreFlowVersionsRequest:
      type: object
      properties:
        priority:
          type: integer
          minimum: 1
          maximum: 100
          nullable: true
    PackagesUpdateRequest:
      type: object
      properties:
        notes:
          type: string
          maxLength: 255
          nullable: true
        name:
          type: string
          maxLength: 255
    PackagesStoreRequest:
      type: object
      properties:
        notes:
          type: string
          maxLength: 255
          nullable: true
        name:
          type: string
          maxLength: 255
      required:
      - name
    PackagesDeployDeployRequest:
      type: object
      properties:
        notes:
          type: string
    PackagesListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Packages'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    PackagesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Packages'
    Patchworks:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        label:
          type: string
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
        logo_url:
          type: string
        version:
          type: integer
        version_name:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: integer
        system_type_id:
          type: string
        protocol:
          type: string
          enum:
          - HTTP
          - FTP
          - SFTP
          - FTPS
          - S3
          - MySQL
          - PGSQL
          - SQLSRV
        company_id:
          type: string
        date_format:
          type: string
        help_link:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PatchworksStoreSystemTemplatesRequest:
      type: object
      properties:
        label:
          type: string
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
        logo_url:
          type: string
          format: uri
        version:
          type: integer
        version_name:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: integer
        system_type_id:
          type: string
        protocol:
          type: string
          enum:
          - HTTP
          - FTP
          - SFTP
          - FTPS
          - S3
          - MySQL
          - PGSQL
          - SQLSRV
        company_id:
          type: string
        date_format:
          type: string
        help_link:
          type: string
          nullable: true
        name:
          type: string
      required:
      - colour
      - company_id
      - date_format
      - label
      - logo_url
      - name
      - protocol
      - rate_limit_duration
      - rate_limit_unit
      - system_type_id
      - version
      - version_name
    PatchworksUpdateSystemTemplatesRequest:
      type: object
      properties:
        label:
          type: string
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
        logo_url:
          type: string
          format: uri
        version:
          type: integer
        version_name:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: integer
        system_type_id:
          type: string
        protocol:
          type: string
          enum:
          - HTTP
          - FTP
          - SFTP
          - FTPS
          - S3
          - MySQL
          - PGSQL
          - SQLSRV
        company_id:
          type: string
        date_format:
          type: string
        help_link:
          type: string
          nullable: true
        name:
          type: string
    PatchworksDuplicateFlowDuplicateFlowRequest:
      type: object
      properties:
        flow_version_id:
          type: string
        from_company_id:
          type: string
        to_company_id:
          type: string
      required:
      - flow_version_id
      - from_company_id
      - to_company_id
    PatchworksListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Patchworks'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    PatchworksResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Patchworks'
    PayloadMetadata:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        flow_version_id:
          type: integer
        flow_step_id:
          type: integer
        flow_run_id:
          type: integer
        payload_store_reference:
          type: string
        payload_size:
          type: string
        dropped:
          type: string
    PayloadMetadataListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PayloadMetadata'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    PayloadMetadataResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PayloadMetadata'
    RequestOptions:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        type:
          type: string
        key:
          type: string
        value:
          type: string
        requestable_type:
          type: string
        requestable_id:
          type: integer
        configurable:
          type: string
        locked:
          type: string
        required:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        alias:
          type: string
    RequestOptionsStoreRequest:
      type: object
      properties:
        type:
          type: string
        key:
          type: string
        value:
          type: string
        requestable_type:
          type: string
        requestable_id:
          type: integer
        configurable:
          type: string
          nullable: true
        locked:
          type: string
          nullable: true
        required:
          type: string
          nullable: true
      required:
      - key
      - requestable_id
      - requestable_type
      - type
      - value
    RequestOptionsUpdateRequest:
      type: object
      properties:
        type:
          type: string
        key:
          type: string
        value:
          type: string
    RequestOptionsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RequestOptions'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    RequestOptionsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/RequestOptions'
    ScheduledFlows:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        flow_version_id:
          type: object
        flow_version:
          type: object
        virtual_environment_version_id:
          type: object
        virtual_environment_version:
          type: object
        payload_metadata_id:
          type: object
        payload_metadata:
          type: object
        trigger:
          type: string
          enum:
          - API
          - Manual
          - Router
          - Webhook
          - Schedule
          - Shape
          - Retry
          - Event
          - Callback
        status:
          type: object
          enum:
          - Draft
          - Inactive
          - Deployed
        flow:
          type: object
    ScheduledFlowsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ScheduledFlows'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    ScriptTemplates:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        description:
          type: string
        language:
          type: object
        company_id:
          type: object
        canonical_key:
          type: object
        content:
          type: object
        marketplace_company_id:
          type: object
        marketplace_company:
          type: object
        tenant_script_version_id:
          type: integer
    ScriptTemplatesListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ScriptTemplates'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    ScriptTemplatesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ScriptTemplates'
    ScriptVersionMetrics:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ScriptVersionMetricsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ScriptVersionMetrics'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    ScriptVersions:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        script_id:
          type: integer
        name:
          type: string
        version:
          type: integer
        status:
          type: string
          enum:
          - Draft
          - Inactive
          - Deployed
        deployment_failure_reason:
          type: string
        last_invoked_on:
          type: string
        deployed_at:
          type: string
          format: date-time
        deployment_failed_at:
          type: string
          format: date-time
        deploying:
          type: string
        content:
          type: object
        script:
          type: object
    ScriptVersionsInvokeInvokeRequest:
      type: object
      properties:
        variables:
          type: string
        payload:
          type: string
        flow:
          type: string
          properties:
            variables:
              type: string
    ScriptVersionsScriptUploadUploadRequest:
      type: object
      properties:
        private:
          type: string
    ScriptVersionsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ScriptVersions'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    ScriptVersionsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ScriptVersions'
    Scripts:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        script_template_id:
          type: integer
        name:
          type: string
        description:
          type: string
          items:
            type: object
        language:
          type: string
          items:
            type: object
        created_at:
          type: string
        updated_at:
          type: string
        script_id:
          type: integer
        version:
          type: string
        deployed_at:
          type: string
        deployment_failed_at:
          type: string
        deploying:
          type: string
        deployment_failure_reason:
          type: string
        content:
          type: string
        ai_created:
          type: string
          items:
            type: object
        value:
          type: string
        versions:
          type: array
          items:
            type: object
        latest_version:
          type: object
    ScriptsStoreScriptVersionsRequest:
      type: object
      properties:
        content:
          type: string
          minLength: 1
      required:
      - content
    ScriptsUpdateRequest:
      type: object
      properties:
        description:
          type: string
          maxLength: 255
          nullable: true
        language:
          type: string
        value:
          type: string
          minLength: 1
        name:
          type: string
          maxLength: 255
    ScriptsStoreRequest:
      type: object
      properties:
        description:
          type: string
          maxLength: 255
          nullable: true
        language:
          type: string
        ai_created:
          type: string
          nullable: true
        name:
          type: string
          maxLength: 255
      required:
      - language
      - name
    ScriptsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Scripts'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    ScriptsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Scripts'
    SystemTemplates:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        label:
          type: string
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
        logo_url:
          type: string
        version:
          type: integer
        version_name:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        protocol:
          type: object
          enum:
          - HTTP
          - FTP
          - SFTP
          - FTPS
          - S3
          - MySQL
          - PGSQL
          - SQLSRV
        rate_limit_duration:
          type: object
        system_type_id:
          type: object
        system_type:
          type: object
          enum:
          - Accounting
          - CRM
          - eCommerce
          - ERP
          - Marketplaces
          - Other
          - PIM
          - POS
          - 3PL
          - WMS
          - Database
        date_format:
          type: string
        canonical_key:
          type: object
        company_id:
          type: object
        public_company_id:
          type: object
        company:
          type: object
        public_company:
          type: object
        logo:
          type: object
        instances:
          type: array
          items:
            type: object
        authentication_implementation_templates:
          type: array
          items:
            type: object
        marketplace_company_id:
          type: object
        marketplace_company:
          type: object
        help_link:
          type: string
    SystemTemplatesInstallRequest:
      type: object
      properties:
        overwrite:
          type: string
        system_id:
          type: integer
        platform_app_key:
          type: string
    SystemTemplatesListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SystemTemplates'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    SystemTemplatesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/SystemTemplates'
    Systems:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        name:
          type: string
        entity_type_id:
          type: integer
        direction:
          type: string
          enum:
          - Send
          - Receive
        http_method:
          type: string
          enum:
          - CONNECT
          - DELETE
          - GET
          - HEAD
          - OPTIONS
          - PATCH
          - POST
          - PUT
          - TRACE
        label:
          type: string
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
        system_template_id:
          type: integer
        version:
          type: string
        version_name:
          type: string
        system_type_id:
          type: integer
        protocol:
          type: string
          enum:
          - HTTP
          - FTP
          - SFTP
          - FTPS
          - S3
          - MySQL
          - PGSQL
          - SQLSRV
        date_format:
          type: string
        help_link:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: string
        endpoint:
          type: string
        method:
          type: string
        data_type:
          type: string
          enum:
          - csv
          - json
          - txt
          - xml
        body_format:
          type: string
          enum:
          - none
          - form-data
          - raw
          - text
        additional_endpoint_1:
          type: string
        additional_endpoint_2:
          type: string
        timeout:
          type: integer
        authentication_type_id:
          type: string
        returns_multiple_records:
          type: string
        pagination_method:
          type: string
          enum:
          - Custom relative URI
          - Link Header
          - Next page token
          - Next Page URL
          - Page number parameter
          - Limit offset
          - default
          - PeopleVox
          - NetSuite SOAP
          - GraphQL Cursor
          - Database limit offset
          - Script
        schema:
          type: string
        endpoint_template_id:
          type: integer
        data_path:
          type: string
        raw_body:
          type: string
        deprecated_at:
          type: string
        disable_header_addition:
          type: string
        response_encoding:
          type: string
          enum:
          - base64
          - none
        key:
          type: string
        value:
          type: string
        secret:
          type: string
        logo:
          type: string
          items:
            type: object
        pre_script_version_id:
          type: string
        post_script_version_id:
          type: string
        canonical_key:
          type: array
          items:
            type: object
        connectors:
          type: array
          items:
            type: object
        system_type:
          type: object
          enum:
          - Accounting
          - CRM
          - eCommerce
          - ERP
          - Marketplaces
          - Other
          - PIM
          - POS
          - 3PL
          - WMS
          - Database
        system_template:
          type: array
          items:
            type: object
        authentication_implementations:
          type: array
          items:
            type: object
        authentication_implementations_count:
          type: array
          items:
            type: object
        endpoints:
          type: array
          items:
            type: object
        variables:
          type: array
          items:
            type: object
        updatable:
          type: string
        modified:
          type: string
        is_deployed:
          type: boolean
    SystemsStoreAuthenticationImplementationsRequest:
      type: object
      properties:
        endpoint:
          type: string
          nullable: true
        method:
          type: string
        data_type:
          type: string
          nullable: true
          enum:
          - csv
          - json
          - txt
          - xml
        body_format:
          type: string
          nullable: true
          enum:
          - none
          - form-data
          - raw
          - text
        additional_endpoint_1:
          type: string
          nullable: true
        additional_endpoint_2:
          type: string
          nullable: true
        timeout:
          type: integer
          minimum: 1
          maximum: 65535
        authentication_type_id:
          type: string
        help_link:
          type: string
          nullable: true
        name:
          type: string
      required:
      - authentication_type_id
      - endpoint
      - method
      - name
    SystemsUpdateAuthenticationImplementationsRequest:
      type: object
      properties:
        endpoint:
          type: string
          nullable: true
        method:
          type: string
        data_type:
          type: string
          nullable: true
          enum:
          - csv
          - json
          - txt
          - xml
        body_format:
          type: string
          nullable: true
          enum:
          - none
          - form-data
          - raw
          - text
        additional_endpoint_1:
          type: string
          nullable: true
        additional_endpoint_2:
          type: string
          nullable: true
        timeout:
          type: integer
          minimum: 1
          maximum: 65535
        authentication_type_id:
          type: string
        pre_script_version_id:
          type: string
          nullable: true
        post_script_version_id:
          type: string
          nullable: true
        help_link:
          type: string
          nullable: true
        name:
          type: string
    SystemsStoreEndpointsRequest:
      type: object
      properties:
        entity_type_id:
          type: integer
          nullable: true
        endpoint:
          type: string
        direction:
          type: string
          enum:
          - Send
          - Receive
        returns_multiple_records:
          type: string
        http_method:
          type: string
          enum:
          - CONNECT
          - DELETE
          - GET
          - HEAD
          - OPTIONS
          - PATCH
          - POST
          - PUT
          - TRACE
        data_type:
          type: string
          enum:
          - csv
          - json
          - txt
          - xml
        pagination_method:
          type: string
          nullable: true
          enum:
          - Custom relative URI
          - Link Header
          - Next page token
          - Next Page URL
          - Page number parameter
          - Limit offset
          - default
          - PeopleVox
          - NetSuite SOAP
          - GraphQL Cursor
          - Database limit offset
          - Script
        schema:
          type: string
          nullable: true
        endpoint_template_id:
          type: integer
        data_path:
          type: string
          nullable: true
        body_format:
          type: string
          enum:
          - none
          - form-data
          - raw
          - text
        raw_body:
          type: string
          nullable: true
        deprecated_at:
          type: string
          format: date-time
          nullable: true
        help_link:
          type: string
          nullable: true
        disable_header_addition:
          type: string
          nullable: true
        response_encoding:
          type: string
          nullable: true
          enum:
          - base64
          - none
        name:
          type: string
          pattern: ^[a-zA-Z0-9 \-&\+_]+$
      required:
      - data_type
      - direction
      - endpoint
      - http_method
      - name
      - returns_multiple_records
    SystemsUpdateEndpointsRequest:
      type: object
      properties:
        entity_type_id:
          type: integer
          nullable: true
        endpoint:
          type: string
        direction:
          type: string
          enum:
          - Send
          - Receive
        returns_multiple_records:
          type: string
        http_method:
          type: string
          enum:
          - CONNECT
          - DELETE
          - GET
          - HEAD
          - OPTIONS
          - PATCH
          - POST
          - PUT
          - TRACE
        data_type:
          type: string
          enum:
          - csv
          - json
          - txt
          - xml
        pagination_method:
          type: string
          nullable: true
          enum:
          - Custom relative URI
          - Link Header
          - Next page token
          - Next Page URL
          - Page number parameter
          - Limit offset
          - default
          - PeopleVox
          - NetSuite SOAP
          - GraphQL Cursor
          - Database limit offset
          - Script
        schema:
          type: string
          nullable: true
        endpoint_template_id:
          type: integer
        data_path:
          type: string
          nullable: true
        body_format:
          type: string
          enum:
          - none
          - form-data
          - raw
          - text
        raw_body:
          type: string
          nullable: true
        deprecated_at:
          type: string
          nullable: true
        help_link:
          type: string
          nullable: true
        pre_script_version_id:
          type: string
          nullable: true
        post_script_version_id:
          type: string
          nullable: true
        disable_header_addition:
          type: string
        response_encoding:
          type: string
          nullable: true
          enum:
          - base64
          - none
        name:
          type: string
          pattern: ^[a-zA-Z0-9 \-&\+_]+$
    SystemsWsdlIngestIngestWsdlRequest:
      type: object
      properties:
        wsdl_url:
          type: string
        update_existing:
          type: string
        wsdl_file:
          type: string
      required:
      - update_existing
    SystemsStoreVariablesRequest:
      type: object
      properties:
        label:
          type: string
        key:
          type: string
        value:
          type: string
        secret:
          type: string
        pivot:
          type: object
          properties:
            alias:
              type: string
            configurable:
              type: string
            required:
              type: string
            advanced:
              type: string
      required:
      - label
      - key
    SystemsUpdateRequest:
      type: object
      properties:
        version_name:
          type: string
        label:
          type: string
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: integer
        system_type_id:
          type: string
        protocol:
          type: string
          enum:
          - HTTP
          - FTP
          - SFTP
          - FTPS
          - S3
          - MySQL
          - PGSQL
          - SQLSRV
        system_template_id:
          type: integer
        logo:
          type: string
        date_format:
          type: string
        help_link:
          type: string
          nullable: true
        name:
          type: string
    SystemsExportExportRequest:
      type: object
      properties:
        system_id:
          type: integer
      required:
      - system_id
    SystemsImportImportRequest:
      type: object
      properties:
        system:
          type: string
        metadata:
          type: string
        as_marketplace:
          type: string
      required:
      - system
      - metadata
    SystemsStoreRequest:
      type: object
      properties:
        version_name:
          type: string
        label:
          type: string
        colour:
          type: string
          enum:
          - blue
          - blue_inverted
          - cyan
          - cyan_inverted
          - gray
          - gray_inverted
          - green
          - green_inverted
          - orange
          - orange_inverted
          - pink
          - pink_inverted
          - purple
          - purple_inverted
          - red
          - red_inverted
          - yellow
          - yellow_inverted
        logo:
          type: string
        rate_limit_unit:
          type: string
          enum:
          - second
          - minute
          - hour
          - day
        rate_limit_duration:
          type: integer
        system_type_id:
          type: string
        protocol:
          type: string
          enum:
          - HTTP
          - FTP
          - SFTP
          - FTPS
          - S3
          - MySQL
          - PGSQL
          - SQLSRV
        system_template_id:
          type: integer
        date_format:
          type: string
        help_link:
          type: string
          nullable: true
        name:
          type: string
      required:
      - colour
      - date_format
      - label
      - logo
      - name
      - protocol
      - rate_limit_duration
      - rate_limit_unit
      - system_type_id
      - version_name
    SystemsPostmanImportImportPostmanRequest:
      type: object
      properties:
        collection_url:
          type: string
        collection_file:
          type: string
        precog:
          type: string
    SystemsUploadUploadRequest:
      type: object
      properties:
        private:
          type: string
    SystemsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Systems'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    SystemsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Systems'
    TrackedData:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        flow_id:
          type: integer
        flow_run_id:
          type: integer
        step_id:
          type: integer
        entity_type_id:
          type: integer
        tracked_data_store_reference:
          type: string
        value:
          type: string
        direction:
          type: string
          enum:
          - Send
          - Receive
        sent_count:
          type: object
        received_count:
          type: object
        success:
          type: object
        flow:
          type: object
        flow_step:
          type: object
        flow_run:
          type: object
        entity_type:
          type: object
    TrackedDataListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TrackedData'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    Transforms:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    TransformsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Transforms'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    Variables:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        label:
          type: string
        key:
          type: string
        value:
          type: string
        secret:
          type: string
        locked:
          type: string
        configurable:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        modified:
          type: string
        pivot:
          type: string
        required:
          type: boolean
        advanced:
          type: boolean
        alias:
          type: string
    VariablesStoreRequest:
      type: object
      properties:
        label:
          type: string
        key:
          type: string
        value:
          type: string
          nullable: true
        secret:
          type: string
        locked:
          type: string
      required:
      - key
      - label
    VariablesUpdateRequest:
      type: object
      properties:
        label:
          type: string
        key:
          type: string
        value:
          type: string
          nullable: true
        configurable:
          type: string
    VariablesListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Variables'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    VariablesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Variables'
    VirtualEnvironmentVersions:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        flow_id:
          type: string
        priority:
          type: integer
        model_type:
          type: string
        original_model_id:
          type: string
        replacement_model_id:
          type: string
        type:
          type: string
        key:
          type: string
        value:
          type: string
        fallback:
          type: string
        date_format:
          type: string
        secret:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        version:
          type: object
        virtual_environment_id:
          type: object
        virtual_environment:
          type: object
        status:
          type: string
          enum:
          - Draft
          - Inactive
          - Deployed
        deployed_at:
          type: array
          items:
            type: object
        deployed_by:
          type: array
          items:
            type: object
        notes:
          type: array
          items:
            type: object
        manifests:
          type: array
          items:
            type: object
        variables:
          type: array
          items:
            type: object
        counts:
          type: string
        user_id:
          type: object
        user:
          type: object
    VirtualEnvironmentVersionsStoreFlowPrioritiesRequest:
      type: object
      properties:
        flow_id:
          type: string
        priority:
          type: integer
        notes:
          type: string
      required:
      - flow_id
      - priority
    VirtualEnvironmentVersionsUpdateFlowPrioritiesRequest:
      type: object
      properties:
        flow_id:
          type: string
        priority:
          type: integer
        notes:
          type: string
    VirtualEnvironmentVersionsStoreManifestsRequest:
      type: object
      properties:
        model_type:
          type: string
        original_model_id:
          type: string
        replacement_model_id:
          type: string
      required:
      - model_type
      - original_model_id
      - replacement_model_id
    VirtualEnvironmentVersionsUpdateManifestsRequest:
      type: object
      properties:
        model_type:
          type: string
        original_model_id:
          type: string
        replacement_model_id:
          type: string
    VirtualEnvironmentVersionsStoreVariablesRequest:
      type: object
      properties:
        type:
          type: string
        key:
          type: string
          minLength: 1
        value:
          type: string
          maximum: 1024
        fallback:
          type: string
          maxLength: 1024
          nullable: true
        date_format:
          type: string
          nullable: true
        secret:
          type: string
      required:
      - key
      - type
    VirtualEnvironmentVersionsUpdateVariablesRequest:
      type: object
      properties:
        type:
          type: string
        key:
          type: string
          minLength: 1
        value:
          type: string
          maximum: 1024
        fallback:
          type: string
          maxLength: 1024
          nullable: true
        date_format:
          type: string
          nullable: true
        secret:
          type: string
    VirtualEnvironmentVersionsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/VirtualEnvironmentVersions'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    VirtualEnvironmentVersionsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/VirtualEnvironmentVersions'
    VirtualEnvironments:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier
        notes:
          type: string
        deployed_at:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
        name:
          type: string
          items:
            type: object
        description:
          type: string
          items:
            type: object
        type:
          type: string
          items:
            type: object
        deployments:
          type: array
          items:
            type: object
        versions:
          type: array
          items:
            type: object
        versions_count:
          type: integer
        first_version:
          type: string
        deployed_version:
          type: string
        flows:
          type: string
        is_deployed:
          type: boolean
        deployments_count:
          type: array
          items:
            type: object
        pivot:
          type: array
          items:
            type: object
        package_deployments:
          type: array
          items:
            type: object
        labels:
          type: array
          items:
            type: object
    VirtualEnvironmentsStoreVersionsRequest:
      type: object
      properties:
        notes:
          type: string
    VirtualEnvironmentsUpdateVersionsRequest:
      type: object
      properties:
        notes:
          type: string
    VirtualEnvironmentsUpdateRequest:
      type: object
      properties:
        description:
          type: string
          maxLength: 255
          nullable: true
        type:
          type: string
          nullable: true
        name:
          type: string
          maxLength: 255
        labels:
          type: array
          properties:
            '*':
              type: object
              properties:
                id:
                  type: string
      required:
      - labels
      - name
    VirtualEnvironmentsStoreRequest:
      type: object
      properties:
        description:
          type: string
          maxLength: 255
          nullable: true
        type:
          type: string
          nullable: true
        name:
          type: string
          maxLength: 245
        labels:
          type: array
          properties:
            '*':
              type: object
              properties:
                id:
                  type: string
      required:
      - labels
      - name
    VirtualEnvironmentsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/VirtualEnvironments'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
    VirtualEnvironmentsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/VirtualEnvironments'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'API key passed in the Authorization header. Format: `<api-key>`'
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2 Bearer token obtained from POST /fabric/api/login
tags:
- name: Flow Actions
- name: Flows
  x-parent: Flow Actions
- name: Flow Versions
  x-parent: Flow Actions
- name: Flow Version Deployments
  x-parent: Flow Actions
- name: Flow Version Steps
  x-parent: Flow Actions
- name: Flow Routes & Branches
  x-parent: Flow Actions
- name: Flow Version Variables
  x-parent: Flow Actions
- name: Flow Triggers
- name: Flow Callbacks
  x-parent: Flow Triggers
- name: Flow Webhooks
  x-parent: Flow Triggers
- name: Flow Logs & Queue
- name: Flow Run Logs
  x-parent: Flow Logs & Queue
- name: Payload Metadata
  x-parent: Flow Logs & Queue
- name: Job Execution Logs
  x-parent: Flow Logs & Queue
- name: Scheduled Flows
  x-parent: Flow Logs & Queue
- name: Connectors & Instances
- name: Connector Instances
  x-parent: Connectors & Instances
- name: Connectors
  x-parent: Connectors & Instances
- name: System Templates
  x-parent: Connectors & Instances
- name: System Types
  x-parent: Connectors & Instances
- name: Systems
  x-parent: Connectors & Instances
- name: Connection Pools
  x-parent: Connectors & Instances
- name: Connector Endpoints
- name: Endpoint Templates
  x-parent: Connector Endpoints
- name: Endpoints
  x-parent: Connector Endpoints
- name: Variables
  x-parent: Connector Endpoints
- name: Request Options
  x-parent: Connector Endpoints
- name: Mappings
- name: Field Tags
  x-parent: Mappings
- name: Mapping
  x-parent: Mappings
- name: Transforms
  x-parent: Mappings
- name: Dedupe & Tracking
- name: Data Pools
  x-parent: Dedupe & Tracking
- name: Tracked Data
  x-parent: Dedupe & Tracking
- name: Caching
- name: Cache Step
  x-parent: Caching
- name: Caches
  x-parent: Caching
- name: Custom Scripts
- name: Script Languages
  x-parent: Custom Scripts
- name: Script Templates
  x-parent: Custom Scripts
- name: Script Version Metrics
  x-parent: Custom Scripts
- name: Script Versions
  x-parent: Custom Scripts
- name: Scripts
  x-parent: Custom Scripts
- name: Cross Ref Lookups
- name: Cross Reference Lookup Templates
  x-parent: Cross Ref Lookups
- name: Cross Reference Lookups
  x-parent: Cross Ref Lookups
- name: Labels/Tags
- name: Label Templates
  x-parent: Labels/Tags
- name: Labels
  x-parent: Labels/Tags
- name: Marketplace
- name: Blueprints
  x-parent: Marketplace
- name: Flow Templates
  x-parent: Marketplace
- name: Marketplace Apps
  x-parent: Marketplace
- name: Virtual Environments & Packages
- name: Virtual Environments
  x-parent: Virtual Environments & Packages
- name: Virtual Environment Versions
  x-parent: Virtual Environments & Packages
- name: Packages
  x-parent: Virtual Environments & Packages
- name: Company Management
- name: Allowances
  x-parent: Company Management
- name: Company
  x-parent: Company Management
- name: Operations
  x-parent: Company Management
- name: Activity Logs
  x-parent: Company Management
- name: Company Insights
- name: Flow Metric Model Totals
  x-parent: Company Insights
- name: Flow Metric Value Summaries
  x-parent: Company Insights
- name: Flow Metric Value Totals
  x-parent: Company Insights
- name: Canvas
- name: Canvas Steps
  x-parent: Canvas
- name: Canvas Step Connections
  x-parent: Canvas
- name: Canvas Positions
  x-parent: Canvas
- name: Canvas Notes
  x-parent: Canvas
- name: AI & MCP
- name: AI
  x-parent: AI & MCP
- name: MCP Servers
  x-parent: AI & MCP
- name: Alerting
- name: Alerts
  x-parent: Alerting
- name: Authentication
- name: Authentication Implementations
  x-parent: Authentication
- name: Authentication Types
  x-parent: Authentication
- name: Certificates
  x-parent: Authentication
- name: Oauth
  x-parent: Authentication
- name: System Notifications
- name: Notifications
  x-parent: System Notifications
- name: Message Broker
- name: Message Broker Queues
  x-parent: Message Broker
- name: Message Brokers
  x-parent: Message Broker
- name: Models
- name: Model Filter Values
  x-parent: Models
- name: Model Notes
  x-parent: Models
- name: Model Variables
  x-parent: Models
- name: Miscellaneous
- name: Entity Types
  x-parent: Miscellaneous
- name: Features
  x-parent: Miscellaneous
- name: Filters
  x-parent: Miscellaneous
- name: General
  x-parent: Miscellaneous
- name: Media Files
  x-parent: Miscellaneous
- name: Multi-Company Profiles
  x-parent: Miscellaneous
- name: OTC
  x-parent: Miscellaneous
security:
- ApiKeyAuth: []
- BearerAuth: []
