openapi: 3.0.0
x-enable-proxy: false
info:
  title: n8n Public API
  description: n8n Public API
  termsOfService: https://n8n.io/legal/#terms
  contact:
    email: hello@n8n.io
  license:
    name: Sustainable Use License
    url: https://github.com/n8n-io/n8n/blob/master/LICENSE.md
  version: 1.1.1
externalDocs:
  description: n8n API documentation
  url: https://docs.n8n.io/api/
servers:
  - url: /api/v1
    description: Current n8n instance (self-hosted built-in playground)
  - url: '{url}/api/v1'
    description: Self-hosted n8n instance
    variables:
      url:
        default: https://example.com
tags:
  - name: Audit
    x-displayName: Audit
    x-parent: InstanceOperations
    description: Operations about security audit
  - name: CommunityPackage
    x-displayName: Community Packages
    x-parent: InstanceOperations
    description: Operations about community packages
  - name: Credential
    x-displayName: Credentials
    x-parent: BuildAndRun
    description: Operations about credentials
  - name: CredentialTypePolicy
    x-displayName: Credential Type Policy
    x-parent: InstanceSettings
    description: Preview — breaking changes may still occur without major version bump.
  - name: DataTable
    x-displayName: Data Tables
    x-parent: BuildAndRun
    description: Operations about data tables and their rows
  - name: Discover
    x-displayName: Discover
    x-parent: InstanceOperations
    description: API capability discovery
  - name: Evaluation
    x-displayName: Evaluations
    x-parent: BuildAndRun
    description: Operations about evaluation test runs
  - name: Executions
    x-displayName: Executions
    x-parent: BuildAndRun
    description: Operations about executions
  - name: Folders
    x-displayName: Folders
    x-parent: BuildAndRun
    description: Operations about folders
  - name: Insights
    x-displayName: Insights
    x-parent: InstanceOperations
    description: Operations about insights
  - name: LogStreaming
    x-displayName: Log Streaming
    x-parent: InstanceSettings
    description: Operations about log streaming destinations
  - name: N8nPackage
    x-displayName: n8n Packages
    x-parent: InstanceOperations
    description: Beta — breaking changes may still occur without major version bump.
  - name: NodeTypePolicy
    x-displayName: Node Type Policy
    x-parent: InstanceSettings
    description: Preview — breaking changes may still occur without major version bump.
  - name: Projects
    x-displayName: Projects
    x-parent: AccessAndOrganization
    description: Operations about projects
  - name: Promotions
    x-displayName: Promotions
    x-parent: InstanceOperations
    description: Operations about promotion providers, environments, and package operations
  - name: Role
    x-displayName: Roles
    x-parent: AccessAndOrganization
    description: Operations about roles
  - name: RoleMappingRule
    x-displayName: Role Mapping Rules
    x-parent: AccessAndOrganization
    description: Operations about identity-provider role-mapping rules
  - name: SecurityPolicy
    x-displayName: Security Policy
    x-parent: InstanceSettings
    description: Operations about the instance security policy settings
  - name: SettingsLdap
    x-displayName: Settings LDAP
    x-parent: InstanceSettings
    description: Operations about LDAP settings
  - name: SettingsOtel
    x-displayName: Settings OTel
    x-parent: InstanceSettings
    description: Operations about OpenTelemetry settings
  - name: SettingsRateLimits
    x-displayName: Settings Rate Limits
    x-parent: InstanceSettings
    description: Operations about Public API rate-limit settings
  - name: SettingsSsoOidc
    x-displayName: Settings SSO OIDC
    x-parent: InstanceSettings
    description: Operations about OIDC SSO settings
  - name: SettingsSsoSaml
    x-displayName: Settings SSO SAML
    x-parent: InstanceSettings
    description: Operations about SAML SSO settings
  - name: SourceControl
    x-displayName: Source Control
    x-parent: InstanceOperations
    description: Operations about source control
  - name: Tags
    x-displayName: Tags
    x-parent: BuildAndRun
    description: Operations about tags
  - name: User
    x-displayName: Users
    x-parent: AccessAndOrganization
    description: Operations about users
  - name: Variables
    x-displayName: Variables
    x-parent: BuildAndRun
    description: Operations about variables
  - name: Workflow
    x-displayName: Workflows
    x-parent: BuildAndRun
    description: Operations about workflows
  - name: AccessAndOrganization
    x-displayName: Access and organization
    description: Manage projects, users, roles, and role-mapping rules
  - name: BuildAndRun
    x-displayName: Build and run
    description: Build, run, and test workflows, and manage the resources that they use
  - name: InstanceOperations
    x-displayName: Instance operations
    description: Audit, extend, version, promote, and monitor the instance
  - name: InstanceSettings
    x-displayName: Instance settings
    description: Configure sign-in, security, type policies, log streaming, and telemetry for the instance
paths:
  /audit:
    post:
      operationId: generateAudit
      tags:
        - Audit
      summary: Generate an audit
      description: Generate a security audit for your n8n instance.
      x-required-scope: securityAudit:generate
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                additionalOptions:
                  type: object
                  properties:
                    daysAbandonedWorkflow:
                      type: integer
                      description: Days for a workflow to be considered abandoned if not executed
                    categories:
                      type: array
                      items:
                        type: string
                        enum:
                          - credentials
                          - database
                          - nodes
                          - filesystem
                          - instance
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      Credentials Risk Report:
                        type: object
                        properties:
                          risk:
                            type: string
                            enum:
                              - credentials
                              - database
                              - nodes
                              - filesystem
                              - instance
                          sections:
                            type: array
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                description:
                                  type: string
                                recommendation:
                                  type: string
                                location:
                                  type: array
                                  items:
                                    oneOf:
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - node
                                          workflowId:
                                            type: string
                                          workflowName:
                                            type: string
                                          nodeId:
                                            type: string
                                          nodeName:
                                            type: string
                                          nodeType:
                                            type: string
                                        required:
                                          - kind
                                          - workflowId
                                          - workflowName
                                          - nodeId
                                          - nodeName
                                          - nodeType
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - credential
                                          id:
                                            type: string
                                          name:
                                            type: string
                                        required:
                                          - kind
                                          - id
                                          - name
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - community
                                          nodeType:
                                            type: string
                                          packageUrl:
                                            type: string
                                        required:
                                          - kind
                                          - nodeType
                                          - packageUrl
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - custom
                                          nodeType:
                                            type: string
                                          filePath:
                                            type: string
                                        required:
                                          - kind
                                          - nodeType
                                          - filePath
                                    type: object
                                settings:
                                  type: object
                                  additionalProperties: {}
                                nextVersions:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/auditVersion.generated'
                              required:
                                - title
                                - description
                                - recommendation
                        required:
                          - risk
                          - sections
                        example:
                          risk: credentials
                          sections:
                            - title: Credentials not used in any workflow
                              description: These credentials are not used in any workflow. Keeping unused credentials in your instance is an unneeded security risk.
                              recommendation: Consider deleting these credentials if you no longer need them.
                              location:
                                - kind: credential
                                  id: '1'
                                  name: My Test Account
                      Database Risk Report:
                        type: object
                        properties:
                          risk:
                            type: string
                            enum:
                              - credentials
                              - database
                              - nodes
                              - filesystem
                              - instance
                          sections:
                            type: array
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                description:
                                  type: string
                                recommendation:
                                  type: string
                                location:
                                  type: array
                                  items:
                                    oneOf:
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - node
                                          workflowId:
                                            type: string
                                          workflowName:
                                            type: string
                                          nodeId:
                                            type: string
                                          nodeName:
                                            type: string
                                          nodeType:
                                            type: string
                                        required:
                                          - kind
                                          - workflowId
                                          - workflowName
                                          - nodeId
                                          - nodeName
                                          - nodeType
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - credential
                                          id:
                                            type: string
                                          name:
                                            type: string
                                        required:
                                          - kind
                                          - id
                                          - name
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - community
                                          nodeType:
                                            type: string
                                          packageUrl:
                                            type: string
                                        required:
                                          - kind
                                          - nodeType
                                          - packageUrl
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - custom
                                          nodeType:
                                            type: string
                                          filePath:
                                            type: string
                                        required:
                                          - kind
                                          - nodeType
                                          - filePath
                                    type: object
                                settings:
                                  type: object
                                  additionalProperties: {}
                                nextVersions:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/auditVersion.generated'
                              required:
                                - title
                                - description
                                - recommendation
                        required:
                          - risk
                          - sections
                        example:
                          risk: database
                          sections:
                            - title: Expressions in "Execute Query" fields in SQL nodes
                              description: This SQL node has an expression in the "Query" field of an "Execute Query" operation. Building a SQL query with an expression may lead to a SQL injection attack.
                              recommendation: Consider using the "Query Parameters" field to pass parameters to the query, or validating the input of the expression in the "Query" field.
                              location:
                                - kind: node
                                  workflowId: '1'
                                  workflowName: My Workflow
                                  nodeId: 51eb5852-ce0b-4806-b4ff-e41322a4041a
                                  nodeName: MySQL
                                  nodeType: n8n-nodes-base.mySql
                      Filesystem Risk Report:
                        type: object
                        properties:
                          risk:
                            type: string
                            enum:
                              - credentials
                              - database
                              - nodes
                              - filesystem
                              - instance
                          sections:
                            type: array
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                description:
                                  type: string
                                recommendation:
                                  type: string
                                location:
                                  type: array
                                  items:
                                    oneOf:
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - node
                                          workflowId:
                                            type: string
                                          workflowName:
                                            type: string
                                          nodeId:
                                            type: string
                                          nodeName:
                                            type: string
                                          nodeType:
                                            type: string
                                        required:
                                          - kind
                                          - workflowId
                                          - workflowName
                                          - nodeId
                                          - nodeName
                                          - nodeType
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - credential
                                          id:
                                            type: string
                                          name:
                                            type: string
                                        required:
                                          - kind
                                          - id
                                          - name
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - community
                                          nodeType:
                                            type: string
                                          packageUrl:
                                            type: string
                                        required:
                                          - kind
                                          - nodeType
                                          - packageUrl
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - custom
                                          nodeType:
                                            type: string
                                          filePath:
                                            type: string
                                        required:
                                          - kind
                                          - nodeType
                                          - filePath
                                    type: object
                                settings:
                                  type: object
                                  additionalProperties: {}
                                nextVersions:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/auditVersion.generated'
                              required:
                                - title
                                - description
                                - recommendation
                        required:
                          - risk
                          - sections
                        example:
                          risk: filesystem
                          sections:
                            - title: Nodes that interact with the filesystem
                              description: This node reads from and writes to any accessible file in the host filesystem. Sensitive file content may be manipulated through a node operation.
                              recommendation: Consider protecting any sensitive files in the host filesystem, or refactoring the workflow so that it does not require host filesystem interaction.
                              location:
                                - kind: node
                                  workflowId: '1'
                                  workflowName: My Workflow
                                  nodeId: 51eb5852-ce0b-4806-b4ff-e41322a4041a
                                  nodeName: Ready Binary file
                                  nodeType: n8n-nodes-base.readBinaryFile
                      Nodes Risk Report:
                        type: object
                        properties:
                          risk:
                            type: string
                            enum:
                              - credentials
                              - database
                              - nodes
                              - filesystem
                              - instance
                          sections:
                            type: array
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                description:
                                  type: string
                                recommendation:
                                  type: string
                                location:
                                  type: array
                                  items:
                                    oneOf:
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - node
                                          workflowId:
                                            type: string
                                          workflowName:
                                            type: string
                                          nodeId:
                                            type: string
                                          nodeName:
                                            type: string
                                          nodeType:
                                            type: string
                                        required:
                                          - kind
                                          - workflowId
                                          - workflowName
                                          - nodeId
                                          - nodeName
                                          - nodeType
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - credential
                                          id:
                                            type: string
                                          name:
                                            type: string
                                        required:
                                          - kind
                                          - id
                                          - name
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - community
                                          nodeType:
                                            type: string
                                          packageUrl:
                                            type: string
                                        required:
                                          - kind
                                          - nodeType
                                          - packageUrl
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - custom
                                          nodeType:
                                            type: string
                                          filePath:
                                            type: string
                                        required:
                                          - kind
                                          - nodeType
                                          - filePath
                                    type: object
                                settings:
                                  type: object
                                  additionalProperties: {}
                                nextVersions:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/auditVersion.generated'
                              required:
                                - title
                                - description
                                - recommendation
                        required:
                          - risk
                          - sections
                        example:
                          risk: nodes
                          sections:
                            - title: Community nodes
                              description: This node is sourced from the community. Community nodes are not vetted by the n8n team and have full access to the host system.
                              recommendation: Consider reviewing the source code in any community nodes installed in this n8n instance, and uninstalling any community nodes no longer used.
                              location:
                                - kind: community
                                  nodeType: n8n-nodes-test.test
                                  packageUrl: https://www.npmjs.com/package/n8n-nodes-test
                      Instance Risk Report:
                        type: object
                        properties:
                          risk:
                            type: string
                            enum:
                              - credentials
                              - database
                              - nodes
                              - filesystem
                              - instance
                          sections:
                            type: array
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                description:
                                  type: string
                                recommendation:
                                  type: string
                                location:
                                  type: array
                                  items:
                                    oneOf:
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - node
                                          workflowId:
                                            type: string
                                          workflowName:
                                            type: string
                                          nodeId:
                                            type: string
                                          nodeName:
                                            type: string
                                          nodeType:
                                            type: string
                                        required:
                                          - kind
                                          - workflowId
                                          - workflowName
                                          - nodeId
                                          - nodeName
                                          - nodeType
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - credential
                                          id:
                                            type: string
                                          name:
                                            type: string
                                        required:
                                          - kind
                                          - id
                                          - name
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - community
                                          nodeType:
                                            type: string
                                          packageUrl:
                                            type: string
                                        required:
                                          - kind
                                          - nodeType
                                          - packageUrl
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            enum:
                                              - custom
                                          nodeType:
                                            type: string
                                          filePath:
                                            type: string
                                        required:
                                          - kind
                                          - nodeType
                                          - filePath
                                    type: object
                                settings:
                                  type: object
                                  additionalProperties: {}
                                nextVersions:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/auditVersion.generated'
                              required:
                                - title
                                - description
                                - recommendation
                        required:
                          - risk
                          - sections
                        example:
                          risk: instance
                          sections:
                            - title: Unprotected webhooks in instance
                              description: These webhook nodes have the "Authentication" field set to "None" and are not directly connected to a node to validate the payload. Every unprotected webhook allows your workflow to be called by any third party who knows the webhook URL.
                              recommendation: Consider setting the "Authentication" field to an option other than "None", or validating the payload with one of the following nodes.
                              location:
                                - kind: node
                                  workflowId: '1'
                                  workflowName: My Workflow
                                  nodeId: 51eb5852-ce0b-4806-b4ff-e41322a4041a
                                  nodeName: Webhook
                                  nodeType: n8n-nodes-base.webhook
                  - type: array
                    items: {}
                    maxItems: 0
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/internalServerError'
  /community-packages:
    get:
      operationId: getInstalledPackages
      tags:
        - CommunityPackage
      summary: List installed community packages
      description: Retrieve all installed community packages with pending update info.
      x-required-scope: communityPackage:list
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    packageName:
                      type: string
                      description: npm package name
                    installedVersion:
                      type: string
                      description: Currently installed version
                    authorName:
                      type: string
                      description: Package author name
                    authorEmail:
                      type: string
                      description: Package author email
                    installedNodes:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          type:
                            type: string
                          latestVersion:
                            type: number
                      description: Nodes included in this package
                    createdAt:
                      type: string
                      format: date-time
                    updatedAt:
                      type: string
                      format: date-time
                    updateAvailable:
                      type: string
                      description: Version available for update, if any
                    failedLoading:
                      type: boolean
                      description: Whether the package failed to load
                  required:
                    - packageName
                    - installedVersion
                    - installedNodes
                    - createdAt
                    - updatedAt
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: installPackage
      tags:
        - CommunityPackage
      summary: Install a community package
      description: Install a community package by npm name and optional version.
      x-required-scope: communityPackage:install
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: npm package name. Unscoped names start with n8n-nodes-. Scoped names use the @[author]/n8n-nodes- form.
                version:
                  type: string
                  description: Semver version or npm dist-tag, such as latest or beta. When unverified packages are disabled, only versions verified by n8n can be installed.
              required:
                - name
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  packageName:
                    type: string
                    description: npm package name
                  installedVersion:
                    type: string
                    description: Currently installed version
                  authorName:
                    type: string
                    description: Package author name
                  authorEmail:
                    type: string
                    description: Package author email
                  installedNodes:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        type:
                          type: string
                        latestVersion:
                          type: number
                    description: Nodes included in this package
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  updateAvailable:
                    type: string
                    description: Version available for update, if any
                  failedLoading:
                    type: boolean
                    description: Whether the package failed to load
                  policyRestrictions:
                    type: object
                    properties:
                      nodeTypes:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              description: Full node type name, such as n8n-nodes-example.exampleNode.
                            blockedOn:
                              type: string
                              enum:
                                - instance
                                - projects
                              description: 'instance: blocked on the instance by default. projects: allowed on the instance, but blocked in one or more projects.'
                            optInAvailable:
                              type: boolean
                              description: Whether a project can allow this node type. True when an instance policy blocks the node type unless a project allows it.
                          required:
                            - type
                            - blockedOn
                            - optInAvailable
                        description: Blocked node types from this package. Lists only the node types that are blocked.
                    required:
                      - nodeTypes
                    description: Node types from this package that a node type policy blocks. The install does not fail because of a policy. Absent when no policy was evaluated, for example when node type policies are not licensed. An empty nodeTypes list means that no policy blocks a node type from this package.
                required:
                  - packageName
                  - installedVersion
                  - installedNodes
                  - createdAt
                  - updatedAt
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /community-packages/{name}:
    patch:
      operationId: updatePackage
      tags:
        - CommunityPackage
      summary: Update a community package
      description: Update an installed community package to a new version.
      x-required-scope: communityPackage:update
      parameters:
        - schema:
            type: string
          required: true
          description: npm package name
          name: name
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                version:
                  type: string
                  description: Semver version or npm dist-tag to update to, such as latest or beta. When unverified packages are disabled, only versions verified by n8n can be installed.
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  packageName:
                    type: string
                    description: npm package name
                  installedVersion:
                    type: string
                    description: Currently installed version
                  authorName:
                    type: string
                    description: Package author name
                  authorEmail:
                    type: string
                    description: Package author email
                  installedNodes:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        type:
                          type: string
                        latestVersion:
                          type: number
                    description: Nodes included in this package
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  updateAvailable:
                    type: string
                    description: Version available for update, if any
                  failedLoading:
                    type: boolean
                    description: Whether the package failed to load
                required:
                  - packageName
                  - installedVersion
                  - installedNodes
                  - createdAt
                  - updatedAt
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: uninstallPackage
      tags:
        - CommunityPackage
      summary: Uninstall a community package
      description: Uninstall a community package by name.
      x-required-scope: communityPackage:uninstall
      parameters:
        - schema:
            type: string
          required: true
          description: npm package name
          name: name
          in: path
      responses:
        '204':
          description: Operation successful.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /credential-type-policies/instance:
    get:
      operationId: getCredentialTypeInstancePolicy
      tags:
        - CredentialTypePolicy
      summary: 'Preview: Retrieve the instance credential type policy'
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Returns the composed instance-scope policy: its default action and the rules of every attached policy document in evaluation order. An instance that was never configured reports `scopeId: null`, no rules, `defaultAction: allow`, and `version: 0`.
      x-required-scope: credentialTypePolicy:manage
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credentialTypePolicyEffectivePublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    put:
      operationId: putCredentialTypeInstancePolicy
      tags:
        - CredentialTypePolicy
      summary: 'Preview: Replace the instance credential type policy'
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Sets the instance default action and replaces the rules of its single policy document, creating both on first write. `version` must equal the version last read; a stale value is rejected with 409. Rule ids must be unique within the list.
      x-required-scope: credentialTypePolicy:manage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rules:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      action:
                        type: string
                        enum:
                          - allow
                          - deny
                          - delegate
                      selector:
                        oneOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - name
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - package
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - extends
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                            description: Matches the named credential type and every type that extends it
                        type: object
                    required:
                      - id
                      - action
                      - selector
                defaultAction:
                  type: string
                  enum:
                    - allow
                    - deny
                    - delegate
                version:
                  type: integer
                  minimum: 0
              required:
                - rules
                - defaultAction
                - version
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credentialTypePolicyEffectiveWriteResultPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /credential-type-policies/projects/{projectId}:
    get:
      operationId: getCredentialTypeProjectPolicy
      tags:
        - CredentialTypePolicy
      summary: "Preview: Retrieve a project's credential type policy"
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Returns the project's own composed policy, not the result of combining it with the instance policy. A project that was never configured reports `scopeId: null`, no rules, `defaultAction: allow`, and `version: 0`.
      x-required-scope: credentialTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credentialTypePolicyEffectivePublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    put:
      operationId: putCredentialTypeProjectPolicy
      tags:
        - CredentialTypePolicy
      summary: "Preview: Replace a project's credential type policy"
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Sets the project's default action and replaces the rules of its single policy document, creating both on first write. The `delegate` action is not accepted at project scope. `version` must equal the version last read; a stale value is rejected with 409, as is a project document that is shared with another scope.
      x-required-scope: credentialTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rules:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      action:
                        type: string
                        enum:
                          - allow
                          - deny
                      selector:
                        oneOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - name
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - package
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - extends
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                            description: Matches the named credential type and every type that extends it
                        type: object
                    required:
                      - id
                      - action
                      - selector
                defaultAction:
                  type: string
                  enum:
                    - allow
                    - deny
                version:
                  type: integer
                  minimum: 0
              required:
                - rules
                - defaultAction
                - version
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credentialTypePolicyEffectiveWriteResultPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /credential-type-policies/policies:
    get:
      operationId: listCredentialTypePolicyDocuments
      tags:
        - CredentialTypePolicy
      summary: 'Preview: List credential type policy documents'
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Returns a cursor-paginated list of reusable policy documents.
      x-required-scope: credentialTypePolicy:manage
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        kind:
                          type: string
                        rules:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              action:
                                type: string
                                enum:
                                  - allow
                                  - deny
                                  - delegate
                              selector:
                                oneOf:
                                  - type: object
                                    properties:
                                      kind:
                                        type: string
                                        enum:
                                          - name
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - kind
                                      - value
                                  - type: object
                                    properties:
                                      kind:
                                        type: string
                                        enum:
                                          - package
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - kind
                                      - value
                                  - type: object
                                    properties:
                                      kind:
                                        type: string
                                        enum:
                                          - extends
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - kind
                                      - value
                                    description: Matches the named credential type and every type that extends it
                                type: object
                            required:
                              - id
                              - action
                              - selector
                        version:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                        updatedBy:
                          type: string
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - id
                        - kind
                        - rules
                        - version
                        - updatedBy
                        - createdAt
                        - updatedAt
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    post:
      operationId: createCredentialTypePolicyDocument
      tags:
        - CredentialTypePolicy
      summary: 'Preview: Create a credential type policy document'
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Creates a reusable policy document that is not yet attached to any scope. Rule ids must be unique within the list. `warnings` lists rules that an earlier rule already shadows.
      x-required-scope: credentialTypePolicy:manage
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rules:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      action:
                        type: string
                        enum:
                          - allow
                          - deny
                          - delegate
                      selector:
                        oneOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - name
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - package
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - extends
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                            description: Matches the named credential type and every type that extends it
                        type: object
                    required:
                      - id
                      - action
                      - selector
              required:
                - rules
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credentialTypePolicyDocumentWriteResultPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /credential-type-policies/policies/{policyId}:
    get:
      operationId: getCredentialTypePolicyDocument
      tags:
        - CredentialTypePolicy
      summary: 'Preview: Retrieve a credential type policy document'
      description: '**Preview** — breaking changes may still occur without major version bump.'
      x-required-scope: credentialTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the credential type policy document.
          name: policyId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  kind:
                    type: string
                  rules:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                        action:
                          type: string
                          enum:
                            - allow
                            - deny
                            - delegate
                        selector:
                          oneOf:
                            - type: object
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - name
                                value:
                                  type: string
                                  minLength: 1
                              required:
                                - kind
                                - value
                            - type: object
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - package
                                value:
                                  type: string
                                  minLength: 1
                              required:
                                - kind
                                - value
                            - type: object
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - extends
                                value:
                                  type: string
                                  minLength: 1
                              required:
                                - kind
                                - value
                              description: Matches the named credential type and every type that extends it
                          type: object
                      required:
                        - id
                        - action
                        - selector
                  version:
                    type: integer
                    minimum: 0
                    exclusiveMinimum: true
                  updatedBy:
                    type: string
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - kind
                  - rules
                  - version
                  - updatedBy
                  - createdAt
                  - updatedAt
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    put:
      operationId: updateCredentialTypePolicyDocument
      tags:
        - CredentialTypePolicy
      summary: 'Preview: Replace the rules of a credential type policy document'
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Replaces the document's whole rule list. `version` must equal the version last read; a stale value is rejected with 409. Every scope the document is attached to has its version bumped. A `delegate` rule is rejected when the document is attached to a project scope.
      x-required-scope: credentialTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the credential type policy document.
          name: policyId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rules:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      action:
                        type: string
                        enum:
                          - allow
                          - deny
                          - delegate
                      selector:
                        oneOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - name
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - package
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - extends
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                            description: Matches the named credential type and every type that extends it
                        type: object
                    required:
                      - id
                      - action
                      - selector
                version:
                  type: integer
                  minimum: 0
              required:
                - rules
                - version
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credentialTypePolicyDocumentWriteResultPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    delete:
      operationId: deleteCredentialTypePolicyDocument
      tags:
        - CredentialTypePolicy
      summary: 'Preview: Delete a credential type policy document'
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Deletes a policy document. A document that is still attached to a scope is rejected with 409; detach it first.
      x-required-scope: credentialTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the credential type policy document.
          name: policyId
          in: path
      responses:
        '204':
          description: Operation successful.
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /credential-type-policies/scopes/{scopeId}/attachments:
    get:
      operationId: getCredentialTypePolicyAttachments
      tags:
        - CredentialTypePolicy
      summary: "Preview: Retrieve a scope's attached policy documents"
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Returns every attached policy document and the scope version. Attachments use evaluation order: floor first, then priority ascending within each group. Use this version when replacing the attachments. `scopeId` comes from `GET /instance` or `GET /projects/{projectId}`, and is null until the scope is first written. This route needs instance-level access, also for a project scope.
      x-required-scope: credentialTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the credential type policy scope.
          name: scopeId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credentialTypePolicyAttachmentsPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    put:
      operationId: replaceCredentialTypePolicyAttachments
      tags:
        - CredentialTypePolicy
      summary: "Preview: Replace a scope's attached policy documents"
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Replaces every attachment on a scope. `scopeId` comes from the scope's `GET` response once it has been written. Each `policyId` and each `(isFloor, priority)` pair must be unique within the list. `version` must match the current scope version. A stale version returns 409 without changes. A successful write bumps the scope's version.
      x-required-scope: credentialTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the credential type policy scope.
          name: scopeId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                attachments:
                  type: array
                  items:
                    type: object
                    properties:
                      policyId:
                        type: string
                        minLength: 1
                      priority:
                        type: integer
                      isFloor:
                        type: boolean
                    required:
                      - policyId
                      - priority
                      - isFloor
                version:
                  type: integer
                  minimum: 0
              required:
                - attachments
                - version
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credentialTypePolicyAttachmentsPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /credentials:
    get:
      operationId: getCredentials
      tags:
        - Credential
      summary: List credentials
      description: Retrieve all credentials from your instance. Only available for the instance owner and admin. Credential data (secrets) is not included.
      x-required-scope: credential:list
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        type:
                          type: string
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                        shared:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              role:
                                type: string
                              createdAt:
                                type: string
                                format: date-time
                              updatedAt:
                                type: string
                                format: date-time
                            required:
                              - id
                              - name
                              - role
                              - createdAt
                              - updatedAt
                      required:
                        - id
                        - name
                        - type
                        - createdAt
                        - updatedAt
                        - shared
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createCredential
      tags:
        - Credential
      summary: Create a credential
      description: Creates a credential that can be used by nodes of the specified type.
      x-required-scope: credential:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  minLength: 1
                  maxLength: 16
                  pattern: ^[a-zA-Z0-9_-]+$
                  description: An unused credential ID of 1–16 letters, digits, underscores, or hyphens. The supplied ID is preserved exactly. Omit to generate an ID.
                  example: R2DjclaysHbqn778
                name:
                  type: string
                  example: Joe's Github Credentials
                description:
                  type: string
                  nullable: true
                  maxLength: 512
                  description: Plain text, up to 512 characters. A blank value is saved as null. Ignored when credential descriptions are disabled.
                  example: Read-only key for the reporting database
                type:
                  type: string
                  example: githubApi
                data:
                  type: object
                  additionalProperties: {}
                  description: The credential data. Fields also accept n8n expressions, which are strings that start with "=".
                  writeOnly: true
                  example:
                    accessToken: ada612vad6fa5df4adf5a5dsf4389adsf76da7s
                isResolvable:
                  type: boolean
                  description: Whether this credential has resolvable fields
                  example: false
                createdAt:
                  type: string
                  format: date-time
                  readOnly: true
                  example: 2022-04-29T11:02:29.842Z
                updatedAt:
                  type: string
                  format: date-time
                  readOnly: true
                  example: 2022-04-29T11:02:29.842Z
                projectId:
                  type: string
                  description: Project to create the credential in. Defaults to the user's personal project.
                  example: VmwOO9HeTEj20kxM
              required:
                - name
                - type
                - data
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credentialPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /credentials/{credentialId}:
    get:
      operationId: getCredential
      tags:
        - Credential
      summary: Get credential by ID
      description: Retrieves a credential by ID. Credential data (secrets) is not included.
      x-required-scope: credential:read
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the credential.
          name: credentialId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credentialPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    patch:
      operationId: updateCredential
      tags:
        - Credential
      summary: Update credential by ID
      description: Updates an existing credential. You must be the owner of the credential.
      x-required-scope: credential:update
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the credential.
          name: credentialId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the credential
                  example: Updated Credential Name
                description:
                  type: string
                  nullable: true
                  maxLength: 512
                  description: Plain text, up to 512 characters. Send null or a blank value to clear it. Omit it to keep the stored value. Ignored when credential descriptions are disabled.
                  example: Read-only key for the reporting database
                type:
                  type: string
                  description: The credential type. If changing type, data must also be provided.
                  example: githubApi
                data:
                  type: object
                  additionalProperties: {}
                  description: The credential data. Required when changing credential type. Fields also accept n8n expressions, which are strings that start with "=".
                  writeOnly: true
                  example:
                    accessToken: new_token_value
                isGlobal:
                  type: boolean
                  description: Whether this credential is available globally
                  example: false
                isResolvable:
                  type: boolean
                  description: Whether this credential has resolvable fields
                  example: false
                isPartialData:
                  type: boolean
                  default: false
                  description: If true, unredacts and merges existing credential data with the provided data. If false, replaces the entire data object.
                  example: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credentialPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteCredential
      tags:
        - Credential
      summary: Delete credential by ID
      description: Deletes a credential from your instance. You must be the owner of the credential.
      x-required-scope: credential:delete
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the credential.
          name: credentialId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  type:
                    type: string
                  isManaged:
                    type: boolean
                  isGlobal:
                    type: boolean
                  isResolvable:
                    type: boolean
                  resolvableAllowFallback:
                    type: boolean
                  resolverId:
                    type: string
                    nullable: true
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  description:
                    type: string
                    nullable: true
                    description: Present only when credential descriptions are enabled.
                    example: Read-only key for the reporting database
                  usageScope:
                    type: string
                    enum:
                      - project
                      - instance
                required:
                  - id
                  - name
                  - type
                  - isManaged
                  - isGlobal
                  - isResolvable
                  - resolvableAllowFallback
                  - resolverId
                  - createdAt
                  - updatedAt
                  - usageScope
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /credentials/{credentialId}/transfer:
    put:
      operationId: transferCredential
      tags:
        - Credential
      summary: Transfer a credential to another project.
      description: Transfer a credential to another project.
      x-required-scope: credential:move
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the credential.
          name: credentialId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                destinationProjectId:
                  type: string
                  description: The ID of the project to transfer the credential to.
                  example: VmwOO9HeTEj20kxM
              required:
                - destinationProjectId
      responses:
        '204':
          description: Operation successful.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /credentials/{credentialId}/test:
    post:
      operationId: testCredential
      tags:
        - Credential
      summary: Test credential by ID
      description: Tests a credential by ID using the stored credential data.
      x-required-scope: credential:read
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the credential.
          name: credentialId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - OK
                      - Error
                    example: OK
                  message:
                    type: string
                    example: Connection successful!
                required:
                  - status
                  - message
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /credentials/schema/{credentialTypeName}:
    get:
      operationId: getCredentialType
      tags:
        - Credential
      summary: Show credential data schema
      parameters:
        - schema:
            type: string
          required: true
          description: The credential type name that you want to get the schema for
          name: credentialTypeName
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  additionalProperties:
                    type: boolean
                    enum:
                      - false
                  type:
                    type: string
                    enum:
                      - object
                  properties:
                    type: object
                    additionalProperties: {}
                    description: JSON Schema fragment for each of the credential type's fields, keyed by field name.
                    example:
                      apiKey:
                        type: string
                      domain:
                        type: string
                  required:
                    type: array
                    items:
                      type: string
                    description: Names of the fields that a request must include. A field with a default value is not listed.
                    example:
                      - apiKey
                      - domain
                  allOf:
                    type: array
                    items: {}
                required:
                  - additionalProperties
                  - type
                  - properties
                  - required
                additionalProperties: false
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /credentials/{credentialId}/dependencies:
    get:
      operationId: getCredentialDependencies
      tags:
        - Credential
      summary: List credential dependencies
      description: List the workflows and agents that use the credential.
      x-required-scope: credential:read
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
          required: true
          description: The ID of the credential.
          name: credentialId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dependencyListPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /data-tables:
    get:
      operationId: listDataTables
      tags:
        - DataTable
      summary: List all data tables
      description: Retrieve a list of all data tables with optional filtering, sorting, and pagination. Each table includes `sizeBytes`, the value the `size` sort option orders by.
      x-required-scope: dataTable:list
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
            format: jsonString
          required: false
          description: JSON string of filter conditions
          example: '{"name":"my-table"}'
          name: filter
          in: query
        - schema:
            type: string
            enum:
              - name:asc
              - name:desc
              - createdAt:asc
              - createdAt:desc
              - updatedAt:asc
              - updatedAt:desc
              - size:asc
              - size:desc
          required: false
          description: 'Sort format: field:asc or field:desc'
          example: name:asc
          name: sortBy
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the data table
                        name:
                          type: string
                          description: Name of the data table
                        columns:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                description: Column ID
                              name:
                                type: string
                                description: Column name
                              type:
                                type: string
                                description: Column data type
                                enum:
                                  - string
                                  - number
                                  - boolean
                                  - date
                              index:
                                type: integer
                                description: Column position
                              createdAt:
                                type: string
                                format: date-time
                                description: Timestamp when the column was created
                              updatedAt:
                                type: string
                                format: date-time
                                description: Timestamp when the column was last updated
                            required:
                              - id
                              - name
                              - type
                              - index
                              - createdAt
                              - updatedAt
                          description: Column definitions
                        projectId:
                          type: string
                          description: ID of the project this table belongs to
                        createdAt:
                          type: string
                          format: date-time
                          description: Timestamp when the table was created
                        updatedAt:
                          type: string
                          format: date-time
                          description: Timestamp when the table was last updated
                        sizeBytes:
                          type: integer
                          description: Physical storage in bytes, including indexes and internal overhead. Not reduced immediately by row deletion, and may be a few seconds stale.
                      required:
                        - id
                        - name
                        - columns
                        - projectId
                        - createdAt
                        - updatedAt
                        - sizeBytes
                  nextCursor:
                    type: string
                    nullable: true
                    description: Paginate through data tables by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
                    example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createDataTable
      tags:
        - DataTable
      summary: Create a new data table
      description: Create a new data table in your personal project or a team project you have access to.
      x-required-scope: dataTable:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                  description: Name of the data table
                  example: customers
                columns:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                        maxLength: 63
                        pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
                        description: Column name
                      type:
                        type: string
                        enum:
                          - string
                          - number
                          - boolean
                          - date
                        description: Column data type
                      csvColumnName:
                        type: string
                        description: Name of the CSV column to read the values from. If you do not set it, n8n maps the CSV columns by position.
                        example: Email Address
                    required:
                      - name
                      - type
                  description: Column definitions for the table
                projectId:
                  type: string
                  description: ID of the project to create the table in. When omitted, the table is created in the user's personal project.
                  example: a1b2c3d4
                fileId:
                  type: string
                  description: ID of a CSV file that you uploaded in the n8n editor. If you set it, n8n fills the new table with the rows from that file. Only a session-authenticated caller can upload a file, so an API-key caller cannot use this field.
                hasHeaders:
                  type: boolean
                  description: Set to true if the first row of the CSV file holds the column names. Applies only when you set `fileId`. The default is true.
              required:
                - name
                - columns
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dataTablePublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /data-tables/{dataTableId}:
    get:
      operationId: getDataTable
      tags:
        - DataTable
      summary: Get a data table
      description: Retrieve a specific data table by ID.
      x-required-scope: dataTable:read
      parameters:
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dataTablePublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    patch:
      operationId: updateDataTable
      tags:
        - DataTable
      summary: Update a data table
      description: Update a data table's name.
      x-required-scope: dataTable:update
      parameters:
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                  description: New name for the data table
                  example: updated-customers
              required:
                - name
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dataTablePublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteDataTable
      tags:
        - DataTable
      summary: Delete a data table
      description: Delete a data table. This will also delete all rows in the table.
      x-required-scope: dataTable:delete
      parameters:
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
      responses:
        '204':
          description: Operation successful.
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /data-tables/{dataTableId}/dependencies:
    get:
      operationId: getDataTableDependencies
      tags:
        - DataTable
      summary: List data table dependencies
      description: List the workflows that use the data table.
      x-required-scope: dataTable:read
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dependencyListPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /data-tables/{dataTableId}/columns:
    get:
      operationId: listDataTableColumns
      tags:
        - DataTable
      summary: List columns of a data table
      description: Retrieve all columns for a specific data table.
      x-required-scope: dataTableColumn:read
      parameters:
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Column ID
                    name:
                      type: string
                      description: Column name
                    type:
                      type: string
                      description: Column data type
                      enum:
                        - string
                        - number
                        - boolean
                        - date
                    index:
                      type: integer
                      description: Column position
                    createdAt:
                      type: string
                      format: date-time
                      description: Timestamp when the column was created
                    updatedAt:
                      type: string
                      format: date-time
                      description: Timestamp when the column was last updated
                    dataTableId:
                      type: string
                      description: ID of the data table this column belongs to
                  required:
                    - id
                    - name
                    - type
                    - index
                    - createdAt
                    - updatedAt
                    - dataTableId
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createDataTableColumn
      tags:
        - DataTable
      summary: Add a column to a data table
      description: Add a new column to an existing data table.
      x-required-scope: dataTableColumn:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 63
                  pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
                  description: Column name. Must start with a letter; only letters, digits, and underscores after that; maximum 63 characters.
                type:
                  type: string
                  enum:
                    - string
                    - number
                    - boolean
                    - date
                  description: Column data type
                index:
                  type: integer
                  minimum: 0
                  description: Column position (optional, appended to end if omitted)
              required:
                - name
                - type
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dataTableColumnPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /data-tables/{dataTableId}/columns/{columnId}:
    patch:
      operationId: updateDataTableColumn
      tags:
        - DataTable
      summary: Update a column
      description: Rename and/or reorder a column in a data table.
      x-required-scope: dataTableColumn:update
      parameters:
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the column
          name: columnId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 63
                  pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
                  description: Column name. Must start with a letter; only letters, digits, and underscores after that; maximum 63 characters.
                index:
                  type: integer
                  minimum: 0
                  description: New zero-based position for the column
              additionalProperties: false
              minProperties: 1
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dataTableColumnPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteDataTableColumn
      tags:
        - DataTable
      summary: Delete a column
      description: Remove a column from a data table. This will also delete all data in the column.
      x-required-scope: dataTableColumn:delete
      parameters:
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the column
          name: columnId
          in: path
      responses:
        '204':
          description: Operation successful.
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /data-tables/{dataTableId}/rows:
    get:
      operationId: listDataTableRows
      tags:
        - DataTable
      summary: List rows of a data table
      description: Retrieve rows from a data table with optional filtering, sorting, and pagination.
      x-required-scope: dataTableRow:read
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
        - schema:
            type: string
            format: jsonString
          required: false
          description: JSON string of filter conditions
          example: '{"type":"and","filters":[{"columnName":"status","condition":"eq","value":"active"}]}'
          name: filter
          in: query
        - schema:
            type: string
          required: false
          description: 'Sort format: columnName:asc or columnName:desc'
          example: createdAt:desc
          name: sortBy
          in: query
        - schema:
            type: string
          required: false
          description: Search text across all string columns
          name: search
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: The row ID (auto-generated)
                        createdAt:
                          type: string
                          format: date-time
                          description: The date and time the row was created
                        updatedAt:
                          type: string
                          format: date-time
                          description: The date and time the row was last updated
                      required:
                        - id
                        - createdAt
                        - updatedAt
                      description: A data table row with system columns (id, createdAt, updatedAt) and user-defined columns
                  nextCursor:
                    type: string
                    nullable: true
                    description: Paginate through rows by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
                    example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createDataTableRows
      tags:
        - DataTable
      summary: Insert rows into a data table
      description: Insert one or more rows into a data table.
      x-required-scope: dataTableRow:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                        - {}
                        - type: string
                        - {}
                  minItems: 1
                  description: Array of rows to insert. Each row is an object with column names as keys.
                returnType:
                  anyOf:
                    - type: string
                      enum:
                        - all
                    - type: string
                      enum:
                        - count
                    - type: string
                      enum:
                        - id
                  default: count
                  description: 'count: return only the number of rows inserted. id: return an array of objects with the id of each inserted row. all: return the full row data for all inserted rows.'
              required:
                - data
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      success:
                        type: boolean
                        enum:
                          - true
                      insertedRows:
                        type: integer
                    required:
                      - success
                      - insertedRows
                    description: Returned when returnType is 'count'
                  - type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                      required:
                        - id
                      additionalProperties: false
                    description: Returned when returnType is 'id'
                  - type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: The row ID (auto-generated)
                        createdAt:
                          type: string
                          format: date-time
                          description: The date and time the row was created
                        updatedAt:
                          type: string
                          format: date-time
                          description: The date and time the row was last updated
                      required:
                        - id
                        - createdAt
                        - updatedAt
                      description: A data table row with system columns (id, createdAt, updatedAt) and user-defined columns
                    description: Returned when returnType is 'all'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /data-tables/{dataTableId}/rows/upsert:
    post:
      operationId: upsertDataTableRow
      tags:
        - DataTable
      summary: Upsert a row in a data table
      description: Update an existing row, or insert a new one if no row matches the filter conditions.
      x-required-scope: dataTableRow:upsert
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  type: object
                  properties:
                    type:
                      anyOf:
                        - type: string
                          enum:
                            - and
                        - type: string
                          enum:
                            - or
                      default: and
                    filters:
                      type: array
                      items:
                        type: object
                        properties:
                          columnName:
                            type: string
                            minLength: 1
                            maxLength: 63
                            pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
                          condition:
                            anyOf:
                              - type: string
                                enum:
                                  - eq
                              - type: string
                                enum:
                                  - neq
                              - type: string
                                enum:
                                  - like
                              - type: string
                                enum:
                                  - ilike
                              - type: string
                                enum:
                                  - gt
                              - type: string
                                enum:
                                  - gte
                              - type: string
                                enum:
                                  - lt
                              - type: string
                                enum:
                                  - lte
                          value:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                              - type: string
                              - {}
                              - {}
                        required:
                          - columnName
                          - condition
                          - value
                      minItems: 1
                  required:
                    - filters
                  description: Filter conditions to match an existing row. If no row matches, n8n inserts a new row.
                data:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - {}
                      - type: string
                      - {}
                  description: Column values for the row
                returnData:
                  type: boolean
                  default: false
                  description: 'Set to true to return the upserted row(s): the matching rows if updated, or the new row if one was inserted. Set to false to return true on success.'
                dryRun:
                  type: boolean
                  default: false
                  description: Set to true to preview the change without saving it.
              required:
                - filter
                - data
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                anyOf:
                  - type: boolean
                    description: Returned when returnData is false and dryRun is false
                  - type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          nullable: true
                          description: The row ID (auto-generated)
                        createdAt:
                          type: string
                          nullable: true
                          format: date-time
                          description: The date and time the row was created
                        updatedAt:
                          type: string
                          nullable: true
                          format: date-time
                          description: The date and time the row was last updated
                        dryRunState:
                          type: string
                          enum:
                            - before
                            - after
                          description: Whether this entry shows the row state before or after the change
                      required:
                        - id
                        - createdAt
                        - updatedAt
                        - dryRunState
                    description: 'Returned when dryRun is true: one entry per row per before/after state'
                  - type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: The row ID (auto-generated)
                        createdAt:
                          type: string
                          format: date-time
                          description: The date and time the row was created
                        updatedAt:
                          type: string
                          format: date-time
                          description: The date and time the row was last updated
                      required:
                        - id
                        - createdAt
                        - updatedAt
                      description: A data table row with system columns (id, createdAt, updatedAt) and user-defined columns
                    description: Returned when returnData is true and dryRun is false
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /data-tables/{dataTableId}/rows/update:
    patch:
      operationId: updateDataTableRows
      tags:
        - DataTable
      summary: Update rows in a data table
      description: Update rows matching filter conditions in a data table.
      x-required-scope: dataTableRow:update
      parameters:
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  type: object
                  properties:
                    type:
                      anyOf:
                        - type: string
                          enum:
                            - and
                        - type: string
                          enum:
                            - or
                      default: and
                    filters:
                      type: array
                      items:
                        type: object
                        properties:
                          columnName:
                            type: string
                            minLength: 1
                            maxLength: 63
                            pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
                          condition:
                            anyOf:
                              - type: string
                                enum:
                                  - eq
                              - type: string
                                enum:
                                  - neq
                              - type: string
                                enum:
                                  - like
                              - type: string
                                enum:
                                  - ilike
                              - type: string
                                enum:
                                  - gt
                              - type: string
                                enum:
                                  - gte
                              - type: string
                                enum:
                                  - lt
                              - type: string
                                enum:
                                  - lte
                          value:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                              - type: string
                              - {}
                              - {}
                        required:
                          - columnName
                          - condition
                          - value
                      minItems: 1
                  required:
                    - filters
                  description: Filter conditions to match rows for update.
                data:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - {}
                      - type: string
                      - {}
                  description: Column values to update
                returnData:
                  type: boolean
                  default: false
                  description: Set to true to return the updated row(s). Set to false to return true on success.
                dryRun:
                  type: boolean
                  default: false
                  description: Set to true to preview the change without saving it.
              required:
                - filter
                - data
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                anyOf:
                  - type: boolean
                    description: Returned when returnData is false and dryRun is false
                  - type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          nullable: true
                          description: The row ID (auto-generated)
                        createdAt:
                          type: string
                          nullable: true
                          format: date-time
                          description: The date and time the row was created
                        updatedAt:
                          type: string
                          nullable: true
                          format: date-time
                          description: The date and time the row was last updated
                        dryRunState:
                          type: string
                          enum:
                            - before
                            - after
                          description: Whether this entry shows the row state before or after the change
                      required:
                        - id
                        - createdAt
                        - updatedAt
                        - dryRunState
                    description: 'Returned when dryRun is true: one entry per row per before/after state'
                  - type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: The row ID (auto-generated)
                        createdAt:
                          type: string
                          format: date-time
                          description: The date and time the row was created
                        updatedAt:
                          type: string
                          format: date-time
                          description: The date and time the row was last updated
                      required:
                        - id
                        - createdAt
                        - updatedAt
                      description: A data table row with system columns (id, createdAt, updatedAt) and user-defined columns
                    description: Returned when returnData is true and dryRun is false
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /data-tables/{dataTableId}/rows/clear:
    delete:
      operationId: clearDataTableRows
      tags:
        - DataTable
      summary: Clear all rows from a data table
      description: Permanently delete all rows from a data table. The table structure is retained. This action cannot be undone.
      x-required-scope: dataTableRow:delete
      parameters:
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedCount:
                    type: integer
                    description: The number of rows that were deleted
                required:
                  - deletedCount
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /data-tables/{dataTableId}/rows/delete:
    delete:
      operationId: deleteDataTableRows
      tags:
        - DataTable
      summary: Delete rows from a data table
      description: Delete rows matching filter conditions from a data table. Filter is required to prevent accidental deletion of all data.
      x-required-scope: dataTableRow:delete
      parameters:
        - schema:
            type: string
            format: nanoid
            pattern: ^[A-Za-z0-9]{16}$
          required: true
          description: The ID of the data table
          name: dataTableId
          in: path
        - schema:
            type: string
            format: jsonString
          required: true
          description: JSON string of filter conditions. Required to prevent accidental deletion of all data.
          example: '{"type":"and","filters":[{"columnName":"status","condition":"eq","value":"archived"}]}'
          name: filter
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          required: false
          description: If true, return the deleted rows. If false, return true on success.
          name: returnData
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          required: false
          description: If true, preview which rows would be deleted without actually deleting them.
          name: dryRun
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                anyOf:
                  - type: boolean
                    description: Returned when returnData is false and dryRun is false
                  - type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          nullable: true
                          description: The row ID (auto-generated)
                        createdAt:
                          type: string
                          nullable: true
                          format: date-time
                          description: The date and time the row was created
                        updatedAt:
                          type: string
                          nullable: true
                          format: date-time
                          description: The date and time the row was last updated
                        dryRunState:
                          type: string
                          enum:
                            - before
                            - after
                          description: Whether this entry shows the row state before or after the change
                      required:
                        - id
                        - createdAt
                        - updatedAt
                        - dryRunState
                    description: 'Returned when dryRun is true: one entry per row per before/after state'
                  - type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: The row ID (auto-generated)
                        createdAt:
                          type: string
                          format: date-time
                          description: The date and time the row was created
                        updatedAt:
                          type: string
                          format: date-time
                          description: The date and time the row was last updated
                      required:
                        - id
                        - createdAt
                        - updatedAt
                      description: A data table row with system columns (id, createdAt, updatedAt) and user-defined columns
                    description: Returned when returnData is true and dryRun is false
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /discover:
    get:
      operationId: getDiscover
      tags:
        - Discover
      summary: Discover available API capabilities
      description: Returns a filtered capability map based on the caller's API key scopes. Each resource includes the operations and endpoints accessible to the authenticated API key. Use query parameters to narrow the response.
      parameters:
        - schema:
            type: string
            enum:
              - schemas
            description: Include additional data. Use "schemas" to inline request body schemas per endpoint, eliminating the need to fetch the full OpenAPI spec.
          required: false
          name: include
          in: query
        - schema:
            type: string
            description: Filter to a specific resource (e.g. "workflow", "tags", "credential").
          required: false
          name: resource
          in: query
        - schema:
            type: string
            description: Filter to endpoints with a specific operation (e.g. "read", "create", "list").
          required: false
          name: operation
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      scopes:
                        type: array
                        items:
                          type: string
                        description: The API key's active scopes
                      resources:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            operations:
                              type: array
                              items:
                                type: string
                            endpoints:
                              type: array
                              items:
                                type: object
                                properties:
                                  method:
                                    type: string
                                  path:
                                    type: string
                                  operationId:
                                    type: string
                                  requestSchema:
                                    type: object
                                    description: Request body schema (only present when include=schemas and the endpoint accepts a request body).
                                required:
                                  - method
                                  - path
                                  - operationId
                          required:
                            - operations
                            - endpoints
                      filters:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            description:
                              type: string
                            values:
                              type: array
                              items:
                                type: string
                          required:
                            - description
                            - values
                        description: Available query parameter filters. The values arrays reflect what the caller's scopes permit.
                      specUrl:
                        type: string
                        description: URL to the full OpenAPI specification
                    required:
                      - scopes
                      - resources
                      - filters
                      - specUrl
                required:
                  - data
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/test-runs:
    get:
      operationId: getTestRuns
      tags:
        - Evaluation
      summary: Retrieve test runs
      description: Retrieve the evaluation test runs of a workflow.
      x-required-scope: testRun:list
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
        - schema:
            type: string
            enum:
              - new
              - running
              - completed
              - error
              - cancelled
            description: Status to filter the test runs by.
          required: false
          name: status
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 9f8e7d6c5b4a3210
                        status:
                          type: string
                          enum:
                            - new
                            - running
                            - completed
                            - error
                            - cancelled
                        runAt:
                          type: string
                          nullable: true
                          format: date-time
                        completedAt:
                          type: string
                          nullable: true
                          format: date-time
                        metrics:
                          type: object
                          description: Aggregated metrics collected across the run's test cases.
                          additionalProperties: true
                          nullable: true
                        errorCode:
                          type: string
                          nullable: true
                        errorDetails:
                          type: object
                          additionalProperties: true
                          nullable: true
                        finalResult:
                          type: string
                          nullable: true
                          enum:
                            - success
                            - error
                            - warning
                          description: Overall result of the run, derived from its test cases once completed.
                        testCaseCount:
                          type: integer
                          example: 42
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - id
                        - status
                        - runAt
                        - completedAt
                        - metrics
                        - errorCode
                        - errorDetails
                        - finalResult
                        - testCaseCount
                        - createdAt
                        - updatedAt
                  nextCursor:
                    type: string
                    nullable: true
                    description: Paginate through test runs by setting the cursor parameter to the nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
                    example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createTestRun
      tags:
        - Evaluation
      summary: Trigger a test run
      description: Start a new evaluation test run for a workflow. The workflow must contain a configured evaluation trigger. Requires the `workflow:execute` project scope in addition to the `testRun:create` API key scope.
      x-required-scope: testRun:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: 9f8e7d6c5b4a3210
                  status:
                    type: string
                    enum:
                      - new
                      - running
                      - completed
                      - error
                      - cancelled
                  createdAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - status
                  - createdAt
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '402':
          $ref: '#/components/responses/paymentRequired'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/test-runs/{runId}:
    get:
      operationId: getTestRun
      tags:
        - Evaluation
      summary: Retrieve a test run
      description: Retrieve a single evaluation test run of a workflow, including its aggregated metrics and final result.
      x-required-scope: testRun:read
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the test run.
          name: runId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: 9f8e7d6c5b4a3210
                  status:
                    type: string
                    enum:
                      - new
                      - running
                      - completed
                      - error
                      - cancelled
                  runAt:
                    type: string
                    nullable: true
                    format: date-time
                  completedAt:
                    type: string
                    nullable: true
                    format: date-time
                  metrics:
                    type: object
                    description: Aggregated metrics collected across the run's test cases.
                    additionalProperties: true
                    nullable: true
                  errorCode:
                    type: string
                    nullable: true
                  errorDetails:
                    type: object
                    additionalProperties: true
                    nullable: true
                  finalResult:
                    type: string
                    nullable: true
                    enum:
                      - success
                      - error
                      - warning
                    description: Overall result of the run, derived from its test cases once completed.
                  testCaseCount:
                    type: integer
                    example: 42
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - status
                  - runAt
                  - completedAt
                  - metrics
                  - errorCode
                  - errorDetails
                  - finalResult
                  - testCaseCount
                  - createdAt
                  - updatedAt
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/test-runs/{runId}/test-cases:
    get:
      operationId: getTestCases
      tags:
        - Evaluation
      summary: Retrieve test run cases
      description: Retrieve the per-case results of an evaluation test run.
      x-required-scope: testRun:read
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the test run.
          name: runId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 1a2b3c4d5e6f7080
                        status:
                          type: string
                          enum:
                            - new
                            - running
                            - evaluation_running
                            - success
                            - error
                            - warning
                            - cancelled
                        runAt:
                          type: string
                          nullable: true
                          format: date-time
                        completedAt:
                          type: string
                          nullable: true
                          format: date-time
                        metrics:
                          type: object
                          description: Metrics produced by this test case.
                          additionalProperties: true
                          nullable: true
                        errorCode:
                          type: string
                          nullable: true
                        errorDetails:
                          type: object
                          additionalProperties: true
                          nullable: true
                        inputs:
                          type: object
                          description: Input data for this test case.
                          additionalProperties: true
                          nullable: true
                        outputs:
                          type: object
                          description: Output data produced by this test case.
                          additionalProperties: true
                          nullable: true
                        executionId:
                          type: integer
                          nullable: true
                          description: ID of the underlying workflow execution, if still retained.
                      required:
                        - id
                        - status
                        - runAt
                        - completedAt
                        - metrics
                        - errorCode
                        - errorDetails
                        - inputs
                        - outputs
                        - executionId
                  nextCursor:
                    type: string
                    nullable: true
                    description: Paginate through test cases by setting the cursor parameter to the nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
                    example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/test-runs/{runId}/cancel:
    post:
      operationId: cancelTestRun
      tags:
        - Evaluation
      summary: Cancel a test run
      description: Cancel a running evaluation test run of a workflow. Requires the `workflow:execute` project scope in addition to the `testRun:cancel` API key scope.
      x-required-scope: testRun:cancel
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the test run.
          name: runId
          in: path
      responses:
        '202':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: 9f8e7d6c5b4a3210
                  status:
                    type: string
                    enum:
                      - cancelled
                required:
                  - id
                  - status
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /executions:
    get:
      operationId: getExecutions
      tags:
        - Executions
      summary: Retrieve all executions
      description: Retrieve all executions from your instance.
      x-required-scope: execution:list
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
            description: Whether or not to include the execution's detailed data.
          required: false
          name: includeData
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
            description: Whether to return the full execution data even if it exceeds the configured size limit (EXECUTIONS_DATA_MAX_DISPLAY_SIZE). Oversized executions are otherwise returned without their data.
          required: false
          name: ignoreDataSizeLimit
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            description: Controls execution data redaction. When `true`, execution output data is always redacted. When `false`, requests unredacted (revealed) data — requires the `execution:reveal` scope. When omitted, follows the workflow redaction policy.
          required: false
          name: redactExecutionData
          in: query
        - schema:
            type: string
            enum:
              - canceled
              - crashed
              - error
              - new
              - running
              - success
              - unknown
              - waiting
            description: Status to filter the executions by.
          required: false
          name: status
          in: query
        - schema:
            type: string
            description: Workflow to filter the executions by.
            example: '1000'
          required: false
          name: workflowId
          in: query
        - schema:
            type: string
            example: VmwOO9HeTEj20kxM
          required: false
          name: projectId
          in: query
        - schema:
            type: string
            format: date-time
            description: Only return executions that started after this time.
            example: 2024-01-01T00:00:00.000Z
          required: false
          name: startedAfter
          in: query
        - schema:
            type: string
            format: date-time
            description: Only return executions that started before this time.
            example: 2024-12-31T23:59:59.999Z
          required: false
          name: startedBefore
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: '1000'
                        finished:
                          type: boolean
                          description: Whether the execution ran to completion. Use `status` instead.
                          example: true
                          deprecated: true
                        mode:
                          type: string
                          enum:
                            - cli
                            - error
                            - integrated
                            - internal
                            - manual
                            - retry
                            - trigger
                            - webhook
                            - evaluation
                            - chat
                            - agent
                          example: manual
                        retryOf:
                          type: string
                          nullable: true
                          description: ID of the execution this one is a retry of.
                        retrySuccessId:
                          type: string
                          nullable: true
                          description: ID of the retry that succeeded, if this execution failed and a retry did not.
                          example: '2'
                        status:
                          type: string
                          enum:
                            - canceled
                            - crashed
                            - error
                            - new
                            - running
                            - success
                            - unknown
                            - waiting
                        startedAt:
                          type: string
                          nullable: true
                          format: date-time
                          description: Null until the execution leaves the queue and starts running.
                        stoppedAt:
                          type: string
                          nullable: true
                          format: date-time
                          description: When the execution stopped. Null for the `new`, `running` and `unknown` statuses; a `waiting` execution has stopped its current run, so it has a value.
                        workflowId:
                          type: string
                          example: '1000'
                        waitTill:
                          type: string
                          nullable: true
                          format: date-time
                          description: The time at which a waiting execution resumes.
                        storedAt:
                          type: string
                          description: Where the execution data is stored.
                          enum:
                            - db
                            - fs
                            - s3
                            - az
                        jsonSizeBytes:
                          type: number
                          description: Size of the stored execution data in bytes. 0 means unknown.
                          example: 0
                        workflowVersionId:
                          type: string
                          nullable: true
                          description: ID of the workflow version this execution ran.
                        data:
                          type: object
                          description: Detailed execution data. Only included when `includeData` is `true`.
                          additionalProperties: true
                          properties:
                            redactionInfo:
                              type: object
                              nullable: true
                              description: Present when execution data has been redacted.
                              properties:
                                isRedacted:
                                  type: boolean
                                  description: Whether the execution data was redacted.
                                reason:
                                  type: string
                                  description: The reason for redaction.
                                canReveal:
                                  type: boolean
                                  description: Whether the current user has permission to reveal the redacted data.
                        workflowData:
                          type: object
                          description: The workflow as it was saved when the execution ran. Only included when `includeData` is `true`. Older executions carry more fields than newer ones.
                          additionalProperties: true
                        customData:
                          type: object
                          description: Execution metadata set by the workflow. Only included when `includeData` is `true`.
                          additionalProperties:
                            type: string
                        dataTooLargeToDisplay:
                          type: boolean
                          description: Present and true when the execution data was larger than `EXECUTIONS_DATA_MAX_DISPLAY_SIZE`. `data` is then empty and `jsonSizeBytes` holds the real size. Use `ignoreDataSizeLimit` to read it anyway.
                      required:
                        - id
                        - finished
                        - mode
                        - retryOf
                        - retrySuccessId
                        - status
                        - startedAt
                        - stoppedAt
                        - workflowId
                        - waitTill
                  nextCursor:
                    type: string
                    nullable: true
                    description: Paginate through executions by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
                    example: eyJsYXN0SWQiOiIxMDAwIiwibGltaXQiOjEwMH0=
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /executions/{executionId}:
    get:
      operationId: getExecution
      tags:
        - Executions
      summary: Retrieve an execution
      description: Retrieve an execution from your instance.
      x-required-scope: execution:read
      parameters:
        - schema:
            type: integer
            minimum: 1
          required: true
          description: The ID of the execution.
          name: executionId
          in: path
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
            description: Whether or not to include the execution's detailed data.
          required: false
          name: includeData
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
            description: Whether to return the full execution data even if it exceeds the configured size limit (EXECUTIONS_DATA_MAX_DISPLAY_SIZE). Oversized executions are otherwise returned without their data.
          required: false
          name: ignoreDataSizeLimit
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            description: Controls execution data redaction. When `true`, execution output data is always redacted. When `false`, requests unredacted (revealed) data — requires the `execution:reveal` scope. When omitted, follows the workflow redaction policy.
          required: false
          name: redactExecutionData
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: '1000'
                  finished:
                    type: boolean
                    description: Whether the execution ran to completion. Use `status` instead.
                    example: true
                    deprecated: true
                  mode:
                    type: string
                    enum:
                      - cli
                      - error
                      - integrated
                      - internal
                      - manual
                      - retry
                      - trigger
                      - webhook
                      - evaluation
                      - chat
                      - agent
                    example: manual
                  retryOf:
                    type: string
                    nullable: true
                    description: ID of the execution this one is a retry of.
                  retrySuccessId:
                    type: string
                    nullable: true
                    description: ID of the retry that succeeded, if this execution failed and a retry did not.
                    example: '2'
                  status:
                    type: string
                    enum:
                      - canceled
                      - crashed
                      - error
                      - new
                      - running
                      - success
                      - unknown
                      - waiting
                  createdAt:
                    type: string
                    format: date-time
                  startedAt:
                    type: string
                    nullable: true
                    format: date-time
                    description: Null until the execution leaves the queue and starts running.
                  stoppedAt:
                    type: string
                    nullable: true
                    format: date-time
                    description: When the execution stopped. Null for the `new`, `running` and `unknown` statuses; a `waiting` execution has stopped its current run, so it has a value.
                  deletedAt:
                    type: string
                    nullable: true
                    format: date-time
                    description: Always null. Soft-deleted executions are not returned.
                  workflowId:
                    type: string
                    example: '1000'
                  waitTill:
                    type: string
                    nullable: true
                    format: date-time
                    description: The time at which a waiting execution resumes.
                  storedAt:
                    type: string
                    description: Where the execution data is stored.
                    enum:
                      - db
                      - fs
                      - s3
                      - az
                  tracingContext:
                    type: object
                    nullable: true
                    properties:
                      traceparent:
                        type: string
                      tracestate:
                        type: string
                    required:
                      - traceparent
                    description: W3C trace context propagated with the execution.
                  deduplicationKey:
                    type: string
                    nullable: true
                    description: Key used to stop a duplicate execution from being created.
                  jsonSizeBytes:
                    type: number
                    description: Size of the stored execution data in bytes. 0 means unknown.
                    example: 0
                  binaryDataSizeBytes:
                    type: number
                    description: Size of the stored binary data in bytes. 0 means unknown.
                    example: 0
                  workflowVersionId:
                    type: string
                    nullable: true
                    description: ID of the workflow version this execution ran.
                  usedPrivateCredentials:
                    type: boolean
                    description: Whether the execution used credentials that are not shared with the project.
                    example: false
                  data:
                    type: object
                    description: Detailed execution data. Only included when `includeData` is `true`.
                    additionalProperties: true
                    properties:
                      redactionInfo:
                        type: object
                        nullable: true
                        description: Present when execution data has been redacted.
                        properties:
                          isRedacted:
                            type: boolean
                            description: Whether the execution data was redacted.
                          reason:
                            type: string
                            description: The reason for redaction.
                          canReveal:
                            type: boolean
                            description: Whether the current user has permission to reveal the redacted data.
                  customData:
                    type: object
                    description: Execution metadata set by the workflow. Only included when `includeData` is `true`.
                    additionalProperties:
                      type: string
                  workflowData:
                    type: object
                    description: The workflow as it was saved when the execution ran. Only included when `includeData` is `true`. Older executions carry more fields than newer ones.
                    additionalProperties: true
                  dataTooLargeToDisplay:
                    type: boolean
                    description: Present and true when the execution data was larger than `EXECUTIONS_DATA_MAX_DISPLAY_SIZE`. `data` is then empty and `jsonSizeBytes` holds the real size. Use `ignoreDataSizeLimit` to read it anyway.
                required:
                  - id
                  - finished
                  - mode
                  - retryOf
                  - retrySuccessId
                  - status
                  - createdAt
                  - startedAt
                  - stoppedAt
                  - deletedAt
                  - workflowId
                  - waitTill
                  - storedAt
                  - tracingContext
                  - deduplicationKey
                  - jsonSizeBytes
                  - binaryDataSizeBytes
                  - workflowVersionId
                  - usedPrivateCredentials
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteExecution
      tags:
        - Executions
      summary: Delete an execution
      description: Deletes an execution from your instance.
      x-required-scope: execution:delete
      parameters:
        - schema:
            type: integer
            minimum: 1
          required: true
          description: The ID of the execution.
          name: executionId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: number
                    description: ID of the deleted execution. This endpoint returns it as a number, where every other execution endpoint returns a string.
                    example: 1000
                  finished:
                    type: boolean
                    description: Whether the execution ran to completion. Use `status` instead.
                    example: true
                    deprecated: true
                  mode:
                    type: string
                    enum:
                      - cli
                      - error
                      - integrated
                      - internal
                      - manual
                      - retry
                      - trigger
                      - webhook
                      - evaluation
                      - chat
                      - agent
                    example: manual
                  retryOf:
                    type: string
                    nullable: true
                    description: ID of the execution this one is a retry of.
                  retrySuccessId:
                    type: string
                    nullable: true
                    description: ID of the retry that succeeded, if this execution failed and a retry did not.
                    example: '2'
                  status:
                    type: string
                    enum:
                      - canceled
                      - crashed
                      - error
                      - new
                      - running
                      - success
                      - unknown
                      - waiting
                  createdAt:
                    type: string
                    format: date-time
                  startedAt:
                    type: string
                    nullable: true
                    format: date-time
                    description: Null until the execution leaves the queue and starts running.
                  stoppedAt:
                    type: string
                    nullable: true
                    format: date-time
                    description: When the execution stopped. Null for the `new`, `running` and `unknown` statuses; a `waiting` execution has stopped its current run, so it has a value.
                  deletedAt:
                    type: string
                    nullable: true
                    format: date-time
                    description: Always null. Soft-deleted executions are not returned.
                  workflowId:
                    type: string
                    example: '1000'
                  waitTill:
                    type: string
                    nullable: true
                    format: date-time
                    description: The time at which a waiting execution resumes.
                  storedAt:
                    type: string
                    description: Where the execution data is stored.
                    enum:
                      - db
                      - fs
                      - s3
                      - az
                  tracingContext:
                    type: object
                    nullable: true
                    properties:
                      traceparent:
                        type: string
                      tracestate:
                        type: string
                    required:
                      - traceparent
                    description: W3C trace context propagated with the execution.
                  deduplicationKey:
                    type: string
                    nullable: true
                    description: Key used to stop a duplicate execution from being created.
                  jsonSizeBytes:
                    type: number
                    description: Size of the stored execution data in bytes. 0 means unknown.
                    example: 0
                  binaryDataSizeBytes:
                    type: number
                    description: Size of the stored binary data in bytes. 0 means unknown.
                    example: 0
                  workflowVersionId:
                    type: string
                    nullable: true
                    description: ID of the workflow version this execution ran.
                  usedPrivateCredentials:
                    type: boolean
                    description: Whether the execution used credentials that are not shared with the project.
                    example: false
                required:
                  - id
                  - finished
                  - mode
                  - retryOf
                  - retrySuccessId
                  - status
                  - createdAt
                  - startedAt
                  - stoppedAt
                  - deletedAt
                  - workflowId
                  - waitTill
                  - storedAt
                  - tracingContext
                  - deduplicationKey
                  - jsonSizeBytes
                  - binaryDataSizeBytes
                  - workflowVersionId
                  - usedPrivateCredentials
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /executions/{executionId}/tags:
    get:
      operationId: getExecutionTags
      tags:
        - Executions
      summary: Get execution tags
      description: Get annotation tags for an execution.
      x-required-scope: executionTags:list
      parameters:
        - schema:
            type: integer
            minimum: 1
          required: true
          description: The ID of the execution.
          name: executionId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/executionTagsPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    put:
      operationId: updateExecutionTags
      tags:
        - Executions
      summary: Update tags of an execution
      description: Update annotation tags of an execution.
      x-required-scope: executionTags:update
      parameters:
        - schema:
            type: integer
            minimum: 1
          required: true
          description: The ID of the execution.
          name: executionId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    example: 2tUt1wbLX592XDdX
                required:
                  - id
                additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/executionTagsPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /executions/stop:
    post:
      operationId: stopManyExecutions
      tags:
        - Executions
      summary: Stop multiple executions
      description: Stop multiple executions from your instance based on filter criteria.
      x-required-scope: execution:stop
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: array
                  items:
                    type: string
                    enum:
                      - queued
                      - running
                      - waiting
                  minItems: 1
                  description: Array of execution statuses to stop. Must include at least one status.
                  example:
                    - queued
                    - running
                    - waiting
                workflowId:
                  type: string
                  description: Optional workflow ID to filter executions. If not provided, will stop executions across all accessible workflows. The literal value `all` has the same effect as omitting it.
                  example: 2tUt1wbLX592XDdX
                startedAfter:
                  type: string
                  format: date-time
                  description: Only stop executions that started after this time.
                  example: 2024-01-01T00:00:00.000Z
                startedBefore:
                  type: string
                  format: date-time
                  description: Only stop executions that started before this time.
                  example: 2024-12-31T23:59:59.999Z
              required:
                - status
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  stopped:
                    type: integer
                    description: The number of executions that were successfully stopped.
                    example: 5
                required:
                  - stopped
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /executions/{executionId}/stop:
    post:
      operationId: stopExecution
      tags:
        - Executions
      summary: Stop an execution
      description: Stop an execution by id.
      x-required-scope: execution:stop
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: integer
            minimum: 1
          required: true
          description: The ID of the execution.
          name: executionId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  mode:
                    type: string
                    enum:
                      - cli
                      - error
                      - integrated
                      - internal
                      - manual
                      - retry
                      - trigger
                      - webhook
                      - evaluation
                      - chat
                      - agent
                    example: manual
                  startedAt:
                    type: string
                    format: date-time
                    description: The time at which the execution started.
                  stoppedAt:
                    type: string
                    format: date-time
                    description: The time at which the execution stopped. Absent when no stop time was recorded.
                  finished:
                    type: boolean
                    description: Whether the execution ran to completion. Use `status` instead.
                    example: false
                    deprecated: true
                  status:
                    type: string
                    enum:
                      - canceled
                      - crashed
                      - error
                      - new
                      - running
                      - success
                      - unknown
                      - waiting
                    example: canceled
                required:
                  - mode
                  - startedAt
                  - finished
                  - status
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /executions/{executionId}/retry:
    post:
      operationId: retryExecution
      tags:
        - Executions
      summary: Retry an execution
      description: Retry an execution from your instance.
      x-required-scope: execution:retry
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: integer
            minimum: 1
          required: true
          description: The ID of the execution.
          name: executionId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loadWorkflow:
                  type: boolean
                  description: Whether to load the currently saved workflow to execute instead of the one saved at the time of the execution. If set to true, it will retry with the latest version of the workflow.
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID of the new execution that the retry started.
                    example: '1001'
                  mode:
                    type: string
                    enum:
                      - cli
                      - error
                      - integrated
                      - internal
                      - manual
                      - retry
                      - trigger
                      - webhook
                      - evaluation
                      - chat
                      - agent
                    example: retry
                  startedAt:
                    type: string
                    nullable: true
                    format: date-time
                    description: The time at which the new execution started.
                  workflowId:
                    type: string
                    example: '1000'
                  finished:
                    type: boolean
                    description: Whether the execution ran to completion. Use `status` instead.
                    example: true
                    deprecated: true
                  retryOf:
                    type: string
                    nullable: true
                    description: ID of the execution this one is a retry of.
                  status:
                    type: string
                    enum:
                      - canceled
                      - crashed
                      - error
                      - new
                      - running
                      - success
                      - unknown
                      - waiting
                  waitTill:
                    type: string
                    nullable: true
                    format: date-time
                    description: The time at which a waiting execution resumes.
                  data:
                    type: object
                    description: Run data of the new execution. Absent when the API key's user cannot read the executions of the workflow.
                    additionalProperties: true
                    properties:
                      redactionInfo:
                        type: object
                        nullable: true
                        description: Present when execution data has been redacted.
                        properties:
                          isRedacted:
                            type: boolean
                            description: Whether the execution data was redacted.
                          reason:
                            type: string
                            description: The reason for redaction.
                          canReveal:
                            type: boolean
                            description: Whether the current user has permission to reveal the redacted data.
                  workflowData:
                    type: object
                    description: The workflow as it was saved when the original execution ran. `loadWorkflow` changes which workflow the retry runs, not what this field reports. Absent when the API key's user cannot read the executions of the workflow.
                    additionalProperties: true
                  customData:
                    type: object
                    description: Execution metadata carried over from the original execution. Absent when the API key's user cannot read the executions of the workflow.
                    additionalProperties:
                      type: string
                  annotation:
                    type: object
                    properties:
                      id:
                        type: number
                      vote:
                        type: string
                        nullable: true
                        description: Vote left on the original execution.
                        enum:
                          - up
                          - down
                      tags:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                          required:
                            - id
                            - name
                    required:
                      - id
                      - vote
                      - tags
                    description: Annotation on the original execution. Absent when it carries none, or when the API key's user cannot read the executions of the workflow.
                  storedAt:
                    type: string
                    description: Where the execution data is stored.
                    enum:
                      - db
                      - fs
                      - s3
                      - az
                required:
                  - id
                  - mode
                  - startedAt
                  - workflowId
                  - finished
                  - retryOf
                  - status
                  - storedAt
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /projects/{projectId}/folders:
    get:
      operationId: listFolders
      tags:
        - Folders
      summary: Retrieve folders
      description: Retrieve folders within a project. Supports filtering, sorting, field selection, and pagination.
      x-required-scope: folder:list
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
        - schema:
            type: string
            description: JSON-encoded filter object. Supported fields — parentFolderId, name, tags (array of tag names), excludeFolderIdAndDescendants.
            example: '{"parentFolderId":"abc123","name":"My Folder"}'
          required: false
          name: filter
          in: query
        - schema:
            type: string
            description: JSON-encoded array of fields to include. Valid fields — id, name, createdAt, updatedAt, project, tags, parentFolder, workflowCount, subFolderCount, path.
            example: '["id","name","tags","workflowCount"]'
          required: false
          name: select
          in: query
        - schema:
            type: string
            enum:
              - name:asc
              - name:desc
              - createdAt:asc
              - createdAt:desc
              - updatedAt:asc
              - updatedAt:desc
            description: Sort order for results.
          required: false
          name: sortBy
          in: query
        - schema:
            type: string
            description: Number of items to skip for pagination. Defaults to 0.
          required: false
          name: skip
          in: query
        - schema:
            type: string
            description: Number of items to return. Defaults to 10.
          required: false
          name: take
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    description: Total number of folders matching the query.
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          readOnly: true
                          example: zLXWgYyZrZ4Gn1Vk
                        name:
                          type: string
                          example: My Folder
                        parentFolderId:
                          type: string
                          nullable: true
                          example: kRZ0ewrAEAhCkTBd
                        createdAt:
                          type: string
                          format: date-time
                          readOnly: true
                        updatedAt:
                          type: string
                          format: date-time
                          readOnly: true
                        homeProject:
                          type: object
                          properties:
                            id:
                              type: string
                              readOnly: true
                              example: VmwOO9HeTEj20kxM
                            name:
                              type: string
                              example: Marketing
                            type:
                              type: string
                              readOnly: true
                              example: team
                              enum:
                                - personal
                                - team
                            icon:
                              type: object
                              description: Icon of the project, or null when the project has none
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - emoji
                                    - icon
                                value:
                                  type: string
                                color:
                                  type: string
                              required:
                                - type
                                - value
                              nullable: true
                          required:
                            - id
                            - name
                            - type
                            - icon
                        parentFolder:
                          type: object
                          nullable: true
                          properties:
                            id:
                              type: string
                              readOnly: true
                              example: zLXWgYyZrZ4Gn1Vk
                            name:
                              type: string
                              example: My Folder
                            parentFolderId:
                              type: string
                              nullable: true
                          required:
                            - id
                            - name
                            - parentFolderId
                        tags:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                            required:
                              - id
                              - name
                        workflowCount:
                          type: number
                          description: Number of workflows the folder holds.
                          readOnly: true
                        subFolderCount:
                          type: number
                          description: Number of folders the folder holds.
                          readOnly: true
                        path:
                          type: array
                          items:
                            type: string
                          description: Names of every folder from the project root down to this folder.
                          readOnly: true
                          example:
                            - Marketing
                            - Campaigns
                      required:
                        - id
                required:
                  - count
                  - data
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createFolder
      tags:
        - Folders
      summary: Create a folder
      description: Create a folder within a project.
      x-required-scope: folder:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
          required: true
          description: The ID of the project, or `personal` to create the folder in the calling user's own personal project.
          name: projectId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 128
                  example: My Folder
                parentFolderId:
                  type: string
                  maxLength: 36
                  example: kRZ0ewrAEAhCkTBd
              required:
                - name
              additionalProperties: false
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    readOnly: true
                    example: zLXWgYyZrZ4Gn1Vk
                  name:
                    type: string
                    example: My Folder
                  parentFolderId:
                    type: string
                    nullable: true
                    example: kRZ0ewrAEAhCkTBd
                  createdAt:
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    type: string
                    format: date-time
                    readOnly: true
                required:
                  - id
                  - name
                  - parentFolderId
                  - createdAt
                  - updatedAt
                additionalProperties: false
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /projects/{projectId}/folders/{folderId}:
    get:
      operationId: getFolder
      tags:
        - Folders
      summary: Get folder details
      description: Get folder details including sub-folder and workflow counts.
      x-required-scope: folder:read
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the folder.
          name: folderId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    readOnly: true
                    example: zLXWgYyZrZ4Gn1Vk
                  name:
                    type: string
                    example: My Folder
                  parentFolderId:
                    type: string
                    nullable: true
                    example: kRZ0ewrAEAhCkTBd
                  createdAt:
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    type: string
                    format: date-time
                    readOnly: true
                  totalSubFolders:
                    type: integer
                    description: Total number of sub-folders (recursive).
                  totalWorkflows:
                    type: integer
                    description: Total number of workflows (recursive).
                required:
                  - id
                  - name
                  - parentFolderId
                  - createdAt
                  - updatedAt
                  - totalSubFolders
                  - totalWorkflows
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    patch:
      operationId: updateFolder
      tags:
        - Folders
      summary: Update a folder
      description: Update folder name or parent folder.
      x-required-scope: folder:update
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the folder.
          name: folderId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: Renamed Folder
                  maxLength: 128
                parentFolderId:
                  type: string
                  description: ID of the parent folder to move this folder into. Set to "0" to move the folder to the project root.
                  example: abc123
              additionalProperties: false
              minProperties: 1
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    readOnly: true
                    example: zLXWgYyZrZ4Gn1Vk
                  name:
                    type: string
                    example: My Folder
                  parentFolderId:
                    type: string
                    nullable: true
                    example: kRZ0ewrAEAhCkTBd
                  createdAt:
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    type: string
                    format: date-time
                    readOnly: true
                required:
                  - id
                  - name
                  - parentFolderId
                  - createdAt
                  - updatedAt
                additionalProperties: false
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteFolder
      tags:
        - Folders
      summary: Delete a folder
      description: Delete a folder within a project. When `transferToFolderId` is provided, workflows and sub-folders are moved to the target folder before deletion. When omitted, workflows are moved to the project root and archived, and child folders are deleted.
      x-required-scope: folder:delete
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the folder.
          name: folderId
          in: path
        - schema:
            type: string
            minLength: 1
            maxLength: 36
            description: Optional target folder ID to move workflows and sub-folders into before deleting.
          required: false
          name: transferToFolderId
          in: query
      responses:
        '204':
          description: Operation successful.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /insights/summary:
    get:
      operationId: getInsightsSummary
      tags:
        - Insights
      summary: Retrieve insights summary
      description: Retrieve the insights summary for the selected date range.
      x-required-scope: insights:read
      parameters:
        - schema:
            type: string
            format: date-time
            description: ISO 8601 start date. Defaults to 7 days ago.
          required: false
          name: startDate
          in: query
        - schema:
            type: string
            format: date-time
            description: ISO 8601 end date. Defaults to now.
          required: false
          name: endDate
          in: query
        - schema:
            type: string
            description: Project identifier to filter insights by project.
            example: VmwOO9HeTEj20kxM
          required: false
          name: projectId
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: object
                    properties:
                      value:
                        type: number
                      deviation:
                        type: number
                        nullable: true
                      unit:
                        type: string
                        enum:
                          - count
                    required:
                      - value
                      - deviation
                      - unit
                  failed:
                    type: object
                    properties:
                      value:
                        type: number
                      deviation:
                        type: number
                        nullable: true
                      unit:
                        type: string
                        enum:
                          - count
                    required:
                      - value
                      - deviation
                      - unit
                  failureRate:
                    type: object
                    properties:
                      value:
                        type: number
                      deviation:
                        type: number
                        nullable: true
                      unit:
                        type: string
                        enum:
                          - ratio
                    required:
                      - value
                      - deviation
                      - unit
                  timeSaved:
                    type: object
                    properties:
                      value:
                        type: number
                      deviation:
                        type: number
                        nullable: true
                      unit:
                        type: string
                        enum:
                          - minute
                    required:
                      - value
                      - deviation
                      - unit
                  averageRunTime:
                    type: object
                    properties:
                      value:
                        type: number
                      deviation:
                        type: number
                        nullable: true
                      unit:
                        type: string
                        enum:
                          - millisecond
                    required:
                      - value
                      - deviation
                      - unit
                required:
                  - total
                  - failed
                  - failureRate
                  - timeSaved
                  - averageRunTime
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /settings/ldap:
    get:
      operationId: getLdapConfiguration
      tags:
        - SettingsLdap
      summary: Retrieve the LDAP configuration
      description: Retrieve the current LDAP configuration, including every field exposed in the UI. The binding admin password is redacted on read. Requires the `ldap:manage` scope and the LDAP feature to be licensed.
      x-required-scope: ldap:manage
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ldapConfigurationPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    put:
      operationId: updateLdapConfiguration
      tags:
        - SettingsLdap
      summary: Set the LDAP configuration
      description: Replace the LDAP configuration with the provided full object (partial updates are not supported). For bindingAdminPassword, submit the blanking placeholder from a prior GET to keep the stored password unchanged. Requires the `ldap:manage` scope and the LDAP feature to be licensed. Setting loginEnabled to false is destructive and it deletes all stored LDAP user identities and disables synchronization.
      x-required-scope: ldap:manage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                loginEnabled:
                  type: boolean
                  description: Whether LDAP login is enabled. Setting this to false is destructive — it deletes all stored LDAP user identities and disables synchronization.
                  example: false
                loginLabel:
                  type: string
                  description: Label shown on the LDAP login button.
                  example: LDAP
                connectionUrl:
                  type: string
                  description: LDAP server URL.
                  example: ldap://ldap.example.com
                allowUnauthorizedCerts:
                  type: boolean
                  description: Whether to allow unauthorized (self-signed) certificates.
                  example: false
                connectionSecurity:
                  type: string
                  enum:
                    - none
                    - tls
                    - startTls
                  description: TLS/SSL security mode for the LDAP connection.
                  example: none
                connectionPort:
                  type: integer
                  description: LDAP server port.
                  example: 389
                baseDn:
                  type: string
                  description: Base DN for LDAP search queries.
                  example: dc=example,dc=com
                bindingAdminDn:
                  type: string
                  description: DN of the LDAP admin user for binding.
                  example: cn=admin,dc=example,dc=com
                bindingAdminPassword:
                  type: string
                  description: Password for the LDAP admin user. To keep an existing password unchanged, submit the blanking placeholder from a prior GET response. Use an empty string to clear the password.
                firstNameAttribute:
                  type: string
                  description: LDAP attribute mapped to the user's first name.
                  example: givenName
                lastNameAttribute:
                  type: string
                  description: LDAP attribute mapped to the user's last name.
                  example: sn
                emailAttribute:
                  type: string
                  description: LDAP attribute mapped to the user's email.
                  example: mail
                loginIdAttribute:
                  type: string
                  description: LDAP attribute used for login (usually the same as emailAttribute).
                  example: mail
                ldapIdAttribute:
                  type: string
                  description: LDAP attribute that uniquely identifies a user.
                  example: uid
                userFilter:
                  type: string
                  description: Additional LDAP filter to apply when searching for users. Use an empty string for no additional filter.
                  example: (objectClass=inetOrgPerson)
                synchronizationEnabled:
                  type: boolean
                  description: Whether automatic LDAP synchronization is enabled.
                  example: false
                synchronizationInterval:
                  type: integer
                  description: Interval in minutes between automatic synchronizations. Ignored if synchronizationEnabled is false.
                  example: 60
                searchPageSize:
                  type: integer
                  description: Number of LDAP entries to fetch per search page.
                  example: 1000
                searchTimeout:
                  type: integer
                  description: LDAP search timeout in seconds.
                  example: 60
                enforceEmailUniqueness:
                  type: boolean
                  description: Whether to enforce that email addresses are unique across LDAP users. When true, if two users have the same email, only the first will be imported.
                  example: true
                linkExistingAccountsByEmail:
                  type: boolean
                  description: Whether an LDAP user may be linked to an existing n8n account that has the same email. When false, login and synchronization skip such users. Optional on PUT; the stored value is kept when omitted.
                  example: true
              required:
                - loginEnabled
                - loginLabel
                - connectionUrl
                - allowUnauthorizedCerts
                - connectionSecurity
                - connectionPort
                - baseDn
                - bindingAdminDn
                - bindingAdminPassword
                - firstNameAttribute
                - lastNameAttribute
                - emailAttribute
                - loginIdAttribute
                - ldapIdAttribute
                - userFilter
                - synchronizationEnabled
                - synchronizationInterval
                - searchPageSize
                - searchTimeout
                - enforceEmailUniqueness
              additionalProperties: false
              description: Full LDAP configuration. Use empty strings for unset fields.
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ldapConfigurationPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /settings/ldap/sync:
    get:
      operationId: getLdapSync
      tags:
        - SettingsLdap
      summary: Retrieve LDAP synchronization history
      description: Retrieve the history of LDAP synchronizations, most recent first. Requires the `ldap:sync` scope and the LDAP feature to be licensed.
      x-required-scope: ldap:sync
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Unique identifier for this sync run.
                          example: 1
                        runMode:
                          type: string
                          enum:
                            - dry
                            - live
                          description: Whether the sync was a dry run or applied live.
                          example: live
                        status:
                          type: string
                          description: Status of the synchronization (for example, success or error).
                          example: success
                        startedAt:
                          type: string
                          format: date-time
                          description: Timestamp when the synchronization started.
                          example: 2025-07-21T10:30:00Z
                        endedAt:
                          type: string
                          format: date-time
                          description: Timestamp when the synchronization completed.
                          example: 2025-07-21T10:35:00Z
                        scanned:
                          type: integer
                          description: Number of LDAP entries scanned during synchronization.
                          example: 42
                        created:
                          type: integer
                          description: Number of new users created during synchronization.
                          example: 5
                        updated:
                          type: integer
                          description: Number of existing users updated during synchronization.
                          example: 3
                        disabled:
                          type: integer
                          description: Number of users disabled during synchronization.
                          example: 0
                        error:
                          type: string
                          description: Error message if the synchronization failed. Empty string if successful.
                          example: ''
                      required:
                        - id
                        - runMode
                        - status
                        - startedAt
                        - endedAt
                        - scanned
                        - created
                        - updated
                        - disabled
                        - error
                      description: LDAP synchronization history record.
                      additionalProperties: false
                  nextCursor:
                    type: string
                    nullable: true
                    description: Paginate through the synchronization history by setting the cursor parameter to the nextCursor attribute returned by the previous request. A null value means there are no more records.
                    example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: runLdapSync
      tags:
        - SettingsLdap
      summary: Trigger an LDAP synchronization
      description: Manually trigger an LDAP synchronization. The response returns the new sync history record. Requires the `ldap:sync` scope and the LDAP feature to be licensed.
      x-required-scope: ldap:sync
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - live
                    - dry
                  description: Type of synchronization. 'live' applies changes to the database. 'dry' performs a test run and does not persist changes.
                  example: live
              required:
                - type
              additionalProperties: false
              description: Request body for triggering an LDAP synchronization.
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    description: Unique identifier for this sync run.
                    example: 1
                  runMode:
                    type: string
                    enum:
                      - dry
                      - live
                    description: Whether the sync was a dry run or applied live.
                    example: live
                  status:
                    type: string
                    description: Status of the synchronization (for example, success or error).
                    example: success
                  startedAt:
                    type: string
                    format: date-time
                    description: Timestamp when the synchronization started.
                    example: 2025-07-21T10:30:00Z
                  endedAt:
                    type: string
                    format: date-time
                    description: Timestamp when the synchronization completed.
                    example: 2025-07-21T10:35:00Z
                  scanned:
                    type: integer
                    description: Number of LDAP entries scanned during synchronization.
                    example: 42
                  created:
                    type: integer
                    description: Number of new users created during synchronization.
                    example: 5
                  updated:
                    type: integer
                    description: Number of existing users updated during synchronization.
                    example: 3
                  disabled:
                    type: integer
                    description: Number of users disabled during synchronization.
                    example: 0
                  error:
                    type: string
                    description: Error message if the synchronization failed. Empty string if successful.
                    example: ''
                required:
                  - id
                  - runMode
                  - status
                  - startedAt
                  - endedAt
                  - scanned
                  - created
                  - updated
                  - disabled
                  - error
                description: LDAP synchronization history record.
                additionalProperties: false
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /settings/log-streaming/event-types:
    get:
      operationId: getLogStreamingEventTypes
      tags:
        - LogStreaming
      summary: List streamable event types
      description: List the event types that can be streamed to a log streaming destination. Requires the `eventBusDestination:list` scope and the Log Streaming feature to be licensed.
      x-required-scope: eventBusDestination:list
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: string
                    description: Event names that can be streamed to a destination.
                    example:
                      - n8n.workflow.started
                      - n8n.workflow.success
                      - n8n.workflow.failed
                required:
                  - data
                additionalProperties: false
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /settings/log-streaming/destinations:
    get:
      operationId: getLogStreamingDestinations
      tags:
        - LogStreaming
      summary: List log streaming destinations
      description: List the configured log streaming destinations. Requires the `eventBusDestination:list` scope and the Log Streaming feature to be licensed.
      x-required-scope: eventBusDestination:list
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            label:
                              type: string
                              minLength: 1
                              description: Human-readable name shown in the UI.
                              example: My destination
                            enabled:
                              type: boolean
                              description: Whether the destination currently receives events.
                              example: true
                            subscribedEvents:
                              type: array
                              items:
                                type: string
                              description: Event names (or group prefixes, e.g. `n8n.workflow`, which matches all `n8n.workflow.*` events) this destination receives. Retrieve the full list of streamable event names from `GET /settings/log-streaming/event-types`.
                              example:
                                - n8n.workflow
                                - n8n.audit
                            anonymizeAuditMessages:
                              type: boolean
                              description: Whether audit message payloads are anonymized before being sent.
                              example: false
                            circuitBreaker:
                              type: object
                              properties:
                                maxFailures:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: Maximum failures within the sliding window before the breaker opens.
                                failureWindow:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: Sliding window, in milliseconds, over which failures are counted.
                              description: Circuit-breaker tuning for delivery. After repeated failures the destination stops sending for a cool-down window instead of hammering an unhealthy target. All fields are optional; sensible defaults apply when omitted.
                            type:
                              type: string
                              enum:
                                - webhook
                              description: Sends each event as an HTTP request to a URL.
                              example: webhook
                            url:
                              type: string
                              format: uri
                              description: Target URL that receives the event payload.
                              example: https://example.com/n8n-events
                            method:
                              type: string
                              description: HTTP method used for the request.
                              example: POST
                            sendHeaders:
                              type: boolean
                              description: Whether to attach custom headers to the request.
                              example: false
                            specifyHeaders:
                              type: string
                              description: How custom headers are provided — `keypair` or `json`.
                              example: keypair
                            headerParameters:
                              type: object
                              properties:
                                parameters:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                        example: Authorization
                                      value:
                                        anyOf:
                                          - type: string
                                          - type: number
                                          - type: boolean
                                          - {}
                                          - {}
                                        description: Parameter value. Usually a string; numbers, booleans and null are also accepted.
                                        example: Bearer <token>
                                    required:
                                      - name
                                      - value
                              required:
                                - parameters
                              description: Key-value pairs used when the matching `specify*` field is `keypair`.
                            jsonHeaders:
                              type: string
                              description: Custom headers as a JSON string when `specifyHeaders` is `json`.
                            sendQuery:
                              type: boolean
                              description: Whether to attach query parameters to the request.
                              example: false
                            specifyQuery:
                              type: string
                              description: How query parameters are provided — `keypair` or `json`.
                            queryParameters:
                              type: object
                              properties:
                                parameters:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                        example: Authorization
                                      value:
                                        anyOf:
                                          - type: string
                                          - type: number
                                          - type: boolean
                                          - {}
                                          - {}
                                        description: Parameter value. Usually a string; numbers, booleans and null are also accepted.
                                        example: Bearer <token>
                                    required:
                                      - name
                                      - value
                              required:
                                - parameters
                              description: Key-value pairs used when the matching `specify*` field is `keypair`.
                            jsonQuery:
                              type: string
                              description: Query parameters as a JSON string when `specifyQuery` is `json`.
                            options:
                              type: object
                              properties:
                                timeout:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: Request timeout in milliseconds.
                                allowUnauthorizedCerts:
                                  type: boolean
                                  description: Accept self-signed or otherwise invalid TLS certificates.
                                queryParameterArrays:
                                  type: string
                                  enum:
                                    - indices
                                    - brackets
                                    - repeat
                                  description: How array-valued query parameters are serialized into the query string.
                                redirect:
                                  type: object
                                  properties:
                                    redirect:
                                      type: object
                                      properties:
                                        followRedirects:
                                          type: boolean
                                          description: Whether to follow HTTP redirects.
                                        maxRedirects:
                                          type: integer
                                          minimum: 0
                                          exclusiveMinimum: true
                                          description: Maximum number of redirects to follow.
                                  required:
                                    - redirect
                                  description: Redirect-following behaviour.
                                proxy:
                                  type: object
                                  properties:
                                    proxy:
                                      type: object
                                      properties:
                                        protocol:
                                          type: string
                                          enum:
                                            - https
                                            - http
                                          description: Proxy protocol.
                                        host:
                                          type: string
                                          description: Proxy host, without protocol or port.
                                        port:
                                          type: integer
                                          minimum: 0
                                          exclusiveMinimum: true
                                          description: Proxy port.
                                      required:
                                        - protocol
                                        - host
                                        - port
                                  required:
                                    - proxy
                                  description: Outbound proxy configuration.
                                socket:
                                  type: object
                                  properties:
                                    keepAlive:
                                      type: boolean
                                      description: Whether to keep sockets open for reuse.
                                    maxSockets:
                                      type: integer
                                      minimum: 0
                                      exclusiveMinimum: true
                                      description: Maximum sockets per host kept open at once.
                                    maxFreeSockets:
                                      type: integer
                                      minimum: 0
                                      exclusiveMinimum: true
                                      description: Maximum idle sockets per host kept open.
                                  description: Connection socket options.
                              description: Additional HTTP request options.
                            id:
                              type: string
                              description: Server-generated unique id of the destination. Returned in responses; not accepted in requests.
                              example: 88be6560-bfb4-455c-8aa1-06971e9e5522
                          required:
                            - type
                            - url
                            - id
                        - type: object
                          properties:
                            label:
                              type: string
                              minLength: 1
                              description: Human-readable name shown in the UI.
                              example: My destination
                            enabled:
                              type: boolean
                              description: Whether the destination currently receives events.
                              example: true
                            subscribedEvents:
                              type: array
                              items:
                                type: string
                              description: Event names (or group prefixes, e.g. `n8n.workflow`, which matches all `n8n.workflow.*` events) this destination receives. Retrieve the full list of streamable event names from `GET /settings/log-streaming/event-types`.
                              example:
                                - n8n.workflow
                                - n8n.audit
                            anonymizeAuditMessages:
                              type: boolean
                              description: Whether audit message payloads are anonymized before being sent.
                              example: false
                            circuitBreaker:
                              type: object
                              properties:
                                maxFailures:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: Maximum failures within the sliding window before the breaker opens.
                                failureWindow:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: Sliding window, in milliseconds, over which failures are counted.
                              description: Circuit-breaker tuning for delivery. After repeated failures the destination stops sending for a cool-down window instead of hammering an unhealthy target. All fields are optional; sensible defaults apply when omitted.
                            type:
                              type: string
                              enum:
                                - syslog
                              description: Sends each event to a syslog server.
                              example: syslog
                            host:
                              type: string
                              minLength: 1
                              description: Syslog server host.
                              example: syslog.example.com
                            port:
                              type: integer
                              minimum: 0
                              exclusiveMinimum: true
                              description: Syslog server port.
                              example: 514
                            protocol:
                              type: string
                              enum:
                                - udp
                                - tcp
                                - tls
                              description: Transport protocol.
                              example: udp
                            facility:
                              type: integer
                              minimum: 0
                              maximum: 23
                              description: 'Syslog facility code (0–23, per RFC 5424). Common values: 0 Kernel, 1 User, 3 System, 13 Audit, 14 Alert, 16 Local0, 17 Local1, 18 Local2, 19 Local3, 20 Local4, 21 Local5, 22 Local6, 23 Local7.'
                              example: 16
                            app_name:
                              type: string
                              description: Application name reported in the syslog message.
                              example: n8n
                            tlsCa:
                              type: string
                              description: PEM-encoded CA certificate used when `protocol` is `tls`.
                            id:
                              type: string
                              description: Server-generated unique id of the destination. Returned in responses; not accepted in requests.
                              example: 88be6560-bfb4-455c-8aa1-06971e9e5522
                          required:
                            - type
                            - host
                            - id
                        - type: object
                          properties:
                            label:
                              type: string
                              minLength: 1
                              description: Human-readable name shown in the UI.
                              example: My destination
                            enabled:
                              type: boolean
                              description: Whether the destination currently receives events.
                              example: true
                            subscribedEvents:
                              type: array
                              items:
                                type: string
                              description: Event names (or group prefixes, e.g. `n8n.workflow`, which matches all `n8n.workflow.*` events) this destination receives. Retrieve the full list of streamable event names from `GET /settings/log-streaming/event-types`.
                              example:
                                - n8n.workflow
                                - n8n.audit
                            anonymizeAuditMessages:
                              type: boolean
                              description: Whether audit message payloads are anonymized before being sent.
                              example: false
                            circuitBreaker:
                              type: object
                              properties:
                                maxFailures:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: Maximum failures within the sliding window before the breaker opens.
                                failureWindow:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: Sliding window, in milliseconds, over which failures are counted.
                              description: Circuit-breaker tuning for delivery. After repeated failures the destination stops sending for a cool-down window instead of hammering an unhealthy target. All fields are optional; sensible defaults apply when omitted.
                            type:
                              type: string
                              enum:
                                - sentry
                              description: Sends each event to a Sentry project.
                              example: sentry
                            dsn:
                              type: string
                              format: uri
                              description: Sentry DSN the events are sent to.
                              example: https://examplePublicKey@o0.ingest.sentry.io/0
                            id:
                              type: string
                              description: Server-generated unique id of the destination. Returned in responses; not accepted in requests.
                              example: 88be6560-bfb4-455c-8aa1-06971e9e5522
                          required:
                            - type
                            - dsn
                            - id
                      description: 'A log streaming destination. The `type` field selects the variant and its type-specific fields: `webhook`, `syslog`, or `sentry`.'
                      type: object
                    description: The configured log streaming destinations.
                required:
                  - data
                additionalProperties: false
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createLogStreamingDestination
      tags:
        - LogStreaming
      summary: Create a log streaming destination
      description: Create a log streaming destination. The destination takes effect exactly as it would from the UI, using the same validation. Requires the `eventBusDestination:create` scope and the Log Streaming feature to be licensed. When destinations are managed via environment variables, the write is rejected with 409 and nothing is created; reads still return the current values.
      x-required-scope: eventBusDestination:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    label:
                      type: string
                      minLength: 1
                      description: Human-readable name shown in the UI.
                      example: My destination
                    enabled:
                      type: boolean
                      description: Whether the destination currently receives events.
                      example: true
                    subscribedEvents:
                      type: array
                      items:
                        type: string
                      description: Event names (or group prefixes, e.g. `n8n.workflow`, which matches all `n8n.workflow.*` events) this destination receives. Retrieve the full list of streamable event names from `GET /settings/log-streaming/event-types`.
                      example:
                        - n8n.workflow
                        - n8n.audit
                    anonymizeAuditMessages:
                      type: boolean
                      description: Whether audit message payloads are anonymized before being sent.
                      example: false
                    circuitBreaker:
                      type: object
                      properties:
                        maxFailures:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Maximum failures within the sliding window before the breaker opens.
                        failureWindow:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Sliding window, in milliseconds, over which failures are counted.
                      description: Circuit-breaker tuning for delivery. After repeated failures the destination stops sending for a cool-down window instead of hammering an unhealthy target. All fields are optional; sensible defaults apply when omitted.
                    type:
                      type: string
                      enum:
                        - webhook
                      description: Sends each event as an HTTP request to a URL.
                      example: webhook
                    url:
                      type: string
                      format: uri
                      description: Target URL that receives the event payload.
                      example: https://example.com/n8n-events
                    method:
                      type: string
                      description: HTTP method used for the request.
                      example: POST
                    sendHeaders:
                      type: boolean
                      description: Whether to attach custom headers to the request.
                      example: false
                    specifyHeaders:
                      type: string
                      description: How custom headers are provided — `keypair` or `json`.
                      example: keypair
                    headerParameters:
                      type: object
                      properties:
                        parameters:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                example: Authorization
                              value:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                  - {}
                                  - {}
                                description: Parameter value. Usually a string; numbers, booleans and null are also accepted.
                                example: Bearer <token>
                            required:
                              - name
                              - value
                      required:
                        - parameters
                      description: Key-value pairs used when the matching `specify*` field is `keypair`.
                    jsonHeaders:
                      type: string
                      description: Custom headers as a JSON string when `specifyHeaders` is `json`.
                    sendQuery:
                      type: boolean
                      description: Whether to attach query parameters to the request.
                      example: false
                    specifyQuery:
                      type: string
                      description: How query parameters are provided — `keypair` or `json`.
                    queryParameters:
                      type: object
                      properties:
                        parameters:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                example: Authorization
                              value:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                  - {}
                                  - {}
                                description: Parameter value. Usually a string; numbers, booleans and null are also accepted.
                                example: Bearer <token>
                            required:
                              - name
                              - value
                      required:
                        - parameters
                      description: Key-value pairs used when the matching `specify*` field is `keypair`.
                    jsonQuery:
                      type: string
                      description: Query parameters as a JSON string when `specifyQuery` is `json`.
                    options:
                      type: object
                      properties:
                        timeout:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Request timeout in milliseconds.
                        allowUnauthorizedCerts:
                          type: boolean
                          description: Accept self-signed or otherwise invalid TLS certificates.
                        queryParameterArrays:
                          type: string
                          enum:
                            - indices
                            - brackets
                            - repeat
                          description: How array-valued query parameters are serialized into the query string.
                        redirect:
                          type: object
                          properties:
                            redirect:
                              type: object
                              properties:
                                followRedirects:
                                  type: boolean
                                  description: Whether to follow HTTP redirects.
                                maxRedirects:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: Maximum number of redirects to follow.
                          required:
                            - redirect
                          description: Redirect-following behaviour.
                        proxy:
                          type: object
                          properties:
                            proxy:
                              type: object
                              properties:
                                protocol:
                                  type: string
                                  enum:
                                    - https
                                    - http
                                  description: Proxy protocol.
                                host:
                                  type: string
                                  description: Proxy host, without protocol or port.
                                port:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: Proxy port.
                              required:
                                - protocol
                                - host
                                - port
                          required:
                            - proxy
                          description: Outbound proxy configuration.
                        socket:
                          type: object
                          properties:
                            keepAlive:
                              type: boolean
                              description: Whether to keep sockets open for reuse.
                            maxSockets:
                              type: integer
                              minimum: 0
                              exclusiveMinimum: true
                              description: Maximum sockets per host kept open at once.
                            maxFreeSockets:
                              type: integer
                              minimum: 0
                              exclusiveMinimum: true
                              description: Maximum idle sockets per host kept open.
                          description: Connection socket options.
                      description: Additional HTTP request options.
                    id:
                      type: string
                      description: Server-generated unique id of the destination. Returned in responses; not accepted in requests.
                      readOnly: true
                      example: 88be6560-bfb4-455c-8aa1-06971e9e5522
                  required:
                    - type
                    - url
                - type: object
                  properties:
                    label:
                      type: string
                      minLength: 1
                      description: Human-readable name shown in the UI.
                      example: My destination
                    enabled:
                      type: boolean
                      description: Whether the destination currently receives events.
                      example: true
                    subscribedEvents:
                      type: array
                      items:
                        type: string
                      description: Event names (or group prefixes, e.g. `n8n.workflow`, which matches all `n8n.workflow.*` events) this destination receives. Retrieve the full list of streamable event names from `GET /settings/log-streaming/event-types`.
                      example:
                        - n8n.workflow
                        - n8n.audit
                    anonymizeAuditMessages:
                      type: boolean
                      description: Whether audit message payloads are anonymized before being sent.
                      example: false
                    circuitBreaker:
                      type: object
                      properties:
                        maxFailures:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Maximum failures within the sliding window before the breaker opens.
                        failureWindow:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Sliding window, in milliseconds, over which failures are counted.
                      description: Circuit-breaker tuning for delivery. After repeated failures the destination stops sending for a cool-down window instead of hammering an unhealthy target. All fields are optional; sensible defaults apply when omitted.
                    type:
                      type: string
                      enum:
                        - syslog
                      description: Sends each event to a syslog server.
                      example: syslog
                    host:
                      type: string
                      minLength: 1
                      description: Syslog server host.
                      example: syslog.example.com
                    port:
                      type: integer
                      minimum: 0
                      exclusiveMinimum: true
                      description: Syslog server port.
                      example: 514
                    protocol:
                      type: string
                      enum:
                        - udp
                        - tcp
                        - tls
                      description: Transport protocol.
                      example: udp
                    facility:
                      type: integer
                      minimum: 0
                      maximum: 23
                      description: 'Syslog facility code (0–23, per RFC 5424). Common values: 0 Kernel, 1 User, 3 System, 13 Audit, 14 Alert, 16 Local0, 17 Local1, 18 Local2, 19 Local3, 20 Local4, 21 Local5, 22 Local6, 23 Local7.'
                      example: 16
                    app_name:
                      type: string
                      description: Application name reported in the syslog message.
                      example: n8n
                    tlsCa:
                      type: string
                      description: PEM-encoded CA certificate used when `protocol` is `tls`.
                    id:
                      type: string
                      description: Server-generated unique id of the destination. Returned in responses; not accepted in requests.
                      readOnly: true
                      example: 88be6560-bfb4-455c-8aa1-06971e9e5522
                  required:
                    - type
                    - host
                - type: object
                  properties:
                    label:
                      type: string
                      minLength: 1
                      description: Human-readable name shown in the UI.
                      example: My destination
                    enabled:
                      type: boolean
                      description: Whether the destination currently receives events.
                      example: true
                    subscribedEvents:
                      type: array
                      items:
                        type: string
                      description: Event names (or group prefixes, e.g. `n8n.workflow`, which matches all `n8n.workflow.*` events) this destination receives. Retrieve the full list of streamable event names from `GET /settings/log-streaming/event-types`.
                      example:
                        - n8n.workflow
                        - n8n.audit
                    anonymizeAuditMessages:
                      type: boolean
                      description: Whether audit message payloads are anonymized before being sent.
                      example: false
                    circuitBreaker:
                      type: object
                      properties:
                        maxFailures:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Maximum failures within the sliding window before the breaker opens.
                        failureWindow:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Sliding window, in milliseconds, over which failures are counted.
                      description: Circuit-breaker tuning for delivery. After repeated failures the destination stops sending for a cool-down window instead of hammering an unhealthy target. All fields are optional; sensible defaults apply when omitted.
                    type:
                      type: string
                      enum:
                        - sentry
                      description: Sends each event to a Sentry project.
                      example: sentry
                    dsn:
                      type: string
                      format: uri
                      description: Sentry DSN the events are sent to.
                      example: https://examplePublicKey@o0.ingest.sentry.io/0
                    id:
                      type: string
                      description: Server-generated unique id of the destination. Returned in responses; not accepted in requests.
                      readOnly: true
                      example: 88be6560-bfb4-455c-8aa1-06971e9e5522
                  required:
                    - type
                    - dsn
              description: 'A log streaming destination. The `type` field selects the variant and its type-specific fields: `webhook`, `syslog`, or `sentry`.'
              type: object
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/logStreamingDestinationPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /settings/log-streaming/destinations/{destinationId}:
    get:
      operationId: getLogStreamingDestination
      tags:
        - LogStreaming
      summary: Retrieve a log streaming destination
      description: Retrieve a single log streaming destination by id. Requires the `eventBusDestination:read` scope and the Log Streaming feature to be licensed.
      x-required-scope: eventBusDestination:read
      parameters:
        - schema:
            type: string
          required: true
          description: The id of the log streaming destination.
          name: destinationId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/logStreamingDestinationPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    put:
      operationId: updateLogStreamingDestination
      tags:
        - LogStreaming
      summary: Update a log streaming destination
      description: Replace an existing log streaming destination. The update takes effect exactly as it would from the UI, using the same validation. Requires the `eventBusDestination:update` scope and the Log Streaming feature to be licensed. When destinations are managed via environment variables, the write is rejected with 409 and nothing is changed; reads still return the current values.
      x-required-scope: eventBusDestination:update
      parameters:
        - schema:
            type: string
          required: true
          description: The id of the log streaming destination.
          name: destinationId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    label:
                      type: string
                      minLength: 1
                      description: Human-readable name shown in the UI.
                      example: My destination
                    enabled:
                      type: boolean
                      description: Whether the destination currently receives events.
                      example: true
                    subscribedEvents:
                      type: array
                      items:
                        type: string
                      description: Event names (or group prefixes, e.g. `n8n.workflow`, which matches all `n8n.workflow.*` events) this destination receives. Retrieve the full list of streamable event names from `GET /settings/log-streaming/event-types`.
                      example:
                        - n8n.workflow
                        - n8n.audit
                    anonymizeAuditMessages:
                      type: boolean
                      description: Whether audit message payloads are anonymized before being sent.
                      example: false
                    circuitBreaker:
                      type: object
                      properties:
                        maxFailures:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Maximum failures within the sliding window before the breaker opens.
                        failureWindow:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Sliding window, in milliseconds, over which failures are counted.
                      description: Circuit-breaker tuning for delivery. After repeated failures the destination stops sending for a cool-down window instead of hammering an unhealthy target. All fields are optional; sensible defaults apply when omitted.
                    type:
                      type: string
                      enum:
                        - webhook
                      description: Sends each event as an HTTP request to a URL.
                      example: webhook
                    url:
                      type: string
                      format: uri
                      description: Target URL that receives the event payload.
                      example: https://example.com/n8n-events
                    method:
                      type: string
                      description: HTTP method used for the request.
                      example: POST
                    sendHeaders:
                      type: boolean
                      description: Whether to attach custom headers to the request.
                      example: false
                    specifyHeaders:
                      type: string
                      description: How custom headers are provided — `keypair` or `json`.
                      example: keypair
                    headerParameters:
                      type: object
                      properties:
                        parameters:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                example: Authorization
                              value:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                  - {}
                                  - {}
                                description: Parameter value. Usually a string; numbers, booleans and null are also accepted.
                                example: Bearer <token>
                            required:
                              - name
                              - value
                      required:
                        - parameters
                      description: Key-value pairs used when the matching `specify*` field is `keypair`.
                    jsonHeaders:
                      type: string
                      description: Custom headers as a JSON string when `specifyHeaders` is `json`.
                    sendQuery:
                      type: boolean
                      description: Whether to attach query parameters to the request.
                      example: false
                    specifyQuery:
                      type: string
                      description: How query parameters are provided — `keypair` or `json`.
                    queryParameters:
                      type: object
                      properties:
                        parameters:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                example: Authorization
                              value:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                  - {}
                                  - {}
                                description: Parameter value. Usually a string; numbers, booleans and null are also accepted.
                                example: Bearer <token>
                            required:
                              - name
                              - value
                      required:
                        - parameters
                      description: Key-value pairs used when the matching `specify*` field is `keypair`.
                    jsonQuery:
                      type: string
                      description: Query parameters as a JSON string when `specifyQuery` is `json`.
                    options:
                      type: object
                      properties:
                        timeout:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Request timeout in milliseconds.
                        allowUnauthorizedCerts:
                          type: boolean
                          description: Accept self-signed or otherwise invalid TLS certificates.
                        queryParameterArrays:
                          type: string
                          enum:
                            - indices
                            - brackets
                            - repeat
                          description: How array-valued query parameters are serialized into the query string.
                        redirect:
                          type: object
                          properties:
                            redirect:
                              type: object
                              properties:
                                followRedirects:
                                  type: boolean
                                  description: Whether to follow HTTP redirects.
                                maxRedirects:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: Maximum number of redirects to follow.
                          required:
                            - redirect
                          description: Redirect-following behaviour.
                        proxy:
                          type: object
                          properties:
                            proxy:
                              type: object
                              properties:
                                protocol:
                                  type: string
                                  enum:
                                    - https
                                    - http
                                  description: Proxy protocol.
                                host:
                                  type: string
                                  description: Proxy host, without protocol or port.
                                port:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: Proxy port.
                              required:
                                - protocol
                                - host
                                - port
                          required:
                            - proxy
                          description: Outbound proxy configuration.
                        socket:
                          type: object
                          properties:
                            keepAlive:
                              type: boolean
                              description: Whether to keep sockets open for reuse.
                            maxSockets:
                              type: integer
                              minimum: 0
                              exclusiveMinimum: true
                              description: Maximum sockets per host kept open at once.
                            maxFreeSockets:
                              type: integer
                              minimum: 0
                              exclusiveMinimum: true
                              description: Maximum idle sockets per host kept open.
                          description: Connection socket options.
                      description: Additional HTTP request options.
                  required:
                    - type
                    - url
                - type: object
                  properties:
                    label:
                      type: string
                      minLength: 1
                      description: Human-readable name shown in the UI.
                      example: My destination
                    enabled:
                      type: boolean
                      description: Whether the destination currently receives events.
                      example: true
                    subscribedEvents:
                      type: array
                      items:
                        type: string
                      description: Event names (or group prefixes, e.g. `n8n.workflow`, which matches all `n8n.workflow.*` events) this destination receives. Retrieve the full list of streamable event names from `GET /settings/log-streaming/event-types`.
                      example:
                        - n8n.workflow
                        - n8n.audit
                    anonymizeAuditMessages:
                      type: boolean
                      description: Whether audit message payloads are anonymized before being sent.
                      example: false
                    circuitBreaker:
                      type: object
                      properties:
                        maxFailures:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Maximum failures within the sliding window before the breaker opens.
                        failureWindow:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Sliding window, in milliseconds, over which failures are counted.
                      description: Circuit-breaker tuning for delivery. After repeated failures the destination stops sending for a cool-down window instead of hammering an unhealthy target. All fields are optional; sensible defaults apply when omitted.
                    type:
                      type: string
                      enum:
                        - syslog
                      description: Sends each event to a syslog server.
                      example: syslog
                    host:
                      type: string
                      minLength: 1
                      description: Syslog server host.
                      example: syslog.example.com
                    port:
                      type: integer
                      minimum: 0
                      exclusiveMinimum: true
                      description: Syslog server port.
                      example: 514
                    protocol:
                      type: string
                      enum:
                        - udp
                        - tcp
                        - tls
                      description: Transport protocol.
                      example: udp
                    facility:
                      type: integer
                      minimum: 0
                      maximum: 23
                      description: 'Syslog facility code (0–23, per RFC 5424). Common values: 0 Kernel, 1 User, 3 System, 13 Audit, 14 Alert, 16 Local0, 17 Local1, 18 Local2, 19 Local3, 20 Local4, 21 Local5, 22 Local6, 23 Local7.'
                      example: 16
                    app_name:
                      type: string
                      description: Application name reported in the syslog message.
                      example: n8n
                    tlsCa:
                      type: string
                      description: PEM-encoded CA certificate used when `protocol` is `tls`.
                  required:
                    - type
                    - host
                - type: object
                  properties:
                    label:
                      type: string
                      minLength: 1
                      description: Human-readable name shown in the UI.
                      example: My destination
                    enabled:
                      type: boolean
                      description: Whether the destination currently receives events.
                      example: true
                    subscribedEvents:
                      type: array
                      items:
                        type: string
                      description: Event names (or group prefixes, e.g. `n8n.workflow`, which matches all `n8n.workflow.*` events) this destination receives. Retrieve the full list of streamable event names from `GET /settings/log-streaming/event-types`.
                      example:
                        - n8n.workflow
                        - n8n.audit
                    anonymizeAuditMessages:
                      type: boolean
                      description: Whether audit message payloads are anonymized before being sent.
                      example: false
                    circuitBreaker:
                      type: object
                      properties:
                        maxFailures:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Maximum failures within the sliding window before the breaker opens.
                        failureWindow:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Sliding window, in milliseconds, over which failures are counted.
                      description: Circuit-breaker tuning for delivery. After repeated failures the destination stops sending for a cool-down window instead of hammering an unhealthy target. All fields are optional; sensible defaults apply when omitted.
                    type:
                      type: string
                      enum:
                        - sentry
                      description: Sends each event to a Sentry project.
                      example: sentry
                    dsn:
                      type: string
                      format: uri
                      description: Sentry DSN the events are sent to.
                      example: https://examplePublicKey@o0.ingest.sentry.io/0
                  required:
                    - type
                    - dsn
              description: 'A log streaming destination. The `type` field selects the variant and its type-specific fields: `webhook`, `syslog`, or `sentry`.'
              type: object
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/logStreamingDestinationPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteLogStreamingDestination
      tags:
        - LogStreaming
      summary: Delete a log streaming destination
      description: Remove a log streaming destination. Requires the `eventBusDestination:delete` scope and the Log Streaming feature to be licensed. When destinations are managed via environment variables, the delete is rejected with 409 and nothing is removed; reads still return the current values.
      x-required-scope: eventBusDestination:delete
      parameters:
        - schema:
            type: string
          required: true
          description: The id of the log streaming destination.
          name: destinationId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/logStreamingDestinationPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /settings/log-streaming/destinations/{destinationId}/test:
    post:
      operationId: testLogStreamingDestination
      tags:
        - LogStreaming
      summary: Send a test message to a log streaming destination
      description: Send a test message to the destination to verify it is reachable and configured correctly. Requires the `eventBusDestination:test` scope and the Log Streaming feature to be licensed.
      x-required-scope: eventBusDestination:test
      parameters:
        - schema:
            type: string
          required: true
          description: The id of the log streaming destination.
          name: destinationId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the test message was delivered to the destination successfully.
                    example: true
                required:
                  - success
                additionalProperties: false
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /n8n-packages/import:
    post:
      operationId: importPackage
      tags:
        - N8nPackage
      summary: 'Beta: Import an n8n package into a project'
      description: |-
        **Beta** — breaking changes may still occur without major version bump.

        Imports Agent-only, workflow-only, mixed, and whole-project packages. The Agents module must be active for packages that contain Agents. Send the gzip-compressed tar archive (`.n8np`) as the multipart field `package`. Optional routing uses form fields `projectId` and `folderId` (omit or send empty for defaults). Every optional mode/policy field (credential, Agent, workflow, project, folder, data table, variable, and tag) takes its default when omitted; the one non-fixed default is `folderConflictPolicy`, which follows `projectConflictPolicy` on a project package. The required `conflictPolicy` field controls matches for both Agents and workflows. It replaces `workflowConflictPolicy`; the old field is rejected. `idPolicy` and `publishingPolicy` also apply to both kinds. They replace the workflow-specific and Agent-specific fields, which are rejected. Maximum upload size is `N8N_ENDPOINTS_PAYLOAD_SIZE_MAX` MB (default 16).

        The package must declare its manifest at `manifest.json` and include every file the manifest references.

        Credential and dependency references are resolved before writes. Request bindings support credential overrides only. Agent and workflow identities are matched automatically.

        Agent packages require `agent:import` and `agent:read`. Workflow packages require `workflow:import`. Mixed packages require both import grants. Planned Agent actions also require `agent:create`, `agent:update`, `agent:publish`, or `agent:unpublish`. Skipped Agents do not require write grants. Creating a project or instance skill requires `skill:create`, and saving a new version of one requires `skill:update`. When the import publishes a workflow, including a republish under `preserve-published-state`, the API key needs `workflow:activate`. When it unpublishes one, the key needs `workflow:deactivate`. Skipped workflows and workflows marked as archived in the package need neither publication scope. Archiving or restoring a matched workflow needs `workflow:delete`. Restoring and publishing a workflow requires both `workflow:delete` and `workflow:activate`. Destination-project permissions and dependency scopes still apply.

        The response contains Agent summaries in `agents`, source IDs in `bindings.agents`, and totals in `counts.agents`. Definition import and publication have separate outcomes. Check `agents[].publishing.state` and `workflows[].publishing.state` for publication results, including `failed`. A publication failure retains the imported definition and returns HTTP 200.

        Selected-Agent exports use this endpoint. Agent content is rejected by `/import-selection`, directory imports, and Promotions before writes.

        Example multipart fields: `conflictPolicy=new-version`, `idPolicy=source`, `publishingPolicy=match-source`, and `bindings={"credentials":{"source-credential":"target-credential"}}`.
      x-required-scope: workflow:import,agent:import
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                package:
                  type: string
                  description: Gzip-compressed tar package (`.n8np`).
                  format: binary
                projectId:
                  type: string
                  description: Target project id. Omit or send empty to import into the caller's personal project.
                folderId:
                  type: string
                  description: Optional folder within the target project. Omit or send empty for project root.
                credentialMatchingMode:
                  type: string
                  enum:
                    - id-only
                    - name-and-type
                    - type-only
                  default: id-only
                  description: How credential references in `requirements.credentials` are matched on the target instance. `id-only` (default) matches by id. `name-and-type` matches credentials with the exact same name and type. `type-only` matches any credential of the same type. For `name-and-type` and `type-only`, candidates are ranked by scope — a credential owned by the target project wins over one merely shared into it, which in turn wins over a global credential; if several candidates remain in the winning scope, the most recently updated one is chosen.
                credentialMissingMode:
                  type: string
                  enum:
                    - must-preexist
                    - create-stub
                    - create-with-values
                  default: create-stub
                  description: What to do when a credential reference cannot be resolved. `create-stub` (default) creates empty credential placeholders in the target project for missing references. `create-with-values` also creates them, seeded from the expression data bundled in the package (see the export option `credentialExportPolicy`); a reference the package carries no data for falls back to an empty stub. A credential created with package data is listed under `credentials.seeded` when the package confirms that all source data was retained. Otherwise, also when the package has no completeness flag, it is listed under `credentials.incomplete` and blocks workflow publishing with `incomplete-credential`. `create-with-values` requires the `credential:create` scope when the import creates a credential. `must-preexist` requires every referenced credential to already exist.
                credentialConflictPolicy:
                  type: string
                  enum:
                    - keep-existing
                    - overwrite
                    - fail
                  default: keep-existing
                  description: 'What to do when a credential reference matches an existing credential and the package has different values for it. `keep-existing` (default) never changes a matched credential. `overwrite` writes the package name and the expression values from the package to a matched credential that a project of the import owns. It keeps all other stored values: secrets, other fields, the OAuth connection, and array fields. It never changes a global credential that a different project owns, or a managed, end-user (resolvable) or instance-level credential. The import lists the source ids of changed credentials under `credentials.updated`. An API key needs the `credential:update` scope when the import changes a credential. `fail` rejects the import with a 409 (`credential-conflict`) when `overwrite` would change a matched credential. Every policy leaves a matched credential alone when the package values are the same as the stored values. `overwrite` and `fail` compare stored values, so they need the `credential:update` permission on each matched credential that a project of the import owns, also when it would not change. Without it, the import is rejected with `credential-update-forbidden`.'
                bindings:
                  type: string
                  description: 'Optional JSON object of explicit source→target id bindings, keyed by entity type. Only `credentials` is supported today: send `{"credentials":{"<packageCredentialId>":"<targetCredentialId>"}}` to map credential ids from the package to credential ids on the target instance. These explicit bindings are validated on type and applied before `credentialMatchingMode` resolution runs.'
                  default: '{}'
                conflictPolicy:
                  type: string
                  enum:
                    - new-version
                    - fail
                    - skip
                  description: Applies to Agents, workflows and the skills of imported Agents. `new-version` replaces matched definitions and saves a changed skill as a new version. `fail` rejects the import when an Agent or workflow matches, or when a matched skill has other content. A matched skill with the same content is kept. `skip` leaves matched definitions and skills unchanged. All policies create entities and skills that have no match. A new version of a project or instance skill applies to all Agents on the instance that follow the skill, also Agents that are not in the package. A skill conflict under `fail` is an `agent-invalid` issue, so it returns 422. Matched workflows also follow the package archive state under `new-version`; this change needs `workflow:delete`. This required field replaces `workflowConflictPolicy`. The old field is rejected.
                publishingPolicy:
                  type: string
                  enum:
                    - preserve-published-state
                    - match-source
                    - publish-all
                    - unpublish-all
                  default: preserve-published-state
                  description: Controls publication of imported Agents and workflows after definitions are saved. `preserve-published-state` (default) keeps new entities unpublished. It republishes an updated entity only if it was published and the package contains the version published at the source. `match-source` publishes the imported definition when the source publishes it. It unpublishes the destination when the source has no published version. Both policies leave publication unchanged when the source publishes a version absent from the package. `publish-all` requests publication of imported entities. `unpublish-all` leaves new entities unpublished and unpublishes updated entities. Skipped entities remain unchanged. Archived workflows remain unpublished. Publication failures do not undo saved definitions. Only the Agent revision saved by the import can be published or unpublished. This field replaces `workflowPublishingPolicy` and `agentPublishingPolicy`. The old fields are rejected.
                idPolicy:
                  type: string
                  enum:
                    - source
                  default: source
                  description: Controls IDs for newly created Agents and workflows. Only `source` is supported. It uses the package ID. An ID already used by an unmatched Agent or workflow, in any project, blocks the import. Matched entities keep their destination ID. Agent and workflow identity maps remain separate. This field replaces `workflowIdPolicy` and `agentIdPolicy`. The old fields are rejected.
                missingNodeTypeMode:
                  type: string
                  enum:
                    - fail
                    - import-anyway
                  default: fail
                  description: Controls missing node types and versions in workflow nodes and Agent node tools. `fail` (default) rejects the import before writes. The issues identify the affected consumers. `import-anyway` saves the definitions but blocks their publication. This applies to both Agents and workflows.
                projectConflictPolicy:
                  type: string
                  enum:
                    - merge
                    - fail
                    - overwrite
                  default: merge
                  description: What to do when a project the package defines already exists here (matched by id), and — unless `folderConflictPolicy` overrides it — how its contents are treated. `merge` (default) leaves the existing project's name, description, icon and custom span attributes untouched and adds the package's contents alongside. `overwrite` replaces those details with the package's; a detail the package omits is left as it is, not cleared. `fail` rejects the import before anything is written, with one `project-conflict` issue per existing project. A package project id belonging to a personal project, or to a team project the caller cannot update, always rejects the import. Ignored for workflow packages.
                folderConflictPolicy:
                  type: string
                  enum:
                    - merge
                    - fail
                    - overwrite
                  description: What to do when a package folder already exists at the same position in the target project. Defaults to whatever `projectConflictPolicy` is, so the intent is stated once; a workflow package defines no projects, so it defaults to `merge` there. `merge` reuses the existing folder and merges the package's children into it. `fail` rejects the import. `overwrite` reuses folders as `merge` does and additionally removes workflows the package does not contain — at a project's root and in folders the package defines, leaving target-only folders and their contents alone. Folders it does not define are then removed too, but only once nothing is left inside them. Removals are listed under `removedWorkflows` and `removedFolders`; see `overwriteDeletionPolicy`. A folder whose id sits under a different parent, or belongs to another project, always blocks the import. `overwrite` is project-packages-only, needs the `workflow:delete` and `folder:delete` scopes, is rejected against a `projectConflictPolicy` other than `overwrite`, and blocks up front if the caller cannot delete something it would remove. Folders need the `folder:create` scope and a folders-enabled licence.
                overwriteDeletionPolicy:
                  type: string
                  enum:
                    - archive
                    - hard-delete
                  default: archive
                  description: 'How `folderConflictPolicy=overwrite` removes a workflow the package does not contain. `archive` (default) archives it, so it stays recoverable along with its execution history. `hard-delete` archives it — the step that unpublishes it, which a delete will not do on its own — and then deletes the workflow and its executions permanently. Each entry in `removedWorkflows` reports what actually happened in its `deletion` field: a `hard-delete` whose row cannot be dropped yet, because unpublishing defers trigger teardown, is left `archived` rather than failing an import whose content is already written. Ignored unless `folderConflictPolicy` is `overwrite`.'
                dataTableMatchingMode:
                  type: string
                  enum:
                    - by-id
                  default: by-id
                  description: How data tables referenced by the package's workflows are matched against the target project. `by-id` matches the target-project table with the same id (imported tables keep their source id) and never falls back to name matching, so a match survives a rename on the target. Currently the only mode.
                dataTableMissingMode:
                  type: string
                  enum:
                    - create
                    - must-preexist
                    - do-nothing
                  default: create
                  description: Controls what happens when a referenced data table has no match in the target project. `create` (default) creates it from the package schema, keeping the source id, with no rows; requires the `dataTable:create` scope. `must-preexist` rejects the import. `do-nothing` skips creation of missing tables. Under the `keep-existing`, `fail`, and `overwrite-non-destructive` schema conflict policies, matched tables are still validated for schema compatibility and can still block the import. The import never imports table rows. Matched tables change only under `dataTableSchemaConflictPolicy=overwrite` or `overwrite-non-destructive`, which keep their rows.
                dataTableSchemaConflictPolicy:
                  type: string
                  enum:
                    - keep-existing
                    - fail
                    - overwrite
                    - overwrite-non-destructive
                  default: keep-existing
                  description: |-
                    How strictly a matched data table's schema is compared. `keep-existing` (default) accepts a target table that has every package column with the same name and type. The target table can have extra columns. `fail` rejects any difference, including target-only columns. Under `keep-existing` and `fail`, a missing package column or a type mismatch rejects the import, and the target table does not change.

                    `overwrite` changes the matched target table to match the package. It can remove or retype columns. The values in those columns are removed. Rows and other columns are kept. When the package has column ids, a column that is only renamed keeps its values. The changes apply to all workflows that use the table. A blocked `keep-existing`, `fail`, or `overwrite-non-destructive` import lists them in `overwriteChanges`. Requires the `dataTable:update` scope only when a matched table changes.

                    `overwrite-non-destructive` makes the same changes as `overwrite`, but rejects the import and writes nothing when a change removes or retypes a column. A target-only column counts as removed.
                variableMissingMode:
                  type: string
                  enum:
                    - do-nothing
                    - must-preexist
                    - create-stub
                    - create-with-value
                  default: create-with-value
                  description: "Controls what happens when a variable referenced by the package's workflows is absent from the target project and the global scope (lookup order: project, then global). `create-with-value` (default) creates the variable with its package value and lists its name under `variables.created`. When the package carries no value for it — values were excluded at export, or the exported value was itself empty — it creates an empty stub listed under `variables.stubbed`. `do-nothing` imports without creating the variable and lists its name under `variables.missing`. `must-preexist` rejects the import unless every referenced variable already resolves. `create-stub` creates each missing variable with an empty value at the placement scope (see `variableParentPolicy`) and lists the created names under `variables.stubbed`. An import that actually creates a variable requires a license that permits variables and, for API key callers, the `variable:create` scope; a package whose variables all already resolve creates nothing and needs neither."
                variableConflictPolicy:
                  type: string
                  enum:
                    - keep-existing
                    - overwrite
                    - fail
                  default: keep-existing
                  description: "What to do when a referenced variable resolves in the target project or global scope but the package bundles a *different* value for it. `keep-existing` (default) leaves the target value untouched and reports the name under `variables.matched`. `overwrite` silently replaces the value of the existing variable at whichever scope it was found — the target project or the global scope, so a global variable other projects also read can be rewritten by this import — and reports the name under `variables.updated`; it needs a license that permits variables, the `variable:update` / `projectVariable:update` permission on that scope, and, for API key callers, the `variable:update` scope. `fail` rejects the import with a 409 instead. Every policy leaves a resolved variable alone when there is nothing to change — either the package bundles no value for it (values were excluded at export, or the exported value was itself empty), or the value it bundles already matches the target's. The reverse does not hold: a resolved variable holding an empty value — a stub an earlier import created, say — still counts as a value, so `overwrite` fills it and `fail` rejects it. Under `overwrite`, a project package whose projects hold *different* values for a name they all resolve to one row — a global none of them shadows, typically — is rejected with a 409: one row cannot carry both values, and the import will not pick for you. Give the projects their own variables in the target, or import them separately."
                variableParentPolicy:
                  type: string
                  enum:
                    - project
                    - global
                  description: "Where `create-with-value` and `create-stub` create missing variables for workflow/folder packages. `project` — also the behaviour when the field is omitted — creates them in the import target project (`projectId`, else the caller's personal project). `global` creates them at the global scope. The license and `variable:create` requirements described under `variableMissingMode` apply to both placements. Must be omitted for project packages, which reject it with a 400: their placement follows the package layout, where a variable bundled under a project is created in that project and one bundled at the top level is created globally."
                tagMissingMode:
                  type: string
                  enum:
                    - create
                    - do-nothing
                  default: create
                  description: What to do when a tag referenced by the package's workflows has no tag with the same id on the target instance (tags are matched by source id, never by name). `create` (default) creates the tag globally with its package (source) id and name; when the import would create a tag this needs an API key carrying the `tag:create` scope. `do-nothing` imports the workflows without the missing tags — nothing is created and the dropped names are listed under `tags.skipped`.
                tagConflictPolicy:
                  type: string
                  enum:
                    - skip
                    - fail
                    - rename
                  default: skip
                  description: What to do when a referenced tag conflicts on the target instance — either the same-id target tag carries a different name (rename drift), or the tag's name is already held by a different tag (name collision). `skip` (default) drops the conflicted tags from the import (not created, not renamed, not attached anywhere; the import proceeds and lists them under `tags.skipped`). `fail` rejects the import with a 409. `rename` renames a drifted target tag to the package name, and reconciles a name collision by re-keying the existing tag to the package (source) id — its name, workflow and folder taggings follow; both need an API key carrying the `tag:update` scope when the import would rename or reconcile a tag. A drifted tag whose package name is held by another tag still rejects the import (rename degrades to fail).
              required:
                - package
                - conflictPolicy
              additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/importResultDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          description: Import blocked by at least one conflict among the issues — an Agent or workflow identity conflict, a folder conflict, a tag conflict (rename drift or name collision), a data table conflict (id owned by another project, or a name that another table in the project has), a variable whose bundled value differs from the resolved target, or a selected destination also named for deletion.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  issues:
                    type: array
                    items:
                      $ref: '#/components/schemas/importBlockingIssue.generated'
                required:
                  - message
                  - issues
        '413':
          $ref: '#/components/responses/contentTooLarge'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          description: 'Import blocked by non-conflict issues only — for example unresolved credentials or variables, invalid Agent definitions or dependencies, node types this instance does not have, a delete the caller may not perform, or variable stubs whose creation would exceed the instance variable quota. Exception: a skill conflict returns 422, also under `conflictPolicy=fail`. The import plans a skill as part of each Agent that uses it, so it reports every skill problem as an `agent-invalid` issue on that Agent, with the path `skills.<skillId>`.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  issues:
                    type: array
                    items:
                      $ref: '#/components/schemas/importBlockingIssue.generated'
                required:
                  - message
                  - issues
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/internalServerError'
  /n8n-packages/import-selection:
    post:
      operationId: importPackageSelection
      tags:
        - N8nPackage
      summary: 'Beta: Import a selected subset of workflows from an n8n package'
      description: |-
        **Beta** — breaking changes may still occur without major version bump.

        Imports a chosen subset of workflows from one source project of a gzip-compressed tar package (`.n8np`), instead of the whole package. Send the archive as the multipart field `package`. The import is **additive** (cherry-pick): it never removes a workflow the selection omits. It creates or updates only the workflows named in `selectedWorkflowIds`, and deletes only the destination workflows named in `deletedWorkflowIds`.

        `selectedProjectId` names the single source project the selection is scoped to (its id as it appears in the package). The selected workflows are written into the instance project whose id matches that source project, which is created if it does not yet exist; there is no separate target-project field. `selectedWorkflowIds` are source ids within that project; ids that belong to another project are dropped. `deletedWorkflowIds` are destination ids in the same project; an absent id is a tolerated no-op, and a delete needs the `workflow:delete` scope. A delete id must not match the destination id of a selected workflow, including when `conflictPolicy=skip`. This overlap returns a 409 before any writes.

        The package must be a project package (a workflow package is rejected with a 400). The cherry-pick conflict policies (folder, tag, and project) are fixed and are not accepted here; only `conflictPolicy`, `idPolicy`, and `overwriteDeletionPolicy` are configurable. Maximum upload size is `N8N_ENDPOINTS_PAYLOAD_SIZE_MAX` MB (default 16). The caller is authorised through the `workflow:import` scope. Packages that contain Agents are rejected before writes. Use the ordinary import endpoint for selected-Agent exports. `conflictPolicy` replaces `workflowConflictPolicy`, and `idPolicy` replaces `workflowIdPolicy`. The old fields are rejected. Publication remains fixed to `match-source`. When `match-source` publishes a selected workflow, the API key also needs `workflow:activate`. When it unpublishes one, the key needs `workflow:deactivate`. Archiving or restoring a matched workflow also needs `workflow:delete`. Restoring and publishing a workflow requires both `workflow:delete` and `workflow:activate`.
      x-required-scope: workflow:import
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                package:
                  type: string
                  description: Gzip-compressed tar package (`.n8np`).
                  format: binary
                selectedProjectId:
                  type: string
                  minLength: 1
                  description: Id of the single source project the selection is scoped to, as it appears in the package.
                selectedWorkflowIds:
                  type: string
                  description: JSON-encoded array of source workflow ids to import from `selectedProjectId`, e.g. `["wf-1","wf-2"]`. An empty array (`[]`) is allowed — useful for a delete-only request. Ids outside the scoped project are dropped.
                deletedWorkflowIds:
                  type: string
                  description: Optional JSON-encoded array of destination workflow ids to remove from the scoped project, e.g. `["wf-3"]`. Removal happens even under the additive profile, and the manner of removal follows `overwriteDeletionPolicy` (archive by default). An absent id is a no-op unless it is also a selected destination. Must not contain a selected workflow's destination id. Needs the `workflow:delete` scope.
                conflictPolicy:
                  type: string
                  enum:
                    - new-version
                    - fail
                    - skip
                  default: new-version
                  description: What happens when a selected workflow matches an existing workflow by source id in the target project. `new-version` (default) updates it and creates a new version; `fail` rejects the import when any matching workflow exists; `skip` leaves matching workflows unchanged. An archive state change also needs the `workflow:delete` scope.
                idPolicy:
                  type: string
                  enum:
                    - source
                  default: source
                  description: Controls IDs for newly created workflows. Only `source` is supported. It uses the package ID. An ID already used by an unmatched workflow, in any project, blocks the import. Matched workflows keep their destination ID.
                overwriteDeletionPolicy:
                  type: string
                  enum:
                    - archive
                    - hard-delete
                  default: archive
                  description: 'How the ids in `deletedWorkflowIds` are removed. `archive` (default) archives each one, so it stays recoverable along with its execution history. `hard-delete` archives it — the step that unpublishes it, which a delete will not do on its own — and then deletes the workflow and its executions permanently. Each entry in `removedWorkflows` reports what actually happened in its `deletion` field: a `hard-delete` whose row cannot be dropped yet, because unpublishing defers trigger teardown, is left `archived` rather than failing an import whose content is already written.'
              required:
                - package
                - selectedProjectId
                - selectedWorkflowIds
              additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/importResultDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          description: Import blocked by at least one conflict among the issues — for example a workflow source-id conflict under `conflictPolicy=fail`, or a selected destination also named for deletion (`workflow-removal-conflict`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  issues:
                    type: array
                    items:
                      $ref: '#/components/schemas/importBlockingIssue.generated'
                required:
                  - message
                  - issues
        '413':
          $ref: '#/components/responses/contentTooLarge'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          description: Import blocked by non-conflict issues only — for example a delete the caller may not perform (`workflow-removal-forbidden`), unresolved credentials, or node types this instance does not have.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  issues:
                    type: array
                    items:
                      $ref: '#/components/schemas/importBlockingIssue.generated'
                required:
                  - message
                  - issues
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/internalServerError'
  /n8n-packages/export:
    post:
      operationId: exportPackage
      tags:
        - N8nPackage
      summary: 'Beta: Export agents, workflows, folders, or projects as an n8n package'
      description: |
        **Beta** — breaking changes may still occur without major version bump.

        Export agents, workflows, and folders, or whole projects, as a gzipped tar
        archive (.n8np). Provide `agentIds`/`workflowIds`/`folderIds`, or `projectIds`.
        Do not combine these two groups. Each exported folder includes its nested
        folders. Whole projects include their agents when the agents module is enabled.
        Explicit agent selections require the agents module. Empty projects export
        project metadata only. `versionPolicy` selects the version for both agents and
        workflows and defaults to `latest`. `dependencyPolicy` applies to both entity
        types and defaults to `fail` when a required definition is absent from the
        package. The response is streamed as `application/gzip` with a `Content-Disposition`
        attachment header. Requires the n8n Packages feature to be licensed.

        API key scopes: `agent:export` is required for explicitly selected agents.
        `workflow:export` is required for explicitly selected workflows or folders.
        `project:export` is sufficient for whole-project exports, including their
        agents and workflows. Included dependencies need no additional API key scope.
        The caller's project permissions apply to all included entities. When
        `includeVariableValues` is true (the default) and exported entities reference
        variables, `variable:list` is also required. Exports that reference no variables
        do not need it.

        Agent definitions include referenced skills, custom tools, and schedules.
        Knowledge base files and runtime data are excluded.
      x-required-scope: project:export,workflow:export,agent:export
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agentIds:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  minItems: 1
                  maxItems: 300
                  description: IDs of the agents to include. Requires the agents module.
                  example:
                    - uT9LdQx7rK2MvB4f
                workflowIds:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  minItems: 1
                  maxItems: 300
                  description: IDs of the workflows to include in the exported package.
                  example:
                    - 2tUt1wbLX592XDdX
                folderIds:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  minItems: 1
                  maxItems: 300
                  description: IDs of the folders to include in the exported package. Each folder is exported with its nested folders.
                  example:
                    - 9xKp2mNqRzAbCdEf
                projectIds:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  minItems: 1
                  maxItems: 300
                  description: IDs of the projects to include in the exported package. Includes their agents when the agents module is enabled.
                  example:
                    - Ox8O54VQrmBrb4qL
                includeVariableValues:
                  type: boolean
                  default: true
                  description: Whether values of variables referenced by the exported entities are bundled into the package. When `false`, variables still travel as name/type files and are listed in the package requirements, but no values travel with the package.
                includeTags:
                  type: boolean
                  default: true
                  description: Whether tags assigned to the exported workflows are bundled into the package. When `false`, no tag files, tag references, or tag requirements travel with the package.
                dependencyPolicy:
                  type: string
                  enum:
                    - fail
                    - reference-only
                    - include-in-package
                  default: fail
                  description: Policy for workflow and agent dependencies outside the selected package contents. Includes static workflow references and disabled agent references. `fail` aborts when a required workflow or agent is absent from the package. `include-in-package` adds accessible dependencies recursively. `reference-only` records external requirements without including those definitions. The same policy applies to workflows and agents.
                  example: fail
                versionPolicy:
                  type: string
                  enum:
                    - published-strict
                    - prefer-published
                    - ignore-unpublished
                    - latest
                  default: latest
                  description: Which version of each workflow and agent travels in the package. `latest` exports the current draft. `published-strict` requires a published version. `prefer-published` uses the published version when available and the draft otherwise. `ignore-unpublished` skips unpublished selections. Dependencies that cannot be included cause the export to fail only when `dependencyPolicy` is `fail` or `include-in-package`. With `reference-only`, the export records them as external requirements. The selected version supplies the definition and its references. Workflow names, settings, and tags always use their current values. Agent IDs, names, and MCP availability always use their current values. Skills have no published versions. The package always contains the latest saved version of each skill, also under `published-strict`. The package does not pin skill versions.
                  example: latest
                credentialExportPolicy:
                  type: string
                  enum:
                    - expression-values-only
                    - no-values
                  default: expression-values-only
                  description: Whether expression values from credential data are bundled into the package. `expression-values-only` includes credential fields whose value is an n8n expression (for example `={{ $secrets.apiKey }}`); literal values never travel either way. `no-values` keeps credential data out of the package entirely, so each credential file carries only its id, name and type.
                  example: expression-values-only
                includeArchivedWorkflows:
                  type: boolean
                  default: false
                  description: 'Whether folder and project exports include their archived workflows. When `false` (default) they are left out. When `true` they travel with `isArchived: true` and are archived on import. Workflows listed in `workflowIds` always export, also when archived.'
                  example: false
              additionalProperties: false
      responses:
        '200':
          description: A gzipped tar archive containing the exported package contents.
          headers:
            X-N8n-Export-Counts:
              description: |
                JSON-serialized per-entity counts of what actually ended up in the
                package (after folder bundling and auto-inclusion), e.g.
                `{"agents":1,"workflows":2,"folders":1,"credentials":0,"dataTables":0,"variables":0,"tags":0}`.
              required: true
              schema:
                type: string
          content:
            application/gzip:
              schema:
                type: string
                format: binary
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /node-type-policies/instance:
    get:
      operationId: getNodeTypeInstancePolicy
      tags:
        - NodeTypePolicy
      summary: 'Preview: Retrieve the instance node type policy'
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Returns the composed instance-scope policy: its default action and the rules of every attached policy document in evaluation order. An instance that was never configured reports `scopeId: null`, no rules, `defaultAction: allow`, and `version: 0`.
      x-required-scope: nodeTypePolicy:manage
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/policyEffectivePublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    put:
      operationId: putNodeTypeInstancePolicy
      tags:
        - NodeTypePolicy
      summary: 'Preview: Replace the instance node type policy'
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Sets the instance default action and replaces the rules of its single policy document, creating both on first write. `version` must equal the version last read; a stale value is rejected with 409. Rule ids must be unique within the list.
      x-required-scope: nodeTypePolicy:manage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rules:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      action:
                        type: string
                        enum:
                          - allow
                          - deny
                          - delegate
                      selector:
                        oneOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - name
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - package
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                        type: object
                    required:
                      - id
                      - action
                      - selector
                defaultAction:
                  type: string
                  enum:
                    - allow
                    - deny
                    - delegate
                version:
                  type: integer
                  minimum: 0
              required:
                - rules
                - defaultAction
                - version
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/policyEffectiveWriteResultPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /node-type-policies/projects/{projectId}:
    get:
      operationId: getNodeTypeProjectPolicy
      tags:
        - NodeTypePolicy
      summary: "Preview: Retrieve a project's node type policy"
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Returns the project's own composed policy, not the result of combining it with the instance policy. A project that was never configured reports `scopeId: null`, no rules, `defaultAction: allow`, and `version: 0`.
      x-required-scope: nodeTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/policyEffectivePublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    put:
      operationId: putNodeTypeProjectPolicy
      tags:
        - NodeTypePolicy
      summary: "Preview: Replace a project's node type policy"
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Sets the project's default action and replaces the rules of its single policy document, creating both on first write. The `delegate` action is not accepted at project scope. `version` must equal the version last read; a stale value is rejected with 409, as is a project document that is shared with another scope.
      x-required-scope: nodeTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rules:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      action:
                        type: string
                        enum:
                          - allow
                          - deny
                      selector:
                        oneOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - name
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - package
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                        type: object
                    required:
                      - id
                      - action
                      - selector
                defaultAction:
                  type: string
                  enum:
                    - allow
                    - deny
                version:
                  type: integer
                  minimum: 0
              required:
                - rules
                - defaultAction
                - version
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/policyEffectiveWriteResultPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /node-type-policies/policies:
    get:
      operationId: listNodeTypePolicyDocuments
      tags:
        - NodeTypePolicy
      summary: 'Preview: List node type policy documents'
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Returns a cursor-paginated list of reusable policy documents.
      x-required-scope: nodeTypePolicy:manage
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        kind:
                          type: string
                        rules:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              action:
                                type: string
                                enum:
                                  - allow
                                  - deny
                                  - delegate
                              selector:
                                oneOf:
                                  - type: object
                                    properties:
                                      kind:
                                        type: string
                                        enum:
                                          - name
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - kind
                                      - value
                                  - type: object
                                    properties:
                                      kind:
                                        type: string
                                        enum:
                                          - package
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - kind
                                      - value
                                type: object
                            required:
                              - id
                              - action
                              - selector
                        version:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                        updatedBy:
                          type: string
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - id
                        - kind
                        - rules
                        - version
                        - updatedBy
                        - createdAt
                        - updatedAt
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    post:
      operationId: createNodeTypePolicyDocument
      tags:
        - NodeTypePolicy
      summary: 'Preview: Create a node type policy document'
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Creates a reusable policy document that is not yet attached to any scope. Rule ids must be unique within the list. `warnings` lists rules that an earlier rule already shadows.
      x-required-scope: nodeTypePolicy:manage
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rules:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      action:
                        type: string
                        enum:
                          - allow
                          - deny
                          - delegate
                      selector:
                        oneOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - name
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - package
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                        type: object
                    required:
                      - id
                      - action
                      - selector
              required:
                - rules
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/policyDocumentWriteResultPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /node-type-policies/policies/{policyId}:
    get:
      operationId: getNodeTypePolicyDocument
      tags:
        - NodeTypePolicy
      summary: 'Preview: Retrieve a node type policy document'
      description: '**Preview** — breaking changes may still occur without major version bump.'
      x-required-scope: nodeTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the node type policy document.
          name: policyId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  kind:
                    type: string
                  rules:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                        action:
                          type: string
                          enum:
                            - allow
                            - deny
                            - delegate
                        selector:
                          oneOf:
                            - type: object
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - name
                                value:
                                  type: string
                                  minLength: 1
                              required:
                                - kind
                                - value
                            - type: object
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - package
                                value:
                                  type: string
                                  minLength: 1
                              required:
                                - kind
                                - value
                          type: object
                      required:
                        - id
                        - action
                        - selector
                  version:
                    type: integer
                    minimum: 0
                    exclusiveMinimum: true
                  updatedBy:
                    type: string
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - kind
                  - rules
                  - version
                  - updatedBy
                  - createdAt
                  - updatedAt
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    put:
      operationId: updateNodeTypePolicyDocument
      tags:
        - NodeTypePolicy
      summary: 'Preview: Replace the rules of a node type policy document'
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Replaces the document's whole rule list. `version` must equal the version last read; a stale value is rejected with 409. Every scope the document is attached to has its version bumped. A `delegate` rule is rejected when the document is attached to a project scope.
      x-required-scope: nodeTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the node type policy document.
          name: policyId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rules:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      action:
                        type: string
                        enum:
                          - allow
                          - deny
                          - delegate
                      selector:
                        oneOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - name
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - package
                              value:
                                type: string
                                minLength: 1
                            required:
                              - kind
                              - value
                        type: object
                    required:
                      - id
                      - action
                      - selector
                version:
                  type: integer
                  minimum: 0
              required:
                - rules
                - version
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/policyDocumentWriteResultPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    delete:
      operationId: deleteNodeTypePolicyDocument
      tags:
        - NodeTypePolicy
      summary: 'Preview: Delete a node type policy document'
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Deletes a policy document. A document that is still attached to a scope is rejected with 409; detach it first.
      x-required-scope: nodeTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the node type policy document.
          name: policyId
          in: path
      responses:
        '204':
          description: Operation successful.
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /node-type-policies/scopes/{scopeId}/attachments:
    get:
      operationId: getNodeTypePolicyAttachments
      tags:
        - NodeTypePolicy
      summary: "Preview: Retrieve a scope's attached policy documents"
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Returns every attached policy document and the scope version. Attachments use evaluation order: floor first, then priority ascending within each group. Use this version when replacing the attachments. `scopeId` comes from `GET /instance` or `GET /projects/{projectId}`, and is null until the scope is first written. This route needs instance-level access, also for a project scope.
      x-required-scope: nodeTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the node type policy scope.
          name: scopeId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/policyAttachmentsPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    put:
      operationId: replaceNodeTypePolicyAttachments
      tags:
        - NodeTypePolicy
      summary: "Preview: Replace a scope's attached policy documents"
      description: |-
        **Preview** — breaking changes may still occur without major version bump.

        Replaces every attachment on a scope. `scopeId` comes from the scope's `GET` response once it has been written. Each `policyId` and each `(isFloor, priority)` pair must be unique within the list. `version` must match the current scope version. A stale version returns 409 without changes. A successful write bumps the scope's version.
      x-required-scope: nodeTypePolicy:manage
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the node type policy scope.
          name: scopeId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                attachments:
                  type: array
                  items:
                    type: object
                    properties:
                      policyId:
                        type: string
                        minLength: 1
                      priority:
                        type: integer
                      isFloor:
                        type: boolean
                    required:
                      - policyId
                      - priority
                      - isFloor
                version:
                  type: integer
                  minimum: 0
              required:
                - attachments
                - version
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/policyAttachmentsPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /settings/otel:
    get:
      operationId: getOtelSettings
      tags:
        - SettingsOtel
      summary: Retrieve the OpenTelemetry configuration
      description: Retrieve the current OpenTelemetry configuration, including every field exposed in the UI. Requires the `otel:manage` scope.
      x-required-scope: otel:manage
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/otelSettingsPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    put:
      operationId: updateOtelSettings
      tags:
        - SettingsOtel
      summary: Set the OpenTelemetry configuration
      description: 'Set the OpenTelemetry configuration. This is a full replacement: every field must be provided, and a partial body is rejected. The exceptions are `exporterProtocol`, which defaults to `http/protobuf` when omitted, and `emitWorkflowStartSpan` and `emitNodeStartSpan`, which default to `false` when omitted. The update takes effect exactly as it would from the UI, using the same validation, and is applied to the running instance immediately. Fields managed declaratively via environment variables are read-only: attempting to change one is rejected with 409, while re-submitting its current value (as returned by GET) is accepted. Requires the `otel:manage` scope.'
      x-required-scope: otel:manage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
                  description: Whether OpenTelemetry tracing is enabled.
                  example: true
                exporterProtocol:
                  type: string
                  enum:
                    - http/protobuf
                    - grpc
                  default: http/protobuf
                  description: 'The wire protocol used to export spans. Collectors conventionally serve OTLP/HTTP on port 4318 and OTLP/gRPC on port 4317. The endpoint scheme (`http://` or `https://`) controls TLS for both protocols. Optional: a write that omits it selects `http/protobuf`, but an instance that sets this field to another value with an environment variable rejects that write with 409.'
                  example: http/protobuf
                exporterEndpoint:
                  type: string
                  format: uri
                  pattern: ^https?:\/\/
                  description: The base URL of the OTLP collector to export traces to. The value must be an `http://` or `https://` URL, because the scheme selects TLS — for gRPC, `https://` uses SSL and `http://` is plaintext.
                  example: http://localhost:4318
                exporterTracingPath:
                  type: string
                  description: The path appended to the endpoint for the OTLP traces signal. Ignored when `exporterProtocol` is `grpc`, which takes no URL path.
                  example: /v1/traces
                exporterServiceName:
                  type: string
                  minLength: 1
                  description: The `service.name` resource attribute reported on every span.
                  example: n8n
                exporterHeaders:
                  type: string
                  description: Additional headers sent to the OTLP collector, as a single string of comma-separated `key=value` pairs (e.g. `authorization=Bearer my-token,x-tenant-id=acme`). Whitespace around each key and value is trimmed; a value may contain spaces but not commas. Use an empty string when unused.
                  example: authorization=Bearer my-token,x-tenant-id=acme
                tracesSampleRate:
                  type: number
                  minimum: 0
                  maximum: 1
                  description: The ratio of traces to sample, between 0 (none) and 1 (all).
                  example: 1
                startupConnectivityTimeoutMs:
                  type: integer
                  description: How long, in milliseconds, to wait when checking the collector is reachable. Also used as the timeout for the test-trace endpoint.
                  minimum: 0
                  example: 2000
                includeNodeSpans:
                  type: boolean
                  description: Whether to emit a span for each node execution in addition to the workflow span.
                  example: true
                emitWorkflowStartSpan:
                  type: boolean
                  default: false
                  description: 'Whether to emit a `workflow.execute.started` span with a duration of 0 ms when each execution or resumed segment starts. Optional: a write that omits it selects `false`, but an instance that sets this field to `true` with an environment variable rejects that write with 409.'
                  example: false
                emitNodeStartSpan:
                  type: boolean
                  default: false
                  description: 'Whether to emit a `node.execute.started` span with a duration of 0 ms when each node span starts. This doubles the number of node spans. Has no effect when `includeNodeSpans` is false. Optional: a write that omits it selects `false`, but an instance that sets this field to `true` with an environment variable rejects that write with 409.'
                  example: false
                injectOutbound:
                  type: boolean
                  description: Whether to inject trace context headers into outbound HTTP requests made by nodes.
                  example: true
                productionExecutionsOnly:
                  type: boolean
                  description: When true, only production executions of published (active) workflows are traced, not manual/test runs.
                  example: true
              required:
                - enabled
                - exporterEndpoint
                - exporterTracingPath
                - exporterServiceName
                - exporterHeaders
                - tracesSampleRate
                - startupConnectivityTimeoutMs
                - includeNodeSpans
                - injectOutbound
                - productionExecutionsOnly
              additionalProperties: false
              description: 'The OpenTelemetry configuration, matching the fields exposed in the UI. On a write this is a full replacement: every field must be provided, except `exporterProtocol`, which defaults to `http/protobuf` when omitted, and `emitWorkflowStartSpan` and `emitNodeStartSpan`, which default to `false` when omitted. Fields managed declaratively via environment variables are returned with their effective value. A write can repeat these values, but changing them returns 409.'
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/otelSettingsPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /settings/otel/test-trace:
    post:
      operationId: testOtelTrace
      tags:
        - SettingsOtel
      summary: Test the connection to an OTLP collector
      description: Send a single test span to the given OTLP collector and report whether it was accepted. This tests the supplied connection details without changing the stored configuration. Fields managed declaratively via environment variables are overridden with their effective value before the test is sent. Requires the `otel:manage` scope.
      x-required-scope: otel:manage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                exporterProtocol:
                  type: string
                  enum:
                    - http/protobuf
                    - grpc
                  default: http/protobuf
                  description: 'The wire protocol used to send the test span. Collectors conventionally serve OTLP/HTTP on port 4318 and OTLP/gRPC on port 4317. The endpoint scheme (`http://` or `https://`) controls TLS for both protocols. Optional: omitting it selects `http/protobuf`, unless an environment variable manages this field, which then supplies the value.'
                  example: http/protobuf
                exporterEndpoint:
                  type: string
                  format: uri
                  pattern: ^https?:\/\/
                  description: The base URL of the OTLP collector to export traces to. The value must be an `http://` or `https://` URL, because the scheme selects TLS — for gRPC, `https://` uses SSL and `http://` is plaintext.
                  example: http://localhost:4318
                exporterTracingPath:
                  type: string
                  description: The path appended to the endpoint for the OTLP traces signal. Ignored when `exporterProtocol` is `grpc`, which takes no URL path.
                  example: /v1/traces
                exporterServiceName:
                  type: string
                  minLength: 1
                  description: The `service.name` resource attribute reported on the test span.
                  example: n8n
                exporterHeaders:
                  type: string
                  description: Additional headers sent to the OTLP collector, as a single string of comma-separated `key=value` pairs (e.g. `authorization=Bearer my-token,x-tenant-id=acme`). Whitespace around each key and value is trimmed; a value may contain spaces but not commas. Use an empty string when unused.
                  example: authorization=Bearer my-token,x-tenant-id=acme
                startupConnectivityTimeoutMs:
                  type: integer
                  minimum: 0
                  description: How long, in milliseconds, to wait for the collector to respond.
                  example: 2000
              required:
                - exporterEndpoint
                - exporterTracingPath
                - exporterServiceName
                - exporterHeaders
                - startupConnectivityTimeoutMs
              additionalProperties: false
              description: The connection details to test against an OTLP collector. Fields managed declaratively via environment variables are overridden with their effective value before the test is sent.
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the test span was accepted by the collector.
                    example: true
                  error:
                    type: string
                    description: The error reported by the collector or exporter. Present only when `success` is false.
                    example: 'Failed to connect: 401 Unauthorized'
                required:
                  - success
                additionalProperties: false
                description: The outcome of the test connection to the OTLP collector.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /projects:
    get:
      operationId: getProjects
      tags:
        - Projects
      summary: Retrieve projects
      description: Retrieve projects from your instance.
      x-required-scope: project:list
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          readOnly: true
                          example: VmwOO9HeTEj20kxM
                        name:
                          type: string
                          example: Marketing
                        type:
                          type: string
                          enum:
                            - personal
                            - team
                          readOnly: true
                          example: team
                        icon:
                          type: object
                          description: Icon of the project, or null when the project has none
                          properties:
                            type:
                              type: string
                              enum:
                                - emoji
                                - icon
                            value:
                              type: string
                            color:
                              type: string
                          required:
                            - type
                            - value
                          nullable: true
                        description:
                          type: string
                          nullable: true
                          example: Workflows the marketing team owns.
                        customTelemetryTags:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                              value:
                                type: string
                            required:
                              - key
                              - value
                        creatorId:
                          type: string
                          nullable: true
                          example: f9a2cbb8-0b1e-4b64-9c1c-0d5f5f1f2a3b
                        createdAt:
                          type: string
                          format: date-time
                          readOnly: true
                        updatedAt:
                          type: string
                          format: date-time
                          readOnly: true
                      required:
                        - id
                        - name
                        - type
                        - icon
                        - description
                        - customTelemetryTags
                        - creatorId
                        - createdAt
                        - updatedAt
                  nextCursor:
                    type: string
                    nullable: true
                    description: Paginate through projects by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
                    example: eyJvZmZzZXQiOjEwMCwibGltaXQiOjEwMH0=
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createProject
      tags:
        - Projects
      summary: Create a project
      description: Create a team project on your instance.
      x-required-scope: project:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  example: Marketing
                id:
                  type: string
                  minLength: 1
                  maxLength: 36
                  description: Project ID. The server generates an ID when omitted. An ID that is in use returns HTTP 409.
                  example: VmwOO9HeTEj20kxM
                icon:
                  type: object
                  nullable: true
                  properties:
                    type:
                      type: string
                      enum:
                        - emoji
                        - icon
                    value:
                      type: string
                      minLength: 1
                    color:
                      type: string
                  required:
                    - type
                    - value
                description:
                  type: string
                  nullable: true
                  maxLength: 512
                  example: Workflows the marketing team owns.
                customTelemetryTags:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                      value:
                        type: string
                    required:
                      - key
                      - value
                type:
                  type: string
                  readOnly: true
              required:
                - name
              additionalProperties: false
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    readOnly: true
                    example: VmwOO9HeTEj20kxM
                  name:
                    type: string
                    example: Marketing
                  type:
                    type: string
                    enum:
                      - personal
                      - team
                    readOnly: true
                    example: team
                  icon:
                    type: object
                    description: Icon of the project, or null when the project has none
                    properties:
                      type:
                        type: string
                        enum:
                          - emoji
                          - icon
                      value:
                        type: string
                      color:
                        type: string
                    required:
                      - type
                      - value
                    nullable: true
                  description:
                    type: string
                    nullable: true
                    example: Workflows the marketing team owns.
                  customTelemetryTags:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        value:
                          type: string
                      required:
                        - key
                        - value
                  creatorId:
                    type: string
                    nullable: true
                    example: f9a2cbb8-0b1e-4b64-9c1c-0d5f5f1f2a3b
                  createdAt:
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    type: string
                    format: date-time
                    readOnly: true
                  role:
                    type: string
                    description: The caller's role in the new project.
                    example: project:admin
                  scopes:
                    type: array
                    items:
                      type: string
                    description: Scopes the caller holds in the new project.
                required:
                  - id
                  - name
                  - type
                  - icon
                  - description
                  - customTelemetryTags
                  - creatorId
                  - createdAt
                  - updatedAt
                  - role
                  - scopes
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          description: A project with this ID exists already. The request does not change the existing project or its members.
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /projects/{projectId}:
    put:
      operationId: updateProject
      tags:
        - Projects
      summary: Update a project
      description: Update a project on your instance.
      x-required-scope: project:update
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  example: Marketing
                id:
                  type: string
                  readOnly: true
                type:
                  type: string
                  readOnly: true
              required:
                - name
              additionalProperties: false
      responses:
        '204':
          description: Operation successful.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteProject
      tags:
        - Projects
      summary: Delete a project
      description: Delete a project from your instance.
      x-required-scope: project:delete
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      responses:
        '204':
          description: Operation successful.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /projects/{projectId}/users:
    get:
      operationId: getProjectUsers
      tags:
        - Projects
      summary: List project members
      description: Returns a list of all members of a project including their role. Requires user:list scope.
      x-required-scope: user:list
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: The user's unique identifier.
                          readOnly: true
                          example: 123e4567-e89b-12d3-a456-426614174000
                        email:
                          type: string
                          format: email
                          description: The user's email address.
                          readOnly: true
                          example: john.doe@company.com
                        firstName:
                          type: string
                          nullable: true
                          maxLength: 32
                          description: The user's first name.
                          readOnly: true
                          example: john
                        lastName:
                          type: string
                          nullable: true
                          maxLength: 32
                          description: The user's last name.
                          readOnly: true
                          example: Doe
                        createdAt:
                          type: string
                          format: date-time
                          description: When the user was created.
                          readOnly: true
                        updatedAt:
                          type: string
                          format: date-time
                          description: When the user was last updated.
                          readOnly: true
                        role:
                          type: string
                          nullable: true
                          description: The user's role in the project (e.g. project:admin, project:viewer).
                          readOnly: true
                          example: project:viewer
                      required:
                        - id
                        - email
                        - firstName
                        - lastName
                        - createdAt
                        - updatedAt
                        - role
                      description: A project member (user with their role in the project).
                  nextCursor:
                    type: string
                    nullable: true
                    description: Paginate through project members by setting the cursor parameter to the nextCursor attribute returned by a previous request. Default value fetches the first page of the collection.
                    example: eyJvZmZzZXQiOjEwMCwibGltaXQiOjEwMH0=
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: addUsersToProject
      tags:
        - Projects
      summary: Add one or more users to a project
      description: Add one or more users to a project on your instance.
      x-required-scope: project:manageMembers
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                relations:
                  type: array
                  items:
                    type: object
                    properties:
                      userId:
                        type: string
                        minLength: 1
                        description: The unique identifier of the user.
                        example: 91765f0d-3b29-45df-adb9-35b23937eb92
                      role:
                        type: string
                        minLength: 1
                        description: The role assigned to the user in the project.
                        example: project:viewer
                    required:
                      - userId
                      - role
                  minItems: 1
                  description: A list of userIds and roles to add to the project.
              required:
                - relations
      responses:
        '201':
          description: Operation successful.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /projects/{projectId}/users/{userId}:
    patch:
      operationId: changeUserRoleInProject
      tags:
        - Projects
      summary: Change a user's role in a project
      description: Change a user's role in a project.
      x-required-scope: project:manageMembers
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the user.
          name: userId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: string
                  minLength: 1
                  description: The role assigned to the user in the project.
                  example: project:viewer
              required:
                - role
      responses:
        '204':
          description: Operation successful.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteUserFromProject
      tags:
        - Projects
      summary: Delete a user from a project
      description: Delete a user from a project on your instance.
      x-required-scope: project:manageMembers
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the user.
          name: userId
          in: path
      responses:
        '204':
          description: Operation successful.
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /promotions/providers:
    post:
      operationId: createPromotionProvider
      tags:
        - Promotions
      summary: Create a promotion provider
      description: Creates a provider and its authentication material. A Git host provider validates authenticated API access before it saves. For GitLab, the service uses n8n as the Git transport username. Its auth.username is optional. The service ignores any supplied username. Plain Git token authentication requires auth.username. An SSH provider returns the generated public key; add it to the remote as a deploy key.
      x-required-scope: promotions:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                type:
                  type: string
                  enum:
                    - git
                    - gitlab
                auth:
                  oneOf:
                    - type: object
                      properties:
                        authType:
                          type: string
                          enum:
                            - ssh-key
                        keyType:
                          type: string
                          enum:
                            - ed25519
                            - rsa
                          default: ed25519
                      required:
                        - authType
                      additionalProperties: false
                    - type: object
                      properties:
                        authType:
                          type: string
                          enum:
                            - token
                        username:
                          type: string
                          minLength: 1
                          description: Required for plain Git token authentication. For GitLab, the service ignores this field and uses n8n for Git transport.
                        password:
                          type: string
                          minLength: 1
                      required:
                        - authType
                        - password
                      additionalProperties: false
                  type: object
                config:
                  type: object
                  properties:
                    schemaVersion:
                      type: number
                      enum:
                        - 1
                    baseUrl:
                      type: string
                  required:
                    - schemaVersion
                    - baseUrl
                  additionalProperties: false
              required:
                - name
                - type
                - auth
              additionalProperties: false
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  provider:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                        maxLength: 36
                      name:
                        type: string
                      type:
                        type: string
                        enum:
                          - git
                          - gitlab
                      authType:
                        type: string
                        enum:
                          - ssh-key
                          - token
                      config:
                        anyOf:
                          - type: object
                            properties:
                              schemaVersion:
                                type: number
                                enum:
                                  - 1
                              publicKey:
                                type: string
                                minLength: 1
                              keyType:
                                type: string
                                enum:
                                  - ed25519
                                  - rsa
                            required:
                              - schemaVersion
                              - publicKey
                              - keyType
                            additionalProperties: false
                          - type: object
                            properties:
                              schemaVersion:
                                type: number
                                enum:
                                  - 1
                            required:
                              - schemaVersion
                            additionalProperties: false
                          - type: object
                            properties:
                              schemaVersion:
                                type: number
                                enum:
                                  - 1
                              baseUrl:
                                type: string
                            required:
                              - schemaVersion
                              - baseUrl
                            additionalProperties: false
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                    required:
                      - id
                      - name
                      - type
                      - authType
                      - config
                      - createdAt
                      - updatedAt
                  publicKey:
                    type: string
                    nullable: true
                required:
                  - provider
                  - publicKey
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    get:
      operationId: getPromotionProviders
      tags:
        - Promotions
      summary: List promotion providers
      description: Returns a cursor-paginated list of providers, without their public configuration.
      x-required-scope: promotions:list
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          maxLength: 36
                        name:
                          type: string
                        type:
                          type: string
                          enum:
                            - git
                            - gitlab
                        authType:
                          type: string
                          enum:
                            - ssh-key
                            - token
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - id
                        - name
                        - type
                        - authType
                        - createdAt
                        - updatedAt
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/providers/{promotionProviderId}:
    get:
      operationId: getPromotionProvider
      tags:
        - Promotions
      summary: Retrieve a promotion provider
      description: Returns the provider with its public configuration. Secrets are never returned.
      x-required-scope: promotions:read
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the promotion provider.
          name: promotionProviderId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotionProviderPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    put:
      operationId: updatePromotionProvider
      tags:
        - Promotions
      summary: Update a promotion provider
      description: Renames the provider, and replaces its credentials when `auth` is sent. A Git host provider can also update its base URL. A different API destination requires `auth` in the same request. Changed credentials and host settings are validated before they save. If another request changes the credentials or configuration before this update saves, the update returns 409. Reload the provider and try again. For GitLab, the service uses n8n as the Git transport username. Its auth.username is optional. The service ignores any supplied username. Plain Git token authentication requires auth.username. New credentials apply to every environment that uses this provider. The authentication method cannot change.
      x-required-scope: promotions:update
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the promotion provider.
          name: promotionProviderId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                auth:
                  oneOf:
                    - type: object
                      properties:
                        authType:
                          type: string
                          enum:
                            - ssh-key
                        keyType:
                          type: string
                          enum:
                            - ed25519
                            - rsa
                      required:
                        - authType
                      additionalProperties: false
                    - type: object
                      properties:
                        authType:
                          type: string
                          enum:
                            - token
                        username:
                          type: string
                          minLength: 1
                          description: Required for plain Git token authentication. For GitLab, the service ignores this field and uses n8n for Git transport.
                        password:
                          type: string
                          minLength: 1
                      required:
                        - authType
                        - password
                      additionalProperties: false
                  type: object
                config:
                  type: object
                  properties:
                    schemaVersion:
                      type: number
                      enum:
                        - 1
                    baseUrl:
                      type: string
                  required:
                    - schemaVersion
                    - baseUrl
                  additionalProperties: false
              additionalProperties: false
              minProperties: 1
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotionProviderPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    delete:
      operationId: deletePromotionProvider
      tags:
        - Promotions
      summary: Delete a promotion provider
      description: A provider used by an environment cannot be deleted.
      x-required-scope: promotions:delete
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the promotion provider.
          name: promotionProviderId
          in: path
      responses:
        '204':
          description: Operation successful.
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/providers/{promotionProviderId}/repositories:
    get:
      operationId: getPromotionProviderRepositories
      tags:
        - Promotions
      summary: List repositories of a promotion provider
      description: Lists repositories where the GitLab token identity has at least the Developer role. The token also needs Git write scope for promotions. Protected branches can restrict pushes. Use remoteUrl as an environment remote. Search matches names and namespaces in similarity order. Unfiltered results use ascending repository ID order. The limit is an upper bound. GitLab returns at most 100 items per page. Follow nextCursor even when a page has fewer items than the requested limit. A saved environment is not required. Invalid credentials return an error, not an empty list. If a response is too large, restart the list with a smaller limit and no cursor.
      x-required-scope: promotions:discover
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
          required: true
          description: The ID of the promotion provider.
          name: promotionProviderId
          in: path
        - schema:
            type: string
            maxLength: 255
          required: false
          name: search
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        fullPath:
                          type: string
                        remoteUrl:
                          type: string
                        defaultBranch:
                          type: string
                          nullable: true
                      required:
                        - id
                        - name
                        - fullPath
                        - remoteUrl
                        - defaultBranch
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/providers/{promotionProviderId}/repositories/{repositoryId}/branches:
    get:
      operationId: getPromotionProviderRepositoryBranches
      tags:
        - Promotions
      summary: List branches of a promotion repository
      description: Lists branches of the selected GitLab repository and identifies its default branch. Pass the URL-encoded fullPath from repository discovery, or the repositoryPath of a saved GitLab environment, as repositoryId. GitLab project IDs are also accepted, but environments do not store them. Supports branch search and cursor pagination. The limit is an upper bound. GitLab returns at most 100 items per page. Follow nextCursor even when a page has fewer items than the requested limit. A saved environment is not required. Invalid credentials and inaccessible repositories return errors, not empty lists. If a response is too large, restart the list with a smaller limit and no cursor.
      x-required-scope: promotions:discover
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
          required: true
          description: The ID of the promotion provider.
          name: promotionProviderId
          in: path
        - schema:
            type: string
            minLength: 1
            maxLength: 256
          required: true
          description: The URL-encoded fullPath of the repository. A GitLab project ID is also accepted.
          name: repositoryId
          in: path
        - schema:
            type: string
            maxLength: 255
          required: false
          name: search
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        isDefault:
                          type: boolean
                      required:
                        - name
                        - isDefault
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/environments:
    post:
      operationId: createPromotionEnvironment
      tags:
        - Promotions
      summary: Create a promotion environment
      description: Creates an environment for one direction on an existing provider. The settings must match the direction. A GitLab remote URL must belong to the saved provider. The environment stores only the repository path and derives remoteUrl from the current provider base URL. Plain Git environments keep the full remote URL. The instance can have one environment for each direction.
      x-required-scope: promotions:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                      maxLength: 128
                    scope:
                      type: string
                      enum:
                        - instance
                        - projects
                    providerId:
                      type: string
                      minLength: 1
                      maxLength: 36
                    remote:
                      type: object
                      properties:
                        schemaVersion:
                          type: number
                          enum:
                            - 1
                        remoteUrl:
                          type: string
                          minLength: 1
                      required:
                        - schemaVersion
                        - remoteUrl
                      additionalProperties: false
                    direction:
                      type: string
                      enum:
                        - apply
                    settings:
                      type: object
                      properties:
                        schemaVersion:
                          type: number
                          enum:
                            - 1
                        branchName:
                          type: string
                          minLength: 1
                          maxLength: 255
                      required:
                        - schemaVersion
                        - branchName
                      additionalProperties: false
                  required:
                    - name
                    - scope
                    - providerId
                    - remote
                    - direction
                    - settings
                  additionalProperties: false
                - type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                      maxLength: 128
                    scope:
                      type: string
                      enum:
                        - instance
                        - projects
                    providerId:
                      type: string
                      minLength: 1
                      maxLength: 36
                    remote:
                      type: object
                      properties:
                        schemaVersion:
                          type: number
                          enum:
                            - 1
                        remoteUrl:
                          type: string
                          minLength: 1
                      required:
                        - schemaVersion
                        - remoteUrl
                      additionalProperties: false
                    direction:
                      type: string
                      enum:
                        - promote
                    settings:
                      type: object
                      properties:
                        schemaVersion:
                          type: number
                          enum:
                            - 1
                        baseBranchName:
                          type: string
                          minLength: 1
                          maxLength: 255
                        createBranchOnPromotion:
                          type: boolean
                      required:
                        - schemaVersion
                        - baseBranchName
                        - createBranchOnPromotion
                      additionalProperties: false
                  required:
                    - name
                    - scope
                    - providerId
                    - remote
                    - direction
                    - settings
                  additionalProperties: false
              type: object
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotionEnvironmentPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    get:
      operationId: getPromotionEnvironments
      tags:
        - Promotions
      summary: List promotion environments
      description: Returns a cursor-paginated list of environments. Filter by `scope` and `direction` for the instance environments, or by `providerId` to see which environments a provider edit affects.
      x-required-scope: promotions:list
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
            enum:
              - instance
              - projects
          required: false
          name: scope
          in: query
        - schema:
            type: string
            enum:
              - apply
              - promote
          required: false
          name: direction
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 36
          required: false
          name: providerId
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            id:
                              type: string
                              minLength: 1
                              maxLength: 36
                            name:
                              type: string
                            scope:
                              type: string
                              enum:
                                - instance
                                - projects
                            remote:
                              type: object
                              properties:
                                schemaVersion:
                                  type: number
                                  enum:
                                    - 1
                                remoteUrl:
                                  type: string
                                  minLength: 1
                                repositoryPath:
                                  type: string
                                  description: The stored repository path of a Git host remote. URL-encode it before you use it as repositoryId to list branches. Requests do not accept it.
                              required:
                                - schemaVersion
                                - remoteUrl
                              additionalProperties: false
                            provider:
                              type: object
                              properties:
                                id:
                                  type: string
                                  minLength: 1
                                  maxLength: 36
                                name:
                                  type: string
                                type:
                                  type: string
                                  enum:
                                    - git
                                    - gitlab
                                authType:
                                  type: string
                                  enum:
                                    - ssh-key
                                    - token
                                createdAt:
                                  type: string
                                  format: date-time
                                updatedAt:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - name
                                - type
                                - authType
                                - createdAt
                                - updatedAt
                            createdAt:
                              type: string
                              format: date-time
                            updatedAt:
                              type: string
                              format: date-time
                            direction:
                              type: string
                              enum:
                                - apply
                            settings:
                              type: object
                              properties:
                                schemaVersion:
                                  type: number
                                  enum:
                                    - 1
                                branchName:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                              required:
                                - schemaVersion
                                - branchName
                              additionalProperties: false
                          required:
                            - id
                            - name
                            - scope
                            - remote
                            - provider
                            - createdAt
                            - updatedAt
                            - direction
                            - settings
                        - type: object
                          properties:
                            id:
                              type: string
                              minLength: 1
                              maxLength: 36
                            name:
                              type: string
                            scope:
                              type: string
                              enum:
                                - instance
                                - projects
                            remote:
                              type: object
                              properties:
                                schemaVersion:
                                  type: number
                                  enum:
                                    - 1
                                remoteUrl:
                                  type: string
                                  minLength: 1
                                repositoryPath:
                                  type: string
                                  description: The stored repository path of a Git host remote. URL-encode it before you use it as repositoryId to list branches. Requests do not accept it.
                              required:
                                - schemaVersion
                                - remoteUrl
                              additionalProperties: false
                            provider:
                              type: object
                              properties:
                                id:
                                  type: string
                                  minLength: 1
                                  maxLength: 36
                                name:
                                  type: string
                                type:
                                  type: string
                                  enum:
                                    - git
                                    - gitlab
                                authType:
                                  type: string
                                  enum:
                                    - ssh-key
                                    - token
                                createdAt:
                                  type: string
                                  format: date-time
                                updatedAt:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - name
                                - type
                                - authType
                                - createdAt
                                - updatedAt
                            createdAt:
                              type: string
                              format: date-time
                            updatedAt:
                              type: string
                              format: date-time
                            direction:
                              type: string
                              enum:
                                - promote
                            settings:
                              type: object
                              properties:
                                schemaVersion:
                                  type: number
                                  enum:
                                    - 1
                                baseBranchName:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                createBranchOnPromotion:
                                  type: boolean
                              required:
                                - schemaVersion
                                - baseBranchName
                                - createBranchOnPromotion
                              additionalProperties: false
                          required:
                            - id
                            - name
                            - scope
                            - remote
                            - provider
                            - createdAt
                            - updatedAt
                            - direction
                            - settings
                      type: object
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/environments/{promotionEnvironmentId}:
    get:
      operationId: getPromotionEnvironment
      tags:
        - Promotions
      summary: Retrieve a promotion environment
      description: Returns the environment with its provider summary and the state of its local checkout.
      x-required-scope: promotions:read
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          description: The ID of the promotion environment.
          name: promotionEnvironmentId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotionEnvironmentPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    put:
      operationId: updatePromotionEnvironment
      tags:
        - Promotions
      summary: Update a promotion environment
      description: Updates the name, provider, remote, or settings. A remote replaces the whole saved remote, and settings replace the whole saved settings. The settings must match the direction of the environment, so `createBranchOnPromotion` is always required for Promote. GitLab environments store a repository path and derive remoteUrl from the provider. Plain Git environments keep the full remote URL. A new provider type or repository closes the open promotion reviews of the environment in n8n. Their merge requests stay open on the Git host. If the provider changes during the update, the update returns 409. Reload the environment and try again. Direction and scope cannot change.
      x-required-scope: promotions:update
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          description: The ID of the promotion environment.
          name: promotionEnvironmentId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                providerId:
                  type: string
                  minLength: 1
                  maxLength: 36
                remote:
                  type: object
                  properties:
                    schemaVersion:
                      type: number
                      enum:
                        - 1
                    remoteUrl:
                      type: string
                      minLength: 1
                  required:
                    - schemaVersion
                    - remoteUrl
                  additionalProperties: false
                settings:
                  anyOf:
                    - type: object
                      properties:
                        schemaVersion:
                          type: number
                          enum:
                            - 1
                        branchName:
                          type: string
                          minLength: 1
                          maxLength: 255
                      required:
                        - schemaVersion
                        - branchName
                      additionalProperties: false
                    - type: object
                      properties:
                        schemaVersion:
                          type: number
                          enum:
                            - 1
                        baseBranchName:
                          type: string
                          minLength: 1
                          maxLength: 255
                        createBranchOnPromotion:
                          type: boolean
                      required:
                        - schemaVersion
                        - baseBranchName
                        - createBranchOnPromotion
                      additionalProperties: false
              additionalProperties: false
              minProperties: 1
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotionEnvironmentPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    delete:
      operationId: deletePromotionEnvironment
      tags:
        - Promotions
      summary: Delete a promotion environment
      description: Deletes the environment with its project links and local checkout. Its provider is kept. Nothing in the Git repository changes. The open promotion reviews of the environment close in n8n. Their merge requests stay open on the Git host.
      x-required-scope: promotions:delete
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          description: The ID of the promotion environment.
          name: promotionEnvironmentId
          in: path
      responses:
        '204':
          description: Operation successful.
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/environments/{promotionEnvironmentId}/connect:
    post:
      operationId: connectPromotionCheckout
      tags:
        - Promotions
      summary: Connect an environment
      description: Prepares the environment on the instance that handles the request. For a Git provider, this clones the configured branch into local storage. Safe to call repeatedly. Connecting one environment does not make another ready.
      x-required-scope: promotions:connect
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
            format: uuid
          required: true
          description: The ID of the promotion environment.
          name: promotionEnvironmentId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotionCheckoutPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/environments/{promotionEnvironmentId}/disconnect:
    post:
      operationId: disconnectPromotionCheckout
      tags:
        - Promotions
      summary: Remove an environment's local checkout
      description: Removes the local checkout and keeps the environment, its credentials, and the trusted SSH host keys.
      x-required-scope: promotions:connect
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          description: The ID of the promotion environment.
          name: promotionEnvironmentId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotionCheckoutPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/environments/{promotionEnvironmentId}/projects:
    get:
      operationId: getPromotionEnvironmentProjects
      tags:
        - Promotions
      summary: List projects linked to a promotion environment
      x-required-scope: promotions:read
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          description: The ID of the promotion environment.
          name: promotionEnvironmentId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  projectIds:
                    type: array
                    items:
                      type: string
                      minLength: 1
                      maxLength: 36
                required:
                  - projectIds
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/environments/{promotionEnvironmentId}/missing-projects:
    get:
      operationId: getPromotionEnvironmentMissingProjects
      tags:
        - Promotions
      summary: List package projects that are missing on this instance
      description: Reads the package at the Apply branch tip and returns its team projects whose IDs do not exist on this instance. Projects are matched by ID, not by name. An ID that a personal project uses counts as existing. Create each project with `POST /projects`, using the returned id, name, icon, description, and customTelemetryTags. The new project is empty, and the caller becomes its project admin. Then use the project Apply flow to apply its resources. An empty `data` means that no setup is needed. `git` is null when the branch has no package yet. Requires a connected Apply environment with instance scope.
      x-required-scope: promotions:read
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          description: The ID of the promotion environment.
          name: promotionEnvironmentId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  environmentId:
                    type: string
                    minLength: 1
                    maxLength: 36
                  git:
                    type: object
                    nullable: true
                    properties:
                      commitSha:
                        type: string
                      branchName:
                        type: string
                    required:
                      - commitSha
                      - branchName
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                        name:
                          type: string
                        icon:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - emoji
                                - icon
                            value:
                              type: string
                          required:
                            - type
                            - value
                        description:
                          type: string
                        customTelemetryTags:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                              value:
                                type: string
                            required:
                              - key
                              - value
                      required:
                        - id
                        - name
                required:
                  - environmentId
                  - git
                  - data
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/environments/{promotionEnvironmentId}/projects/{projectId}:
    post:
      operationId: addProjectToPromotionEnvironment
      tags:
        - Promotions
      summary: Link a project to a promotion environment
      description: Links a team project to a project-scoped environment. A project can have one environment for each direction. A direction without a project environment uses the instance environment.
      x-required-scope: promotions:manageProjects
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
            format: uuid
          required: true
          description: The ID of the promotion environment.
          name: promotionEnvironmentId
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  projectId:
                    type: string
                    minLength: 1
                    maxLength: 36
                  environmentId:
                    type: string
                    minLength: 1
                    maxLength: 36
                required:
                  - projectId
                  - environmentId
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    delete:
      operationId: removeProjectFromPromotionEnvironment
      tags:
        - Promotions
      summary: Unlink a project from a promotion environment
      x-required-scope: promotions:manageProjects
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          description: The ID of the promotion environment.
          name: promotionEnvironmentId
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      responses:
        '204':
          description: Operation successful.
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/environments/{promotionEnvironmentId}/promote:
    post:
      operationId: promotePackage
      tags:
        - Promotions
      summary: Promote all team projects
      description: Exports every team project, commits it, and pushes to the configured base branch or a new timestamped branch. The response reports the target branch in `git.branchName`. Personal projects are ignored. A workflow on the branch that moved to a personal project is refused with 400, because the destination would delete it. A workflow or folder on the branch that moved to another team project is refused with 400 while its old project still exists, because Apply can't move it between projects. Requires a connected Promote environment with instance scope. The API key also needs variable:list when the workflows reference variables.
      x-required-scope: promotions:promote
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
            format: uuid
          required: true
          description: The ID of the promotion environment.
          name: promotionEnvironmentId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                commitMessage:
                  type: string
                  minLength: 1
                  maxLength: 1000
                  description: Message for the promotion commit. If you omit it, the commit uses a generated message.
                force:
                  type: boolean
              additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotePackageResultDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/environments/{promotionEnvironmentId}/apply:
    post:
      operationId: applyPackage
      tags:
        - Promotions
      summary: Apply a package to the instance
      description: Checks the full package at the configured branch tip. Optionally send expectedSource with the environmentId, branchName, and full commitSha from the reviewed change preview; status `source-changed` means the branch moved since that review and nothing was imported. Returns status `blocked` before import writes if bindings need setup, if the import conflicts with this instance, or if the apply would delete team projects that the package does not hold. Retain environmentId and git for Continue. Status `applied` includes counts and warnings. Inspect status before reading counts. Existing target variable values, including empty strings, are preserved. Workflows and folders move within their project to match the branch, and folders take the name on the branch. Apply cannot move a workflow or folder between projects. It returns a `moved` conflict in `blocked` with both projects. For a personal project, the conflict gives only the ID. Requires a connected Apply environment with instance scope. The API key needs the promotions:apply scope. The importer checks user write permissions; granular API-key write scopes are not passed to it.
      x-required-scope: promotions:apply
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
            format: uuid
          required: true
          description: The ID of the promotion environment.
          name: promotionEnvironmentId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                expectedSource:
                  type: object
                  properties:
                    environmentId:
                      type: string
                      minLength: 1
                      maxLength: 36
                    branchName:
                      type: string
                      minLength: 1
                    commitSha:
                      type: string
                      pattern: ^[0-9a-f]{40}([0-9a-f]{24})?$
                  required:
                    - environmentId
                    - branchName
                    - commitSha
                  additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/applyPackageResultDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/environments/{promotionEnvironmentId}/apply/continue:
    post:
      operationId: continueApplyPackage
      tags:
        - Promotions
      summary: Continue Apply after binding setup
      description: 'Rechecks the configured source and current target bindings. Send expectedSource with the environmentId, branchName, and full commitSha from the reviewed Apply result. Send `confirmDestructiveChanges: true` to also apply destructive data table changes and delete the reported team projects. Status `source-changed` requires a new Apply review. Status `blocked` returns every blocker again, without import writes. Status `applied` includes counts and warnings. Inspect status before reading counts. Existing target variable values are preserved. Requires the same connected instance environment and permissions as Apply. The importer checks user write permissions; granular API-key write scopes are not passed to it. No server session or exactly-once guarantee is provided.'
      x-required-scope: promotions:apply
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
            format: uuid
          required: true
          description: The ID of the promotion environment.
          name: promotionEnvironmentId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                expectedSource:
                  type: object
                  properties:
                    environmentId:
                      type: string
                      minLength: 1
                      maxLength: 36
                    branchName:
                      type: string
                      minLength: 1
                    commitSha:
                      type: string
                      pattern: ^[0-9a-f]{40}([0-9a-f]{24})?$
                  required:
                    - environmentId
                    - branchName
                    - commitSha
                  additionalProperties: false
                confirmDestructiveChanges:
                  type: boolean
                  description: 'Also applies destructive data table changes, which a `destructive-change` conflict reports: removed or retyped columns. The values in those columns are removed. Rows and other columns are kept. On a full apply, also deletes the team projects that a `project-deletion` conflict reports, with everything in them. The confirmation covers every such change and deletion when Continue runs, including those that are not in the reviewed result.'
              required:
                - expectedSource
              additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/applyPackageResultDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/projects/{projectId}/changes/{direction}:
    get:
      operationId: getPromotionChanges
      tags:
        - Promotions
      summary: List the changes of a project in one direction
      description: Compares a team project on this instance with the branch of its promotion environment for that direction and lists the workflows that differ. For `promote` the rows are what a promotion sends to the branch, and the key needs the promotions:promote scope. A `deleted` or `new` promote row can be a workflow that moved between projects; promoting it is refused until it moves back. For `apply` the rows are what applying the branch changes on this instance, and the key needs the promotions:apply scope. `commitSha` is the commit the rows were read from. Requires the environment to be connected first.
      x-required-scope: promotions:promote,promotions:apply
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
        - schema:
            type: string
            enum:
              - apply
              - promote
          required: true
          description: 'The direction of the promotion: apply or promote.'
          name: direction
          in: path
        - schema:
            type: string
          required: false
          name: search
          in: query
        - schema:
            type: string
            enum:
              - name
              - updatedAt
              - status
            default: name
          required: false
          name: sort
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
          required: false
          name: order
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  commitSha:
                    type: string
                    nullable: true
                  source:
                    type: object
                    properties:
                      environmentId:
                        type: string
                        minLength: 1
                        maxLength: 36
                      branchName:
                        type: string
                    required:
                      - environmentId
                      - branchName
                  changes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          maxLength: 36
                        name:
                          type: string
                        type:
                          type: string
                          enum:
                            - workflow
                        status:
                          type: string
                          enum:
                            - new
                            - modified
                            - renamed
                            - renamed-and-modified
                            - archived
                            - deleted
                        version:
                          type: integer
                          nullable: true
                          minimum: 0
                        updatedAt:
                          type: string
                          nullable: true
                        updatedBy:
                          type: string
                          nullable: true
                        dependencyCount:
                          type: integer
                          minimum: 0
                      required:
                        - id
                        - name
                        - type
                        - status
                        - version
                        - updatedAt
                        - updatedBy
                        - dependencyCount
                required:
                  - commitSha
                  - source
                  - changes
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/projects/{projectId}/promote:
    post:
      operationId: promoteProjectSelection
      tags:
        - Promotions
      summary: Promote a selection of a project's workflows
      description: Promotes a chosen set of a team project's workflows to the branch of the project's Promote environment. Send workflow ids only; the server reads each one now, so the push carries the current state. Live and archived workflows the project owns are exported, so an archived id stays on the branch as archived; an id whose workflow is gone from the instance leaves the branch, matching the project's change list. A workflow that moved into or out of the project since the branch was written is refused with 400; move it back first. A deletion the branch does not hold under this project rejects the whole request before any write. Requires a Promote environment to resolve for the project (its own Promote environment, otherwise the instance Promote environment), and requires it to be connected first. The API key also needs variable:list when the workflows reference variables.
      x-required-scope: promotions:promote
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                workflowIds:
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 36
                  minItems: 1
                commitMessage:
                  type: string
                  minLength: 1
                  maxLength: 1000
                  description: Message for the promotion commit. If you omit it, the commit uses a generated message.
              required:
                - workflowIds
              additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotePackageResultDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/projects/{projectId}/apply:
    post:
      operationId: applyProjectSelection
      tags:
        - Promotions
      summary: Apply a selection of a project's workflows
      description: "Applies selected workflow changes from the project's Apply branch. Send the selected change-list IDs in workflowIds. The server imports IDs present on the branch for this project. It removes instance workflows owned by this project when their IDs are absent from the branch. Duplicate or invalid IDs reject the whole request. Unselected content stays unchanged. A selected workflow moves within the project to match the branch, together with the folders that hold it, and those folders take the name on the branch; other folders stay as they are. Optionally send expectedSource with the environmentId, branchName, and full commitSha from the reviewed change preview. Status `source-changed` means the source changed since that review and nothing was imported. Optionally send expectedPreviewRevision with the revision of the reviewed Apply preview. Status `preview-changed` means this instance changed since that review and nothing was imported. Status `blocked` returns the blockers before import writes: bindings that need setup and conflicts with this instance. Apply cannot move a selected workflow or a folder of this project between projects. It returns a `moved` conflict in `blocked` with both projects. For a personal project, the conflict gives only the ID. Retain environmentId and git for Continue. Status `applied` includes counts and warnings. Inspect status before reading counts. Requires a connected Apply environment for the project: its own Apply environment, otherwise the instance Apply environment. The API key needs the promotions:apply scope. The importer checks user write permissions."
      x-required-scope: promotions:apply
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                workflowIds:
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 36
                  minItems: 1
                expectedSource:
                  type: object
                  properties:
                    environmentId:
                      type: string
                      minLength: 1
                      maxLength: 36
                    branchName:
                      type: string
                      minLength: 1
                    commitSha:
                      type: string
                      pattern: ^[0-9a-f]{40}([0-9a-f]{24})?$
                  required:
                    - environmentId
                    - branchName
                    - commitSha
                  additionalProperties: false
                expectedPreviewRevision:
                  type: string
                  pattern: ^[0-9a-f]{64}$
                  description: The `revision` of the reviewed Apply preview. Apply builds the preview again and returns status `preview-changed` without writing when it differs, for example after a local edit.
              required:
                - workflowIds
              additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/applyPackageResultDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /promotions/projects/{projectId}/apply/continue:
    post:
      operationId: continueApplyProjectSelection
      tags:
        - Promotions
      summary: Continue applying a selection after binding setup
      description: "Rechecks the project's Apply source and the current bindings for the selection. Resend the full selection in workflowIds. Send the required expectedSource with the environmentId, branchName, and full commitSha from the reviewed Apply result. Optionally send expectedPreviewRevision with the revision of the reviewed Apply preview. Send `confirmDestructiveChanges: true` to also apply destructive data table changes. The server does not keep a session. Status `source-changed` or `preview-changed` requires a new Apply review. Status `blocked` returns every blocker again, before import writes. Status `applied` includes counts and warnings. Inspect status before reading counts. Unselected content stays unchanged. Requires the same connected Apply environment and permissions as the initial selection apply. The API key needs the promotions:apply scope. The importer checks user write permissions."
      x-required-scope: promotions:apply
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
          required: true
          description: The ID of the project.
          name: projectId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                workflowIds:
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 36
                  minItems: 1
                expectedSource:
                  type: object
                  properties:
                    environmentId:
                      type: string
                      minLength: 1
                      maxLength: 36
                    branchName:
                      type: string
                      minLength: 1
                    commitSha:
                      type: string
                      pattern: ^[0-9a-f]{40}([0-9a-f]{24})?$
                  required:
                    - environmentId
                    - branchName
                    - commitSha
                  additionalProperties: false
                expectedPreviewRevision:
                  type: string
                  pattern: ^[0-9a-f]{64}$
                  description: The `revision` of the reviewed Apply preview. Apply builds the preview again and returns status `preview-changed` without writing when it differs, for example after a local edit.
                confirmDestructiveChanges:
                  type: boolean
                  description: 'Also applies destructive data table changes, which a `destructive-change` conflict reports: removed or retyped columns. The values in those columns are removed. Rows and other columns are kept. On a full apply, also deletes the team projects that a `project-deletion` conflict reports, with everything in them. The confirmation covers every such change and deletion when Continue runs, including those that are not in the reviewed result.'
              required:
                - workflowIds
                - expectedSource
              additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/applyPackageResultDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /settings/rate-limits:
    get:
      operationId: getRateLimitSettings
      tags:
        - SettingsRateLimits
      summary: Retrieve the Public API rate-limit settings
      description: Retrieve the Public API rate-limit settings. `envManagedFields` lists the fields that are set by environment variables and can't be changed through the API. Requires the `securitySettings:manage` scope. Requests to this route count against the rate limits.
      x-required-scope: securitySettings:manage
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rateLimitSettingsPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    put:
      operationId: updateRateLimitSettings
      tags:
        - SettingsRateLimits
      summary: Set the Public API rate-limit settings
      description: "Set the Public API rate-limit settings. You can send a GET response back as the body, and `envManagedFields` is ignored. When rate limiting is enabled, at least one limit must be greater than `0`. Fields set by environment variables can't be changed: a different value is rejected with 409, but sending the current value is accepted. Requires the `securitySettings:manage` scope. Requests to this route count against the rate limits."
      x-required-scope: securitySettings:manage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
                  description: Whether Public API rate limiting is enabled.
                globalReadLimit:
                  type: integer
                  minimum: 0
                  description: Read requests allowed for one API key across all endpoints. Set 0 for no limit.
                globalReadWindowSeconds:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: The window for the global read limit, in seconds.
                globalWriteLimit:
                  type: integer
                  minimum: 0
                  description: Write requests allowed for one API key across all endpoints. Set 0 for no limit.
                globalWriteWindowSeconds:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: The window for the global write limit, in seconds.
                endpointReadLimit:
                  type: integer
                  minimum: 0
                  description: Read requests allowed for one API key on one endpoint. Set 0 for no limit.
                endpointReadWindowSeconds:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: The window for the endpoint read limit, in seconds.
                endpointWriteLimit:
                  type: integer
                  minimum: 0
                  description: Write requests allowed for one API key on one endpoint. Set 0 for no limit.
                endpointWriteWindowSeconds:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: The window for the endpoint write limit, in seconds.
                envManagedFields:
                  type: array
                  items:
                    type: string
                    enum:
                      - enabled
                      - globalReadLimit
                      - globalReadWindowSeconds
                      - globalWriteLimit
                      - globalWriteWindowSeconds
                      - endpointReadLimit
                      - endpointReadWindowSeconds
                      - endpointWriteLimit
                      - endpointWriteWindowSeconds
                  description: Fields controlled by environment variables, including _FILE variables. These fields return their effective values. A PUT can repeat these values but cannot change them.
                  readOnly: true
              required:
                - enabled
                - globalReadLimit
                - globalReadWindowSeconds
                - globalWriteLimit
                - globalWriteWindowSeconds
                - endpointReadLimit
                - endpointReadWindowSeconds
                - endpointWriteLimit
                - endpointWriteWindowSeconds
              additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rateLimitSettingsPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /role-mapping-rules:
    get:
      operationId: getRoleMappingRules
      tags:
        - RoleMappingRule
      summary: Retrieve role-mapping rules
      description: Returns the configured role-mapping rules. `order` is the rule's evaluation position within its own `type`, so instance and project rules each have their own sequence starting at 0 — filter by `type` to retrieve a single evaluation order.
      x-required-scope: roleMappingRule:list
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
            enum:
              - instance
              - project
          required: false
          name: type
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        expression:
                          type: string
                        role:
                          type: string
                        type:
                          type: string
                          enum:
                            - instance
                            - project
                        order:
                          type: integer
                        projectIds:
                          type: array
                          items:
                            type: string
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - id
                        - expression
                        - role
                        - type
                        - order
                        - projectIds
                        - createdAt
                        - updatedAt
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createRoleMappingRule
      tags:
        - RoleMappingRule
      summary: Create a role-mapping rule
      description: Creates a rule that maps an identity-provider claim expression to a role. Set `type` to `instance` for a rule granting a global role, or `project` for a rule granting a project role on the projects named in `projectIds`. Omitting `order` appends the rule to the end of the evaluation order for its type.
      x-required-scope: roleMappingRule:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                expression:
                  type: string
                  minLength: 1
                role:
                  type: string
                  minLength: 1
                  maxLength: 128
                type:
                  type: string
                  enum:
                    - instance
                    - project
                order:
                  type: integer
                  minimum: 0
                projectIds:
                  type: array
                  items:
                    type: string
              required:
                - expression
                - role
                - type
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/roleMappingRulePublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /role-mapping-rules/{roleMappingRuleId}/move:
    post:
      operationId: moveRoleMappingRule
      tags:
        - RoleMappingRule
      summary: Move a role-mapping rule
      description: Changes a rule's position in the evaluation order for its type. `targetIndex` is the desired 0-based position within the rule's own `type` sequence; a value beyond the last position moves the rule to the end.
      x-required-scope: roleMappingRule:update
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
        - schema:
            type: string
          required: true
          description: The ID of the role mapping rule.
          name: roleMappingRuleId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                targetIndex:
                  type: integer
                  minimum: 0
              required:
                - targetIndex
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/roleMappingRulePublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /role-mapping-rules/{roleMappingRuleId}:
    patch:
      operationId: updateRoleMappingRule
      tags:
        - RoleMappingRule
      summary: Update a role-mapping rule
      description: Updates a rule's claim expression, role, and/or project assignments. A rule's type cannot be changed once created, so `type` isn't accepted here, and reordering is handled by the move endpoint.
      x-required-scope: roleMappingRule:update
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the role mapping rule.
          name: roleMappingRuleId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                expression:
                  type: string
                  minLength: 1
                role:
                  type: string
                  minLength: 1
                  maxLength: 128
                projectIds:
                  type: array
                  items:
                    type: string
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/roleMappingRulePublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteRoleMappingRule
      tags:
        - RoleMappingRule
      summary: Delete a role-mapping rule
      description: Deletes a role-mapping rule. The remaining rules of the same type close the gap, so their `order` values stay a contiguous sequence starting at 0.
      x-required-scope: roleMappingRule:delete
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the role mapping rule.
          name: roleMappingRuleId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/roleMappingRulePublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /roles:
    get:
      operationId: getAllRoles
      tags:
        - Role
      summary: Retrieve all roles
      description: Returns all roles grouped by type (global and project). Set `withUsageCount` to include how many users and projects use each role.
      x-required-scope: role:list
      parameters:
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          required: false
          name: withUsageCount
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  global:
                    type: array
                    items:
                      type: object
                      properties:
                        slug:
                          type: string
                        displayName:
                          type: string
                        description:
                          type: string
                          nullable: true
                        systemRole:
                          type: boolean
                        roleType:
                          type: string
                          enum:
                            - global
                        scopes:
                          type: array
                          items:
                            type: string
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                        licensed:
                          type: boolean
                        usedByUsers:
                          type: number
                        usedByProjects:
                          type: number
                      required:
                        - slug
                        - displayName
                        - description
                        - systemRole
                        - roleType
                        - scopes
                        - createdAt
                        - updatedAt
                        - licensed
                  project:
                    type: array
                    items:
                      type: object
                      properties:
                        slug:
                          type: string
                        displayName:
                          type: string
                        description:
                          type: string
                          nullable: true
                        systemRole:
                          type: boolean
                        roleType:
                          type: string
                          enum:
                            - project
                        scopes:
                          type: array
                          items:
                            type: string
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                        licensed:
                          type: boolean
                        usedByUsers:
                          type: number
                        usedByProjects:
                          type: number
                      required:
                        - slug
                        - displayName
                        - description
                        - systemRole
                        - roleType
                        - scopes
                        - createdAt
                        - updatedAt
                        - licensed
                required:
                  - global
                  - project
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createRole
      tags:
        - Role
      summary: Create a custom role
      description: Creates a custom role. Set `roleType` to `global` for an instance-wide role or `project` for a project role.
      x-required-scope: role:manage,role:manageProject
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                displayName:
                  type: string
                  minLength: 2
                  maxLength: 100
                description:
                  type: string
                  maxLength: 500
                roleType:
                  type: string
                  enum:
                    - project
                    - global
                scopes:
                  type: array
                  items:
                    type: string
              required:
                - displayName
                - roleType
                - scopes
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rolePublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /roles/{roleSlug}:
    get:
      operationId: getRole
      tags:
        - Role
      summary: Retrieve a role
      description: Returns a single role with its scopes. Set `withUsageCount` to include how many users and projects use the role.
      x-required-scope: role:read
      parameters:
        - schema:
            type: string
          required: true
          description: The slug of the role.
          name: roleSlug
          in: path
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          required: false
          name: withUsageCount
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  slug:
                    type: string
                  displayName:
                    type: string
                  description:
                    type: string
                    nullable: true
                  systemRole:
                    type: boolean
                  roleType:
                    type: string
                    enum:
                      - project
                      - global
                  scopes:
                    type: array
                    items:
                      type: string
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  licensed:
                    type: boolean
                  usedByUsers:
                    type: number
                  usedByProjects:
                    type: number
                required:
                  - slug
                  - displayName
                  - description
                  - systemRole
                  - roleType
                  - scopes
                  - createdAt
                  - updatedAt
                  - licensed
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    put:
      operationId: updateRole
      tags:
        - Role
      summary: Update a custom role
      description: Replaces a custom role's display name, description, and scopes. System roles cannot be updated.
      x-required-scope: role:manage,role:manageProject
      parameters:
        - schema:
            type: string
          required: true
          description: The slug of the role.
          name: roleSlug
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                displayName:
                  type: string
                  minLength: 2
                  maxLength: 100
                description:
                  type: string
                  nullable: true
                  maxLength: 500
                scopes:
                  type: array
                  items:
                    type: string
              required:
                - displayName
                - description
                - scopes
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rolePublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteRole
      tags:
        - Role
      summary: Delete a custom role
      description: Deletes a custom role. System roles cannot be deleted. A role with users assigned cannot be deleted unless `reassignRoleSlug` is set to move those users to another role first.
      x-required-scope: role:manage,role:manageProject
      parameters:
        - schema:
            type: string
          required: true
          description: The slug of the role.
          name: roleSlug
          in: path
        - schema:
            anyOf:
              - type: string
                enum:
                  - global:admin
                  - global:member
                  - global:chatUser
              - type: string
                minLength: 1
          required: false
          name: reassignRoleSlug
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rolePublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /settings/security-policy:
    get:
      operationId: getSecurityPolicy
      tags:
        - SecurityPolicy
      summary: Retrieve the security policy
      description: 'Retrieve the instance security policy: personal-space publishing and sharing, the execution-data redaction enforcement floor, and the read-only usage counts shown in the UI. Requires the `securitySettings:manage` scope and the Personal Space Policy feature to be licensed.'
      x-required-scope: securitySettings:manage
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/securityPolicyPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    put:
      operationId: updateSecurityPolicy
      tags:
        - SecurityPolicy
      summary: Set the security policy
      description: Replace the instance security policy with the provided full object. Every writable field must be sent. Read-only usage counts from GET are ignored if included, so a GET response can be sent back as a PUT body. The update takes effect exactly as it would from the UI, using the same validation. Requires the `securitySettings:manage` scope and the Personal Space Policy feature to be licensed. When the group is managed via environment variables, the write is rejected with 409 and no changes are made; a read still returns the current values.
      x-required-scope: securitySettings:manage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                personalSpacePublishing:
                  type: boolean
                  description: Whether members may publish workflows and agents from their personal space.
                  example: false
                personalSpaceSharing:
                  type: boolean
                  description: Whether members may share workflows and credentials from their personal space.
                  example: false
                redactionEnforcement:
                  type: object
                  properties:
                    floor:
                      type: string
                      enum:
                        - off
                        - production
                        - all
                      description: Minimum execution-data redaction level enforced across the instance.
                      example: production
                  required:
                    - floor
                  additionalProperties: false
                publishedPersonalWorkflowsCount:
                  type: integer
                  description: Read-only usage count returned by GET. Ignored on write so a GET response can be sent back as a PUT body.
                sharedPersonalWorkflowsCount:
                  type: integer
                  description: Read-only usage count returned by GET. Ignored on write so a GET response can be sent back as a PUT body.
                sharedPersonalCredentialsCount:
                  type: integer
                  description: Read-only usage count returned by GET. Ignored on write so a GET response can be sent back as a PUT body.
              required:
                - personalSpacePublishing
                - personalSpaceSharing
                - redactionEnforcement
              additionalProperties: false
              description: Full security policy. All writable fields must be provided; partial updates are not supported.
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/securityPolicyPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /settings/sso/oidc:
    get:
      operationId: getOidcConfiguration
      tags:
        - SettingsSsoOidc
      summary: Retrieve the OIDC SSO configuration
      description: Retrieve the current OIDC SSO configuration, including every field exposed in the UI. The client secret is redacted on read and is never echoed back in plaintext. Requires the `oidc:manage` scope and the OIDC feature to be licensed.
      x-required-scope: oidc:manage
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/oidcConfigurationPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    put:
      operationId: setOidcConfiguration
      tags:
        - SettingsSsoOidc
      summary: Set the OIDC SSO configuration
      description: Set the OIDC SSO configuration. The update takes effect exactly as it would from the UI, using the same validation. `clientId`, `clientSecret` and `discoveryEndpoint` are required; submit the redacted client secret sentinel to keep the stored secret unchanged. Requires the `oidc:manage` scope and the OIDC feature to be licensed. The client secret is redacted in the response. When the configuration is managed declaratively (via environment variables), the write is rejected with 409 and no changes are made.
      x-required-scope: oidc:manage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                clientId:
                  type: string
                  minLength: 1
                  description: The client ID issued when registering n8n with the OIDC provider.
                  example: n8n-client
                clientSecret:
                  type: string
                  minLength: 1
                  description: The client secret issued when registering n8n with the OIDC provider. Submit the redacted sentinel value returned on read to keep the stored secret unchanged.
                  example: my-client-secret
                discoveryEndpoint:
                  type: string
                  format: uri
                  description: The OIDC provider's well-known discovery endpoint.
                  example: https://accounts.google.com/.well-known/openid-configuration
                loginEnabled:
                  type: boolean
                  description: Whether OIDC single sign-on is enabled.
                  example: false
                prompt:
                  type: string
                  enum:
                    - none
                    - login
                    - consent
                    - select_account
                    - create
                  description: The prompt parameter to use when authenticating.
                  example: select_account
                authenticationContextClassReference:
                  type: array
                  items:
                    type: string
                  description: ACR values to include in the authorization request (acr_values parameter), in order of preference. Use an empty array when unused.
                  example:
                    - mfa
                    - pwd
                additionalScopes:
                  type: string
                  description: Additional scopes to request, space separated. n8n always requests `openid`, `profile` and `email`. Use an empty string when unused.
                  example: groups roles
                emailVerifiedRequired:
                  type: boolean
                  description: Whether the identity provider must assert that the user's email address is verified before the login is accepted. When disabled, only an explicit negative assertion is rejected.
                  example: false
                rpInitiatedLogoutEnabled:
                  type: boolean
                  description: Whether signing out of n8n also ends the session at the OIDC provider via RP-Initiated Logout. When disabled, sign-out is local to n8n only.
                  example: false
              required:
                - clientId
                - clientSecret
                - discoveryEndpoint
                - loginEnabled
                - prompt
                - authenticationContextClassReference
                - additionalScopes
                - emailVerifiedRequired
                - rpInitiatedLogoutEnabled
              additionalProperties: false
              description: 'Full OIDC SSO configuration to set. This is a full replacement: every writable field must be provided. Partial updates are rejected. Submit the redacted secret sentinel for `clientSecret` to keep the stored secret unchanged.'
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/oidcConfigurationPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /source-control/status:
    get:
      operationId: getSourceControlStatus
      tags:
        - SourceControl
      summary: Preview pending source control changes
      description: Previews the pending changes between the instance and the connected Git branch in either the `push` or `pull` direction.
      x-required-scope: sourceControl:read
      parameters:
        - schema:
            type: string
            enum:
              - push
              - pull
          required: true
          name: direction
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        file:
                          type: string
                        id:
                          type: string
                        name:
                          type: string
                        type:
                          type: string
                          enum:
                            - credential
                            - workflow
                            - tags
                            - variables
                            - file
                            - folders
                            - project
                            - datatable
                        status:
                          type: string
                          enum:
                            - new
                            - modified
                            - deleted
                            - created
                            - renamed
                            - conflicted
                            - ignored
                            - staged
                            - unknown
                        location:
                          type: string
                          enum:
                            - local
                            - remote
                        conflict:
                          type: boolean
                        updatedAt:
                          type: string
                        pushed:
                          type: boolean
                        isLocalPublished:
                          type: boolean
                        isRemoteArchived:
                          type: boolean
                        parentFolderId:
                          type: string
                          nullable: true
                        folderPath:
                          type: array
                          items:
                            type: string
                        remoteFolderPath:
                          type: array
                          items:
                            type: string
                        owner:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - personal
                                - team
                            projectId:
                              type: string
                            projectName:
                              type: string
                          required:
                            - type
                            - projectId
                            - projectName
                        publishingError:
                          type: string
                        publishingErrorDetails:
                          type: object
                          properties:
                            reason:
                              type: string
                              enum:
                                - review_pending
                                - changes_requested
                                - insufficient_api_key_scope
                                - insufficient_permissions
                            workflowReviewRequestId:
                              type: string
                              minLength: 1
                            versionId:
                              type: string
                              minLength: 1
                          required:
                            - reason
                          additionalProperties: false
                        contentImportPolicy:
                          type: object
                          properties:
                            violations:
                              type: array
                              items:
                                type: object
                                properties:
                                  kind:
                                    type: string
                                  checkId:
                                    type: string
                                  message:
                                    type: string
                                  subject:
                                    type: string
                                  subjectType:
                                    type: string
                                  scope:
                                    type: string
                                  matchedRuleId:
                                    type: string
                                  projectId:
                                    type: string
                                  optInAvailable:
                                    type: boolean
                                required:
                                  - kind
                                  - checkId
                                  - message
                            checkErrors:
                              type: array
                              items:
                                type: object
                                properties:
                                  checkId:
                                    type: string
                                  correlationId:
                                    type: string
                                required:
                                  - checkId
                                  - correlationId
                          required:
                            - violations
                            - checkErrors
                      required:
                        - file
                        - id
                        - name
                        - type
                        - status
                        - location
                        - conflict
                        - updatedAt
                required:
                  - data
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /source-control/push:
    post:
      operationId: pushSourceControl
      tags:
        - SourceControl
      summary: Push local source control changes
      description: Commits and pushes the selected files to the connected Git branch. Each entry in `fileNames` is resolved against a fresh preview of the pending changes.
      x-required-scope: sourceControl:push
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                commitMessage:
                  type: string
                  minLength: 1
                  maxLength: 1000
                fileNames:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      type:
                        type: string
                        enum:
                          - credential
                          - workflow
                          - tags
                          - variables
                          - file
                          - folders
                          - project
                          - datatable
                    required:
                      - id
                      - type
                  minItems: 1
                force:
                  type: boolean
              required:
                - commitMessage
                - fileNames
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        file:
                          type: string
                        id:
                          type: string
                        name:
                          type: string
                        type:
                          type: string
                          enum:
                            - credential
                            - workflow
                            - tags
                            - variables
                            - file
                            - folders
                            - project
                            - datatable
                        status:
                          type: string
                          enum:
                            - new
                            - modified
                            - deleted
                            - created
                            - renamed
                            - conflicted
                            - ignored
                            - staged
                            - unknown
                        location:
                          type: string
                          enum:
                            - local
                            - remote
                        conflict:
                          type: boolean
                        updatedAt:
                          type: string
                        pushed:
                          type: boolean
                        isLocalPublished:
                          type: boolean
                        isRemoteArchived:
                          type: boolean
                        parentFolderId:
                          type: string
                          nullable: true
                        folderPath:
                          type: array
                          items:
                            type: string
                        remoteFolderPath:
                          type: array
                          items:
                            type: string
                        owner:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - personal
                                - team
                            projectId:
                              type: string
                            projectName:
                              type: string
                          required:
                            - type
                            - projectId
                            - projectName
                        publishingError:
                          type: string
                        publishingErrorDetails:
                          type: object
                          properties:
                            reason:
                              type: string
                              enum:
                                - review_pending
                                - changes_requested
                                - insufficient_api_key_scope
                                - insufficient_permissions
                            workflowReviewRequestId:
                              type: string
                              minLength: 1
                            versionId:
                              type: string
                              minLength: 1
                          required:
                            - reason
                          additionalProperties: false
                        contentImportPolicy:
                          type: object
                          properties:
                            violations:
                              type: array
                              items:
                                type: object
                                properties:
                                  kind:
                                    type: string
                                  checkId:
                                    type: string
                                  message:
                                    type: string
                                  subject:
                                    type: string
                                  subjectType:
                                    type: string
                                  scope:
                                    type: string
                                  matchedRuleId:
                                    type: string
                                  projectId:
                                    type: string
                                  optInAvailable:
                                    type: boolean
                                required:
                                  - kind
                                  - checkId
                                  - message
                            checkErrors:
                              type: array
                              items:
                                type: object
                                properties:
                                  checkId:
                                    type: string
                                  correlationId:
                                    type: string
                                required:
                                  - checkId
                                  - correlationId
                          required:
                            - violations
                            - checkErrors
                      required:
                        - file
                        - id
                        - name
                        - type
                        - status
                        - location
                        - conflict
                        - updatedAt
                required:
                  - data
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          description: 'The push includes files with unresolved conflicts. Retry with `force: true` to push anyway.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  conflicts:
                    type: array
                    items:
                      type: object
                      properties:
                        file:
                          type: string
                        id:
                          type: string
                        name:
                          type: string
                        type:
                          type: string
                          enum:
                            - credential
                            - workflow
                            - tags
                            - variables
                            - file
                            - folders
                            - project
                            - datatable
                        status:
                          type: string
                          enum:
                            - new
                            - modified
                            - deleted
                            - created
                            - renamed
                            - conflicted
                            - ignored
                            - staged
                            - unknown
                        location:
                          type: string
                          enum:
                            - local
                            - remote
                        conflict:
                          type: boolean
                        updatedAt:
                          type: string
                        pushed:
                          type: boolean
                        isLocalPublished:
                          type: boolean
                        isRemoteArchived:
                          type: boolean
                        parentFolderId:
                          type: string
                          nullable: true
                        folderPath:
                          type: array
                          items:
                            type: string
                        remoteFolderPath:
                          type: array
                          items:
                            type: string
                        owner:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - personal
                                - team
                            projectId:
                              type: string
                            projectName:
                              type: string
                          required:
                            - type
                            - projectId
                            - projectName
                        publishingError:
                          type: string
                        publishingErrorDetails:
                          type: object
                          properties:
                            reason:
                              type: string
                              enum:
                                - review_pending
                                - changes_requested
                                - insufficient_api_key_scope
                                - insufficient_permissions
                            workflowReviewRequestId:
                              type: string
                              minLength: 1
                            versionId:
                              type: string
                              minLength: 1
                          required:
                            - reason
                          additionalProperties: false
                        contentImportPolicy:
                          type: object
                          properties:
                            violations:
                              type: array
                              items:
                                type: object
                                properties:
                                  kind:
                                    type: string
                                  checkId:
                                    type: string
                                  message:
                                    type: string
                                  subject:
                                    type: string
                                  subjectType:
                                    type: string
                                  scope:
                                    type: string
                                  matchedRuleId:
                                    type: string
                                  projectId:
                                    type: string
                                  optInAvailable:
                                    type: boolean
                                required:
                                  - kind
                                  - checkId
                                  - message
                            checkErrors:
                              type: array
                              items:
                                type: object
                                properties:
                                  checkId:
                                    type: string
                                  correlationId:
                                    type: string
                                required:
                                  - checkId
                                  - correlationId
                          required:
                            - violations
                            - checkErrors
                      required:
                        - file
                        - id
                        - name
                        - type
                        - status
                        - location
                        - conflict
                        - updatedAt
                required:
                  - message
                  - conflicts
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /source-control/pull:
    post:
      operationId: pullSourceControl
      tags:
        - SourceControl
      summary: Pull changes from the remote repository
      description: Fetches changes from the connected Git branch into the instance.
      x-required-scope: sourceControl:pull
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                force:
                  type: boolean
                  description: Discard local changes and force the pull to complete.
                autoPublish:
                  type: string
                  enum:
                    - none
                    - all
                    - published
                  default: none
                  description: |-
                    Controls automatic workflow publishing after import:
                    - `none`: Keep workflows in their local published state (default)
                    - `all`: Publish all imported workflows
                    - `published`: Publish only workflows that were published locally before import
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    file:
                      type: string
                    id:
                      type: string
                    name:
                      type: string
                    type:
                      type: string
                      enum:
                        - credential
                        - workflow
                        - tags
                        - variables
                        - file
                        - folders
                        - project
                        - datatable
                    status:
                      type: string
                      enum:
                        - new
                        - modified
                        - deleted
                        - created
                        - renamed
                        - conflicted
                        - ignored
                        - staged
                        - unknown
                    location:
                      type: string
                      enum:
                        - local
                        - remote
                    conflict:
                      type: boolean
                    updatedAt:
                      type: string
                    pushed:
                      type: boolean
                    isLocalPublished:
                      type: boolean
                    isRemoteArchived:
                      type: boolean
                    parentFolderId:
                      type: string
                      nullable: true
                    folderPath:
                      type: array
                      items:
                        type: string
                    remoteFolderPath:
                      type: array
                      items:
                        type: string
                    owner:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - personal
                            - team
                        projectId:
                          type: string
                        projectName:
                          type: string
                      required:
                        - type
                        - projectId
                        - projectName
                    publishingError:
                      type: string
                    publishingErrorDetails:
                      type: object
                      properties:
                        reason:
                          type: string
                          enum:
                            - review_pending
                            - changes_requested
                            - insufficient_api_key_scope
                            - insufficient_permissions
                        workflowReviewRequestId:
                          type: string
                          minLength: 1
                        versionId:
                          type: string
                          minLength: 1
                      required:
                        - reason
                      additionalProperties: false
                    contentImportPolicy:
                      type: object
                      properties:
                        violations:
                          type: array
                          items:
                            type: object
                            properties:
                              kind:
                                type: string
                              checkId:
                                type: string
                              message:
                                type: string
                              subject:
                                type: string
                              subjectType:
                                type: string
                              scope:
                                type: string
                              matchedRuleId:
                                type: string
                              projectId:
                                type: string
                              optInAvailable:
                                type: boolean
                            required:
                              - kind
                              - checkId
                              - message
                        checkErrors:
                          type: array
                          items:
                            type: object
                            properties:
                              checkId:
                                type: string
                              correlationId:
                                type: string
                            required:
                              - checkId
                              - correlationId
                      required:
                        - violations
                        - checkErrors
                  required:
                    - file
                    - id
                    - name
                    - type
                    - status
                    - location
                    - conflict
                    - updatedAt
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          description: 'Conflict due to uncommitted local changes or merge conflicts. The response body lists every file in the pull diff; files causing the conflict have `conflict: true` or `status: modified`. Retry with `force: true` to discard local changes.'
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    file:
                      type: string
                    id:
                      type: string
                    name:
                      type: string
                    type:
                      type: string
                      enum:
                        - credential
                        - workflow
                        - tags
                        - variables
                        - file
                        - folders
                        - project
                        - datatable
                    status:
                      type: string
                      enum:
                        - new
                        - modified
                        - deleted
                        - created
                        - renamed
                        - conflicted
                        - ignored
                        - staged
                        - unknown
                    location:
                      type: string
                      enum:
                        - local
                        - remote
                    conflict:
                      type: boolean
                    updatedAt:
                      type: string
                    pushed:
                      type: boolean
                    isLocalPublished:
                      type: boolean
                    isRemoteArchived:
                      type: boolean
                    parentFolderId:
                      type: string
                      nullable: true
                    folderPath:
                      type: array
                      items:
                        type: string
                    remoteFolderPath:
                      type: array
                      items:
                        type: string
                    owner:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - personal
                            - team
                        projectId:
                          type: string
                        projectName:
                          type: string
                      required:
                        - type
                        - projectId
                        - projectName
                    publishingError:
                      type: string
                    publishingErrorDetails:
                      type: object
                      properties:
                        reason:
                          type: string
                          enum:
                            - review_pending
                            - changes_requested
                            - insufficient_api_key_scope
                            - insufficient_permissions
                        workflowReviewRequestId:
                          type: string
                          minLength: 1
                        versionId:
                          type: string
                          minLength: 1
                      required:
                        - reason
                      additionalProperties: false
                    contentImportPolicy:
                      type: object
                      properties:
                        violations:
                          type: array
                          items:
                            type: object
                            properties:
                              kind:
                                type: string
                              checkId:
                                type: string
                              message:
                                type: string
                              subject:
                                type: string
                              subjectType:
                                type: string
                              scope:
                                type: string
                              matchedRuleId:
                                type: string
                              projectId:
                                type: string
                              optInAvailable:
                                type: boolean
                            required:
                              - kind
                              - checkId
                              - message
                        checkErrors:
                          type: array
                          items:
                            type: object
                            properties:
                              checkId:
                                type: string
                              correlationId:
                                type: string
                            required:
                              - checkId
                              - correlationId
                      required:
                        - violations
                        - checkErrors
                  required:
                    - file
                    - id
                    - name
                    - type
                    - status
                    - location
                    - conflict
                    - updatedAt
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /settings/sso/saml:
    get:
      operationId: getSamlConfiguration
      tags:
        - SettingsSsoSaml
      summary: Retrieve the SAML SSO configuration
      description: Retrieve the current SAML SSO configuration, including every field exposed in the UI plus the service provider entity ID and ACS return URL. Signing private keys, signing certificates, and identity provider metadata are redacted on read. Requires the `saml:manage` scope and the SAML feature to be licensed.
      x-required-scope: saml:manage
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/samlConfigurationPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    put:
      operationId: updateSamlConfiguration
      tags:
        - SettingsSsoSaml
      summary: Set the SAML SSO configuration
      description: Replace the SAML SSO configuration with the provided full object. Every writable field must be sent; use empty strings or empty arrays when a value is unset. Read-only `entityID` / `returnUrl` from GET are ignored if included, so a GET response can be sent back as a PUT body. Redacted secret placeholders keep the stored values unchanged. The update takes effect exactly as it would from the UI, using the same validation. Requires the `saml:manage` scope and the SAML feature to be licensed. When the configuration is managed via environment variables, the write is rejected with 409 and no changes are made.
      x-required-scope: saml:manage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mapping:
                  type: object
                  properties:
                    email:
                      type: string
                      description: SAML attribute mapped to the user's email.
                    firstName:
                      type: string
                      description: SAML attribute mapped to the user's first name.
                    lastName:
                      type: string
                      description: SAML attribute mapped to the user's last name.
                    userPrincipalName:
                      type: string
                      description: SAML attribute mapped to the user's principal name.
                    emailVerified:
                      type: string
                      description: SAML attribute that states whether the identity provider verified the user's email. Accepted values are `true` and `false`, case-insensitive. Use an empty string when unused.
                    n8nInstanceRole:
                      type: string
                      description: SAML attribute mapped to the n8n instance role. Use an empty string when unused.
                    n8nProjectRoles:
                      type: array
                      items:
                        type: string
                      description: SAML attributes mapped to n8n project roles, formatted as `<projectId>:<role>`. Use an empty array when unused.
                  required:
                    - email
                    - firstName
                    - lastName
                    - userPrincipalName
                    - emailVerified
                    - n8nInstanceRole
                    - n8nProjectRoles
                  additionalProperties: false
                  description: Mapping of SAML attributes to n8n user fields. Use empty strings / empty arrays for unused attributes.
                metadata:
                  type: string
                  description: Identity provider metadata in XML format. Use an empty string to clear stored metadata (also clears metadataUrl when no URL is provided). Use the redaction placeholder from a prior GET to leave an existing value unchanged.
                metadataUrl:
                  type: string
                  description: URL to fetch identity provider metadata from. Use an empty string to clear a stored URL.
                ignoreSSL:
                  type: boolean
                  description: Whether to ignore SSL certificate errors when fetching metadata from a URL.
                  example: false
                loginBinding:
                  type: string
                  enum:
                    - redirect
                    - post
                  description: SAML login request binding.
                  example: redirect
                loginEnabled:
                  type: boolean
                  description: Whether SAML login is enabled.
                  example: false
                loginLabel:
                  type: string
                  description: Label shown on the SAML login button.
                  example: SAML
                authnRequestsSigned:
                  type: boolean
                  description: Whether authentication requests are signed.
                  example: false
                wantAssertionsSigned:
                  type: boolean
                  description: Whether signed assertions are required.
                  example: true
                wantMessageSigned:
                  type: boolean
                  description: Whether signed SAML messages are required.
                  example: true
                emailVerifiedRequired:
                  type: boolean
                  description: Whether the identity provider must assert that the user's email address is verified before a login is linked to an existing user by email. When disabled, only an explicit negative assertion is rejected.
                  example: false
                signingPrivateKey:
                  type: string
                  description: PEM-encoded private key for signing SAML AuthnRequests. Use an empty string to clear an existing key, or the redaction placeholder from a prior GET to leave it unchanged.
                signingCertificate:
                  type: string
                  description: PEM-encoded certificate containing the public key matching the signing private key. Use an empty string when unused or to clear an existing certificate.
                acsBinding:
                  type: string
                  enum:
                    - redirect
                    - post
                  description: Assertion Consumer Service binding.
                  example: post
                signatureConfig:
                  type: object
                  properties:
                    prefix:
                      type: string
                      example: ds
                    location:
                      type: object
                      properties:
                        reference:
                          type: string
                          example: /samlp:Response/saml:Issuer
                        action:
                          type: string
                          enum:
                            - before
                            - after
                            - prepend
                            - append
                          example: after
                      required:
                        - reference
                        - action
                      additionalProperties: false
                  required:
                    - prefix
                    - location
                  additionalProperties: false
                  description: Configuration for the signature in SAML requests and responses.
                relayState:
                  type: string
                  description: Default relay state value for SAML requests. Use an empty string when unused.
                  example: https://n8n.example.com
                entityID:
                  type: string
                  description: Service provider entity ID. Returned by GET for convenience; ignored on write so a GET response can be sent back as a PUT body.
                  example: https://n8n.example.com/rest/sso/saml/metadata
                returnUrl:
                  type: string
                  description: Assertion Consumer Service return URL. Returned by GET for convenience; ignored on write so a GET response can be sent back as a PUT body.
                  example: https://n8n.example.com/rest/sso/saml/acs
              required:
                - mapping
                - metadata
                - metadataUrl
                - ignoreSSL
                - loginBinding
                - loginEnabled
                - loginLabel
                - authnRequestsSigned
                - wantAssertionsSigned
                - wantMessageSigned
                - emailVerifiedRequired
                - signingPrivateKey
                - signingCertificate
                - acsBinding
                - signatureConfig
                - relayState
              additionalProperties: false
              description: Full SAML SSO configuration. Every field must be provided; use empty strings or empty arrays when a value is unset. Partial updates are not supported.
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/samlConfigurationPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /tags:
    get:
      operationId: getTags
      tags:
        - Tags
      summary: Retrieve all tags
      description: Retrieve all tags from your instance.
      x-required-scope: tag:list
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          readOnly: true
                          example: 2tUt1wbLX592XDdX
                        name:
                          type: string
                          example: Production
                        createdAt:
                          type: string
                          format: date-time
                          readOnly: true
                        updatedAt:
                          type: string
                          format: date-time
                          readOnly: true
                      required:
                        - id
                        - name
                        - createdAt
                        - updatedAt
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createTag
      tags:
        - Tags
      summary: Create a tag
      description: Create a tag in your instance.
      x-required-scope: tag:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  readOnly: true
                  example: 2tUt1wbLX592XDdX
                name:
                  type: string
                  example: Production
                createdAt:
                  type: string
                  format: date-time
                  readOnly: true
                updatedAt:
                  type: string
                  format: date-time
                  readOnly: true
              required:
                - name
              additionalProperties: false
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tagPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /tags/{tagId}:
    get:
      operationId: getTag
      tags:
        - Tags
      summary: Retrieves a tag
      description: Retrieves a tag.
      x-required-scope: tag:read
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the tag.
          name: tagId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tagPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    put:
      operationId: updateTag
      tags:
        - Tags
      summary: Update a tag
      description: Update a tag.
      x-required-scope: tag:update
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the tag.
          name: tagId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  readOnly: true
                  example: 2tUt1wbLX592XDdX
                name:
                  type: string
                  example: Production
                createdAt:
                  type: string
                  format: date-time
                  readOnly: true
                updatedAt:
                  type: string
                  format: date-time
                  readOnly: true
              required:
                - name
              additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    readOnly: true
                    example: 2tUt1wbLX592XDdX
                  name:
                    type: string
                    example: Production
                  createdAt:
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    type: string
                    format: date-time
                    readOnly: true
                required:
                  - id
                  - name
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteTag
      tags:
        - Tags
      summary: Delete a tag
      description: Deletes a tag.
      x-required-scope: tag:delete
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the tag.
          name: tagId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tagPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /users:
    get:
      operationId: getUsers
      tags:
        - User
      summary: Retrieve all users
      description: Retrieve all users from your instance. Only available for the instance owner.
      x-required-scope: user:list
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          required: false
          name: includeRole
          in: query
        - schema:
            type: string
          required: false
          name: projectId
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          readOnly: true
                          example: 123e4567-e89b-12d3-a456-426614174000
                        email:
                          type: string
                          nullable: true
                          format: email
                          example: john.doe@company.com
                        firstName:
                          type: string
                          nullable: true
                          readOnly: true
                          example: john
                        lastName:
                          type: string
                          nullable: true
                          readOnly: true
                          example: Doe
                        isPending:
                          type: boolean
                          description: Whether the user finished setting up their account in response to the invitation (true) or not (false).
                          readOnly: true
                        createdAt:
                          type: string
                          format: date-time
                          readOnly: true
                        updatedAt:
                          type: string
                          format: date-time
                          readOnly: true
                        mfaEnabled:
                          type: boolean
                          description: Whether the user has multi-factor authentication (MFA/2FA) enabled.
                          readOnly: true
                          example: false
                        role:
                          type: string
                          readOnly: true
                          example: global:owner
                      required:
                        - id
                        - email
                        - firstName
                        - lastName
                        - isPending
                        - createdAt
                        - updatedAt
                        - mfaEnabled
                  nextCursor:
                    type: string
                    nullable: true
                    description: Paginate through users by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first page of the collection.
                    example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          description: The given `projectId` does not exist.
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createUser
      tags:
        - User
      summary: Create multiple users
      description: Create one or more users.
      x-required-scope: user:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  email:
                    type: string
                    format: email
                  role:
                    anyOf:
                      - type: string
                        enum:
                          - global:admin
                          - global:member
                          - global:chatUser
                      - type: string
                        minLength: 1
                    default: global:member
                required:
                  - email
      responses:
        '201':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    user:
                      type: object
                      properties:
                        id:
                          type: string
                          readOnly: true
                          example: 123e4567-e89b-12d3-a456-426614174000
                        email:
                          type: string
                          format: email
                          example: john.doe@company.com
                        inviteAcceptUrl:
                          type: string
                          description: Link the invited user can open to finish setting up the account. Present only when the instance does not send invite emails.
                          readOnly: true
                        emailSent:
                          type: boolean
                          description: Whether the invite email was sent to the user.
                          readOnly: true
                        role:
                          type: string
                          readOnly: true
                          example: global:member
                      required:
                        - id
                        - email
                        - emailSent
                        - role
                    error:
                      type: string
                      description: The reason the invite failed for this user. Empty when the invite succeeded.
                      readOnly: true
                  required:
                    - user
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /users/{userId}:
    get:
      operationId: getUser
      tags:
        - User
      summary: Get user by ID/Email
      description: Retrieve a user from your instance. Only available for the instance owner.
      x-required-scope: user:read
      parameters:
        - schema:
            type: string
          required: true
          description: The ID or email of the user.
          name: userId
          in: path
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          required: false
          name: includeRole
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    readOnly: true
                    example: 123e4567-e89b-12d3-a456-426614174000
                  email:
                    type: string
                    nullable: true
                    format: email
                    example: john.doe@company.com
                  firstName:
                    type: string
                    nullable: true
                    readOnly: true
                    example: john
                  lastName:
                    type: string
                    nullable: true
                    readOnly: true
                    example: Doe
                  isPending:
                    type: boolean
                    description: Whether the user finished setting up their account in response to the invitation (true) or not (false).
                    readOnly: true
                  createdAt:
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    type: string
                    format: date-time
                    readOnly: true
                  mfaEnabled:
                    type: boolean
                    description: Whether the user has multi-factor authentication (MFA/2FA) enabled.
                    readOnly: true
                    example: false
                  role:
                    type: string
                    readOnly: true
                    example: global:owner
                required:
                  - id
                  - email
                  - firstName
                  - lastName
                  - isPending
                  - createdAt
                  - updatedAt
                  - mfaEnabled
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          description: No user with that ID or email.
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteUser
      tags:
        - User
      summary: Delete user
      description: Delete a user from your instance.
      x-required-scope: user:delete
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the user.
          name: userId
          in: path
        - schema:
            type: string
            description: ID of the project to transfer the deleted user's workflows and credentials to. Omit to delete those resources instead of transferring them.
          required: false
          name: transferId
          in: query
      responses:
        '204':
          description: Operation successful.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /users/{userId}/role:
    patch:
      operationId: changeRole
      tags:
        - User
      summary: Change a user's global role
      description: Change a user's global role
      x-required-scope: user:changeRole
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the user.
          name: userId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                newRoleName:
                  anyOf:
                    - type: string
                      enum:
                        - global:admin
                        - global:member
                        - global:chatUser
                    - type: string
                      minLength: 1
              required:
                - newRoleName
      responses:
        '204':
          description: Operation successful.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /variables:
    get:
      operationId: getVariables
      tags:
        - Variables
      summary: Retrieve variables
      description: Retrieve variables from your instance.
      x-required-scope: variable:list
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
            example: VmwOO9HeTEj20kxM
          required: false
          name: projectId
          in: query
        - schema:
            type: string
            enum:
              - empty
          required: false
          name: state
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          readOnly: true
                        key:
                          type: string
                        value:
                          type: string
                          example: test
                        type:
                          type: string
                          readOnly: true
                        project:
                          type: object
                          nullable: true
                          properties:
                            id:
                              type: string
                              readOnly: true
                              example: VmwOO9HeTEj20kxM
                            name:
                              type: string
                              example: Marketing
                            type:
                              type: string
                              enum:
                                - personal
                                - team
                              readOnly: true
                              example: team
                            icon:
                              type: object
                              description: Icon of the project, or null when the project has none
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - emoji
                                    - icon
                                value:
                                  type: string
                                color:
                                  type: string
                              required:
                                - type
                                - value
                              nullable: true
                            description:
                              type: string
                              nullable: true
                              example: Workflows the marketing team owns.
                            customTelemetryTags:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                  value:
                                    type: string
                                required:
                                  - key
                                  - value
                            creatorId:
                              type: string
                              nullable: true
                              example: f9a2cbb8-0b1e-4b64-9c1c-0d5f5f1f2a3b
                            createdAt:
                              type: string
                              format: date-time
                              readOnly: true
                            updatedAt:
                              type: string
                              format: date-time
                              readOnly: true
                          required:
                            - id
                            - name
                            - type
                            - icon
                            - description
                            - customTelemetryTags
                            - creatorId
                            - createdAt
                            - updatedAt
                      required:
                        - id
                        - key
                        - value
                        - type
                        - project
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createVariable
      tags:
        - Variables
      summary: Create a variable
      description: Create a variable in your instance.
      x-required-scope: variable:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  readOnly: true
                key:
                  type: string
                  minLength: 1
                  maxLength: 50
                  pattern: ^[A-Za-z_][A-Za-z0-9_]*$
                value:
                  type: string
                  maxLength: 1000
                  example: test
                type:
                  type: string
                  readOnly: true
                projectId:
                  type: string
                  maxLength: 36
                  example: VmwOO9HeTEj20kxM
              required:
                - key
                - value
              additionalProperties: false
      responses:
        '201':
          description: Operation successful.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /variables/{id}:
    put:
      operationId: updateVariable
      tags:
        - Variables
      summary: Update a variable
      description: Update a variable from your instance.
      x-required-scope: variable:update
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the variable.
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  readOnly: true
                key:
                  type: string
                  minLength: 1
                  maxLength: 50
                  pattern: ^[A-Za-z0-9_]+$
                value:
                  type: string
                  maxLength: 1000
                  example: test
                type:
                  type: string
                  readOnly: true
                projectId:
                  type: string
                  nullable: true
                  maxLength: 36
                  example: VmwOO9HeTEj20kxM
              required:
                - key
                - value
              additionalProperties: false
      responses:
        '204':
          description: Operation successful.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteVariable
      tags:
        - Variables
      summary: Delete a variable
      description: Delete a variable from your instance.
      x-required-scope: variable:delete
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the variable.
          name: id
          in: path
      responses:
        '204':
          description: Operation successful.
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows:
    get:
      operationId: getWorkflows
      tags:
        - Workflow
      summary: Retrieve all workflows
      description: Retrieve all workflows from your instance.
      x-required-scope: workflow:list
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
          required: false
          name: active
          in: query
        - schema:
            type: string
          required: false
          name: tags
          in: query
        - schema:
            type: string
          required: false
          name: name
          in: query
        - schema:
            type: string
          required: false
          name: projectId
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          required: false
          name: excludePinnedData
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
            description: Set to `true` to add `parentFolder` to each workflow. `parentFolder` holds the folder `id`, or is `null` at the project root.
          required: false
          name: includeParentFolder
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        active:
                          type: boolean
                          description: Deprecated. Check whether `activeVersionId` is not null instead.
                          deprecated: true
                        activeVersionId:
                          type: string
                          nullable: true
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                        isArchived:
                          type: boolean
                        versionId:
                          type: string
                        triggerCount:
                          type: number
                        nodes:
                          type: array
                          description: Nodes that make up the workflow
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                              name:
                                type: string
                                example: Jira
                              webhookId:
                                type: string
                              disabled:
                                type: boolean
                              notesInFlow:
                                type: boolean
                              notes:
                                type: string
                              type:
                                type: string
                                example: n8n-nodes-base.jira
                              typeVersion:
                                type: number
                                example: 1
                              executeOnce:
                                type: boolean
                                example: false
                              alwaysOutputData:
                                type: boolean
                                example: false
                              retryOnFail:
                                type: boolean
                                example: false
                              maxTries:
                                type: number
                              waitBetweenTries:
                                type: number
                              continueOnFail:
                                type: boolean
                                example: false
                                description: use onError instead
                                deprecated: true
                              onError:
                                type: string
                                example: stopWorkflow
                              position:
                                type: array
                                items:
                                  type: number
                                example:
                                  - -100
                                  - 80
                              parameters:
                                type: object
                                additionalProperties: true
                              credentials:
                                type: object
                                example:
                                  jiraSoftwareCloudApi:
                                    name: jiraApi
                              customTelemetryTags:
                                type: object
                                properties:
                                  tag:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        key:
                                          type: string
                                        value:
                                          type: string
                                      required:
                                        - key
                                        - value
                        connections:
                          type: object
                          description: Connections between nodes, keyed by source node name
                          example:
                            Jira:
                              main:
                                - - node: Jira
                                    type: main
                                    index: 0
                        nodeGroups:
                          type: array
                          description: Visual groupings of nodes shown as frames on the canvas
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                description: Unique identifier for the node group
                                example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                              name:
                                type: string
                                description: Display name of the node group
                                example: Data processing
                              description:
                                type: string
                                maxLength: 155
                                description: Optional plain-text description of the node group
                                example: Cleans and normalizes incoming records
                              nodeIds:
                                type: array
                                description: IDs of the nodes that belong to this group
                                items:
                                  type: string
                            required:
                              - id
                              - name
                              - nodeIds
                        settings:
                          type: object
                          description: Execution and behaviour settings for the workflow
                          properties:
                            saveExecutionProgress:
                              oneOf:
                                - type: boolean
                                - type: string
                                  enum:
                                    - DEFAULT
                            saveManualExecutions:
                              oneOf:
                                - type: boolean
                                - type: string
                                  enum:
                                    - DEFAULT
                            saveDataErrorExecution:
                              type: string
                              enum:
                                - DEFAULT
                                - all
                                - none
                            saveDataSuccessExecution:
                              type: string
                              enum:
                                - DEFAULT
                                - all
                                - none
                            executionTimeout:
                              type: number
                              example: 3600
                            errorWorkflow:
                              type: string
                              example: VzqKEW0ShTXA5vPj
                              description: The ID of the workflow that contains the error trigger node.
                            timezone:
                              type: string
                              example: America/New_York
                            executionOrder:
                              type: string
                              example: v1
                            binaryMode:
                              type: string
                              enum:
                                - separate
                                - combined
                              description: Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                            engineType:
                              type: string
                              nullable: true
                              example: v1
                              description: The execution engine that runs this workflow. n8n sets it on new workflows when the instance runs new workflows on engine v2 (`N8N_ENGINE_DEFAULT_TYPE=v2` with the `engine-v2` module enabled). It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                            callerPolicy:
                              type: string
                              enum:
                                - any
                                - none
                                - workflowsFromAList
                                - workflowsFromSameOwner
                              example: workflowsFromSameOwner
                              description: |-
                                Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.

                                Available options:
                                - `any`: Any workflow can call this workflow (no restrictions)
                                - `none`: No other workflows can call this workflow (completely blocked)
                                - `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow
                                - `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow
                            callerIds:
                              type: string
                              example: 14, 18, 23
                              description: Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)
                            timeSavedMode:
                              type: string
                              enum:
                                - fixed
                                - dynamic
                              description: |-
                                Controls how the time saved per execution is calculated.

                                Available options:
                                - `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.
                                - `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored.
                            timeSavedPerExecution:
                              type: number
                              description: Estimated time saved per execution in minutes
                            redactionPolicy:
                              type: string
                              enum:
                                - none
                                - non-manual
                                - manual-only
                                - all
                              example: non-manual
                              description: |-
                                Controls whether execution data is redacted for this workflow.

                                Available options:
                                - `none` (default): No redaction. All execution data is stored.
                                - `non-manual`: Redact production (non-manually triggered) executions only.
                                - `manual-only`: Redact manually triggered executions only.
                                - `all`: Redact all executions, manual and production.
                            redactCallerExecutions:
                              type: boolean
                              example: true
                              description: Controls whether a workflow that calls this workflow as a sub-workflow has its executions redacted on the same channels as this workflow. The calling execution keeps a copy of the output of this workflow. Defaults to true. Turn it off only when the output of this workflow is not sensitive. Redaction that this workflow received from its own sub-workflows always passes to the caller.
                            availableInMCP:
                              type: boolean
                              example: false
                              description: Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node.
                            customTelemetryTags:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                  value:
                                    type: string
                                required:
                                  - key
                                  - value
                            credentialResolverId:
                              type: string
                              description: ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                          nullable: true
                        staticData:
                          type: object
                          description: Data the workflow keeps between executions
                          example:
                            lastId: 1
                          nullable: true
                        pinData:
                          type: object
                          description: Pinned sample data for nodes, keyed by node name
                          nullable: true
                        meta:
                          type: object
                          description: Workflow metadata such as template information
                          properties:
                            onboardingId:
                              type: string
                            templateId:
                              type: string
                            instanceId:
                              type: string
                            templateCredsSetupCompleted:
                              type: boolean
                          nullable: true
                        tags:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                readOnly: true
                                example: 2tUt1wbLX592XDdX
                              name:
                                type: string
                                example: Production
                              createdAt:
                                type: string
                                format: date-time
                                readOnly: true
                              updatedAt:
                                type: string
                                format: date-time
                                readOnly: true
                            required:
                              - id
                              - name
                              - createdAt
                              - updatedAt
                        shared:
                          type: array
                          items:
                            type: object
                            properties:
                              role:
                                type: string
                              workflowId:
                                type: string
                              projectId:
                                type: string
                              createdAt:
                                type: string
                                format: date-time
                              updatedAt:
                                type: string
                                format: date-time
                            required:
                              - role
                              - workflowId
                              - projectId
                              - createdAt
                              - updatedAt
                        activeVersion:
                          type: object
                          nullable: true
                          properties:
                            versionId:
                              type: string
                            workflowId:
                              type: string
                            nodes:
                              type: array
                              description: Nodes that make up the workflow
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                                  name:
                                    type: string
                                    example: Jira
                                  webhookId:
                                    type: string
                                  disabled:
                                    type: boolean
                                  notesInFlow:
                                    type: boolean
                                  notes:
                                    type: string
                                  type:
                                    type: string
                                    example: n8n-nodes-base.jira
                                  typeVersion:
                                    type: number
                                    example: 1
                                  executeOnce:
                                    type: boolean
                                    example: false
                                  alwaysOutputData:
                                    type: boolean
                                    example: false
                                  retryOnFail:
                                    type: boolean
                                    example: false
                                  maxTries:
                                    type: number
                                  waitBetweenTries:
                                    type: number
                                  continueOnFail:
                                    type: boolean
                                    example: false
                                    description: use onError instead
                                    deprecated: true
                                  onError:
                                    type: string
                                    example: stopWorkflow
                                  position:
                                    type: array
                                    items:
                                      type: number
                                    example:
                                      - -100
                                      - 80
                                  parameters:
                                    type: object
                                    additionalProperties: true
                                  credentials:
                                    type: object
                                    example:
                                      jiraSoftwareCloudApi:
                                        name: jiraApi
                                  customTelemetryTags:
                                    type: object
                                    properties:
                                      tag:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            key:
                                              type: string
                                            value:
                                              type: string
                                          required:
                                            - key
                                            - value
                            connections:
                              type: object
                              description: Connections between nodes, keyed by source node name
                              example:
                                Jira:
                                  main:
                                    - - node: Jira
                                        type: main
                                        index: 0
                            nodeGroups:
                              type: array
                              description: Visual groupings of nodes shown as frames on the canvas
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    description: Unique identifier for the node group
                                    example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                                  name:
                                    type: string
                                    description: Display name of the node group
                                    example: Data processing
                                  description:
                                    type: string
                                    maxLength: 155
                                    description: Optional plain-text description of the node group
                                    example: Cleans and normalizes incoming records
                                  nodeIds:
                                    type: array
                                    description: IDs of the nodes that belong to this group
                                    items:
                                      type: string
                                required:
                                  - id
                                  - name
                                  - nodeIds
                            authors:
                              type: string
                            name:
                              type: string
                              nullable: true
                            description:
                              type: string
                              nullable: true
                            autosaved:
                              type: boolean
                            createdAt:
                              type: string
                              format: date-time
                            updatedAt:
                              type: string
                              format: date-time
                          required:
                            - versionId
                            - workflowId
                            - nodes
                            - connections
                            - nodeGroups
                            - authors
                            - name
                            - description
                            - autosaved
                            - createdAt
                            - updatedAt
                        parentFolder:
                          type: object
                          nullable: true
                          properties:
                            id:
                              type: string
                          required:
                            - id
                          description: Folder that contains the workflow, or null at the project root. The field is present only when `includeParentFolder` is `true`.
                      required:
                        - id
                        - name
                        - active
                        - activeVersionId
                        - createdAt
                        - updatedAt
                        - isArchived
                        - versionId
                        - triggerCount
                        - nodes
                        - connections
                        - nodeGroups
                        - settings
                        - staticData
                        - meta
                        - shared
                        - activeVersion
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    post:
      operationId: createWorkflow
      tags:
        - Workflow
      summary: Create a workflow
      description: Create a workflow in your instance.
      x-required-scope: workflow:create
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  readOnly: true
                  example: 2tUt1wbLX592XDdX
                name:
                  type: string
                  example: Workflow 1
                active:
                  type: boolean
                  description: Deprecated. Check whether `activeVersionId` is not null instead.
                  readOnly: true
                  deprecated: true
                activeVersionId:
                  type: string
                  readOnly: true
                  nullable: true
                createdAt:
                  type: string
                  format: date-time
                  readOnly: true
                updatedAt:
                  type: string
                  format: date-time
                  readOnly: true
                isArchived:
                  type: boolean
                  readOnly: true
                versionId:
                  type: string
                  description: Current version identifier used for optimistic locking
                  readOnly: true
                triggerCount:
                  type: integer
                  description: Number of active trigger nodes in the workflow
                  readOnly: true
                nodes:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                      name:
                        type: string
                        example: Jira
                      webhookId:
                        type: string
                      disabled:
                        type: boolean
                      notesInFlow:
                        type: boolean
                      notes:
                        type: string
                      type:
                        type: string
                        example: n8n-nodes-base.jira
                      typeVersion:
                        type: number
                        example: 1
                      executeOnce:
                        type: boolean
                        example: false
                      alwaysOutputData:
                        type: boolean
                        example: false
                      retryOnFail:
                        type: boolean
                        example: false
                      maxTries:
                        type: number
                      waitBetweenTries:
                        type: number
                      continueOnFail:
                        type: boolean
                        description: use onError instead
                        example: false
                        deprecated: true
                      onError:
                        type: string
                        example: stopWorkflow
                      position:
                        type: array
                        items:
                          type: number
                        example:
                          - -100
                          - 80
                      parameters:
                        type: object
                        additionalProperties: {}
                      credentials:
                        type: object
                        additionalProperties: {}
                        example:
                          jiraSoftwareCloudApi:
                            name: jiraApi
                      customTelemetryTags:
                        type: object
                        properties:
                          tag:
                            type: array
                            items:
                              type: object
                              properties:
                                key:
                                  type: string
                                value:
                                  type: string
                              required:
                                - key
                                - value
                              additionalProperties: false
                        additionalProperties: false
                      extendsCredential:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                        readOnly: true
                      updatedAt:
                        type: string
                        format: date-time
                        readOnly: true
                    additionalProperties: false
                  description: Nodes that make up the workflow
                connections:
                  type: object
                  description: Connections between nodes, keyed by source node name
                  example:
                    Jira:
                      main:
                        - - node: Jira
                            type: main
                            index: 0
                settings:
                  type: object
                  properties:
                    saveExecutionProgress:
                      type: boolean
                    saveManualExecutions:
                      type: boolean
                    saveDataErrorExecution:
                      type: string
                      enum:
                        - all
                        - none
                    saveDataSuccessExecution:
                      type: string
                      enum:
                        - all
                        - none
                    executionTimeout:
                      type: number
                      example: 3600
                    errorWorkflow:
                      type: string
                      description: The ID of the workflow that contains the error trigger node.
                      example: VzqKEW0ShTXA5vPj
                    timezone:
                      type: string
                      example: America/New_York
                    executionOrder:
                      type: string
                      example: v1
                    binaryMode:
                      type: string
                      enum:
                        - separate
                        - combined
                      description: Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                    engineType:
                      type: string
                      nullable: true
                      description: The execution engine that runs this workflow. n8n sets it on new workflows when the instance runs new workflows on engine v2 (`N8N_ENGINE_DEFAULT_TYPE=v2` with the `engine-v2` module enabled). It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                      example: v1
                    callerPolicy:
                      type: string
                      enum:
                        - any
                        - none
                        - workflowsFromAList
                        - workflowsFromSameOwner
                      description: |-
                        Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.

                        Available options:
                        - `any`: Any workflow can call this workflow (no restrictions)
                        - `none`: No other workflows can call this workflow (completely blocked)
                        - `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow
                        - `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow
                      example: workflowsFromSameOwner
                    callerIds:
                      type: string
                      description: Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)
                      example: 14, 18, 23
                    timeSavedMode:
                      type: string
                      enum:
                        - fixed
                        - dynamic
                      description: |-
                        Controls how the time saved per execution is calculated.

                        Available options:
                        - `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.
                        - `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored.
                    timeSavedPerExecution:
                      type: number
                      description: Estimated time saved per execution in minutes
                    redactionPolicy:
                      type: string
                      enum:
                        - none
                        - non-manual
                        - manual-only
                        - all
                      description: |-
                        Controls whether execution data is redacted for this workflow.

                        Available options:
                        - `none` (default): No redaction. All execution data is stored.
                        - `non-manual`: Redact production (non-manually triggered) executions only.
                        - `manual-only`: Redact manually triggered executions only.
                        - `all`: Redact all executions, manual and production.
                      example: non-manual
                    redactCallerExecutions:
                      type: boolean
                      description: Controls whether a workflow that calls this workflow as a sub-workflow has its executions redacted on the same channels as this workflow. The calling execution keeps a copy of the output of this workflow. Defaults to true. Turn it off only when the output of this workflow is not sensitive. Redaction that this workflow received from its own sub-workflows always passes to the caller.
                      example: true
                    availableInMCP:
                      type: boolean
                      description: Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node.
                      example: false
                    customTelemetryTags:
                      type: array
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                          value:
                            type: string
                        required:
                          - key
                          - value
                        additionalProperties: false
                    credentialResolverId:
                      type: string
                      description: ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                  additionalProperties: false
                nodeGroups:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Unique identifier for the node group
                        example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                      name:
                        type: string
                        description: Display name of the node group
                        example: Data processing
                      description:
                        type: string
                        maxLength: 155
                        description: Optional plain-text description of the node group
                        example: Cleans and normalizes incoming records
                      nodeIds:
                        type: array
                        items:
                          type: string
                        description: IDs of the nodes that belong to this group
                    required:
                      - id
                      - name
                      - nodeIds
                    additionalProperties: false
                  description: Visual groupings of nodes shown as frames on the canvas
                staticData:
                  anyOf:
                    - type: string
                      format: jsonString
                    - type: object
                      additionalProperties: {}
                    - {}
                  description: Data the workflow keeps between executions
                  example:
                    lastId: 1
                pinData:
                  type: object
                  nullable: true
                  additionalProperties: {}
                  description: Pinned sample data for nodes, keyed by node name
                projectId:
                  type: string
                  description: Target project to create the workflow in. Defaults to the user's personal project.
                  example: VmwOO9HeTEj20kxM
                parentFolderId:
                  type: string
                  nullable: true
                  description: ID of the folder to place the workflow in. Omit or null to place at the project root.
                  example: X8ovzm8lTQjcXRZQ
                meta:
                  type: object
                  description: Workflow metadata such as template information
                  readOnly: true
                  properties:
                    onboardingId:
                      type: string
                    templateId:
                      type: string
                    instanceId:
                      type: string
                    templateCredsSetupCompleted:
                      type: boolean
                  nullable: true
                tags:
                  type: array
                  readOnly: true
                  items:
                    type: object
                    additionalProperties: false
                    required:
                      - name
                    properties:
                      id:
                        type: string
                        readOnly: true
                        example: 2tUt1wbLX592XDdX
                      name:
                        type: string
                        example: Production
                      createdAt:
                        type: string
                        format: date-time
                        readOnly: true
                      updatedAt:
                        type: string
                        format: date-time
                        readOnly: true
                shared:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                        example: workflow:owner
                      workflowId:
                        type: string
                        example: 2tUt1wbLX592XDdX
                      projectId:
                        type: string
                        example: 2tUt1wbLX592XDdX
                      project:
                        type: object
                        properties:
                          id:
                            type: string
                            readOnly: true
                          name:
                            type: string
                          type:
                            type: string
                            readOnly: true
                      createdAt:
                        type: string
                        format: date-time
                        readOnly: true
                      updatedAt:
                        type: string
                        format: date-time
                        readOnly: true
                    additionalProperties: false
                  description: Accepted for compatibility and ignored. The owner share is derived from the target project.
                activeVersion:
                  type: object
                  readOnly: true
                  nullable: true
                  additionalProperties: false
                  properties:
                    versionId:
                      type: string
                      readOnly: true
                      description: Unique identifier for this workflow version
                      example: 7c6b9e3f-8d4a-4b2c-9f1e-6a5d3b8c7e4f
                    workflowId:
                      type: string
                      readOnly: true
                      description: The workflow this version belongs to
                      example: 2tUt1wbLX592XDdX
                    nodes:
                      type: array
                      description: Nodes that make up the workflow
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                          name:
                            type: string
                            example: Jira
                          webhookId:
                            type: string
                          disabled:
                            type: boolean
                          notesInFlow:
                            type: boolean
                          notes:
                            type: string
                          type:
                            type: string
                            example: n8n-nodes-base.jira
                          typeVersion:
                            type: number
                            example: 1
                          executeOnce:
                            type: boolean
                            example: false
                          alwaysOutputData:
                            type: boolean
                            example: false
                          retryOnFail:
                            type: boolean
                            example: false
                          maxTries:
                            type: number
                          waitBetweenTries:
                            type: number
                          continueOnFail:
                            type: boolean
                            example: false
                            description: use onError instead
                            deprecated: true
                          onError:
                            type: string
                            example: stopWorkflow
                          position:
                            type: array
                            items:
                              type: number
                            example:
                              - -100
                              - 80
                          parameters:
                            type: object
                            additionalProperties: true
                          credentials:
                            type: object
                            example:
                              jiraSoftwareCloudApi:
                                name: jiraApi
                          customTelemetryTags:
                            type: object
                            additionalProperties: false
                            properties:
                              tag:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: false
                                  required:
                                    - key
                                    - value
                                  properties:
                                    key:
                                      type: string
                                    value:
                                      type: string
                          createdAt:
                            type: string
                            format: date-time
                            readOnly: true
                          updatedAt:
                            type: string
                            format: date-time
                            readOnly: true
                        additionalProperties: false
                      readOnly: true
                    connections:
                      type: object
                      description: Connections between nodes, keyed by source node name
                      example:
                        Jira:
                          main:
                            - - node: Jira
                                type: main
                                index: 0
                      readOnly: true
                    nodeGroups:
                      type: array
                      description: Visual groupings of nodes shown as frames on the canvas
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            description: Unique identifier for the node group
                            example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                          name:
                            type: string
                            description: Display name of the node group
                            example: Data processing
                          description:
                            type: string
                            maxLength: 155
                            description: Optional plain-text description of the node group
                            example: Cleans and normalizes incoming records
                          nodeIds:
                            type: array
                            description: IDs of the nodes that belong to this group
                            items:
                              type: string
                        required:
                          - id
                          - name
                          - nodeIds
                        additionalProperties: false
                      readOnly: true
                    authors:
                      type: string
                      readOnly: true
                      description: Comma-separated list of author IDs who contributed to this version
                      example: 1,2,3
                    name:
                      type: string
                      nullable: true
                      readOnly: true
                      description: Optional name for this workflow version
                      example: Production release
                    description:
                      type: string
                      nullable: true
                      readOnly: true
                      description: Optional description for this workflow version
                    autosaved:
                      type: boolean
                      readOnly: true
                      description: Whether this version was created by autosave
                    createdAt:
                      type: string
                      format: date-time
                      readOnly: true
                    updatedAt:
                      type: string
                      format: date-time
                      readOnly: true
                description:
                  type: string
                  description: Description of the workflow
                  example: My workflow description
              required:
                - name
                - nodes
                - connections
                - settings
              additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  active:
                    type: boolean
                    description: Deprecated. Check whether `activeVersionId` is not null instead.
                    deprecated: true
                  activeVersionId:
                    type: string
                    nullable: true
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  isArchived:
                    type: boolean
                  versionId:
                    type: string
                  versionCounter:
                    type: number
                  sourceWorkflowId:
                    type: string
                    nullable: true
                  triggerCount:
                    type: number
                  nodes:
                    type: array
                    description: Nodes that make up the workflow
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                        name:
                          type: string
                          example: Jira
                        webhookId:
                          type: string
                        disabled:
                          type: boolean
                        notesInFlow:
                          type: boolean
                        notes:
                          type: string
                        type:
                          type: string
                          example: n8n-nodes-base.jira
                        typeVersion:
                          type: number
                          example: 1
                        executeOnce:
                          type: boolean
                          example: false
                        alwaysOutputData:
                          type: boolean
                          example: false
                        retryOnFail:
                          type: boolean
                          example: false
                        maxTries:
                          type: number
                        waitBetweenTries:
                          type: number
                        continueOnFail:
                          type: boolean
                          example: false
                          description: use onError instead
                          deprecated: true
                        onError:
                          type: string
                          example: stopWorkflow
                        position:
                          type: array
                          items:
                            type: number
                          example:
                            - -100
                            - 80
                        parameters:
                          type: object
                          additionalProperties: true
                        credentials:
                          type: object
                          example:
                            jiraSoftwareCloudApi:
                              name: jiraApi
                        customTelemetryTags:
                          type: object
                          properties:
                            tag:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                  value:
                                    type: string
                                required:
                                  - key
                                  - value
                  connections:
                    type: object
                    description: Connections between nodes, keyed by source node name
                    example:
                      Jira:
                        main:
                          - - node: Jira
                              type: main
                              index: 0
                  nodeGroups:
                    type: array
                    description: Visual groupings of nodes shown as frames on the canvas
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the node group
                          example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                        name:
                          type: string
                          description: Display name of the node group
                          example: Data processing
                        description:
                          type: string
                          maxLength: 155
                          description: Optional plain-text description of the node group
                          example: Cleans and normalizes incoming records
                        nodeIds:
                          type: array
                          description: IDs of the nodes that belong to this group
                          items:
                            type: string
                      required:
                        - id
                        - name
                        - nodeIds
                  settings:
                    type: object
                    description: Execution and behaviour settings for the workflow
                    properties:
                      saveExecutionProgress:
                        oneOf:
                          - type: boolean
                          - type: string
                            enum:
                              - DEFAULT
                      saveManualExecutions:
                        oneOf:
                          - type: boolean
                          - type: string
                            enum:
                              - DEFAULT
                      saveDataErrorExecution:
                        type: string
                        enum:
                          - DEFAULT
                          - all
                          - none
                      saveDataSuccessExecution:
                        type: string
                        enum:
                          - DEFAULT
                          - all
                          - none
                      executionTimeout:
                        type: number
                        example: 3600
                      errorWorkflow:
                        type: string
                        example: VzqKEW0ShTXA5vPj
                        description: The ID of the workflow that contains the error trigger node.
                      timezone:
                        type: string
                        example: America/New_York
                      executionOrder:
                        type: string
                        example: v1
                      binaryMode:
                        type: string
                        enum:
                          - separate
                          - combined
                        description: Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                      engineType:
                        type: string
                        nullable: true
                        example: v1
                        description: The execution engine that runs this workflow. n8n sets it on new workflows when the instance runs new workflows on engine v2 (`N8N_ENGINE_DEFAULT_TYPE=v2` with the `engine-v2` module enabled). It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                      callerPolicy:
                        type: string
                        enum:
                          - any
                          - none
                          - workflowsFromAList
                          - workflowsFromSameOwner
                        example: workflowsFromSameOwner
                        description: |-
                          Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.

                          Available options:
                          - `any`: Any workflow can call this workflow (no restrictions)
                          - `none`: No other workflows can call this workflow (completely blocked)
                          - `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow
                          - `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow
                      callerIds:
                        type: string
                        example: 14, 18, 23
                        description: Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)
                      timeSavedMode:
                        type: string
                        enum:
                          - fixed
                          - dynamic
                        description: |-
                          Controls how the time saved per execution is calculated.

                          Available options:
                          - `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.
                          - `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored.
                      timeSavedPerExecution:
                        type: number
                        description: Estimated time saved per execution in minutes
                      redactionPolicy:
                        type: string
                        enum:
                          - none
                          - non-manual
                          - manual-only
                          - all
                        example: non-manual
                        description: |-
                          Controls whether execution data is redacted for this workflow.

                          Available options:
                          - `none` (default): No redaction. All execution data is stored.
                          - `non-manual`: Redact production (non-manually triggered) executions only.
                          - `manual-only`: Redact manually triggered executions only.
                          - `all`: Redact all executions, manual and production.
                      redactCallerExecutions:
                        type: boolean
                        example: true
                        description: Controls whether a workflow that calls this workflow as a sub-workflow has its executions redacted on the same channels as this workflow. The calling execution keeps a copy of the output of this workflow. Defaults to true. Turn it off only when the output of this workflow is not sensitive. Redaction that this workflow received from its own sub-workflows always passes to the caller.
                      availableInMCP:
                        type: boolean
                        example: false
                        description: Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node.
                      customTelemetryTags:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            value:
                              type: string
                          required:
                            - key
                            - value
                      credentialResolverId:
                        type: string
                        description: ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                    nullable: true
                  staticData:
                    type: object
                    description: Data the workflow keeps between executions
                    example:
                      lastId: 1
                    nullable: true
                  pinData:
                    type: object
                    description: Pinned sample data for nodes, keyed by node name
                    nullable: true
                  meta:
                    type: object
                    description: Workflow metadata such as template information
                    properties:
                      onboardingId:
                        type: string
                      templateId:
                        type: string
                      instanceId:
                        type: string
                      templateCredsSetupCompleted:
                        type: boolean
                    nullable: true
                  tags:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          readOnly: true
                          example: 2tUt1wbLX592XDdX
                        name:
                          type: string
                          example: Production
                        createdAt:
                          type: string
                          format: date-time
                          readOnly: true
                        updatedAt:
                          type: string
                          format: date-time
                          readOnly: true
                      required:
                        - id
                        - name
                        - createdAt
                        - updatedAt
                  shared:
                    type: array
                    items:
                      type: object
                      properties:
                        role:
                          type: string
                        workflowId:
                          type: string
                        projectId:
                          type: string
                        project:
                          type: object
                          properties:
                            id:
                              type: string
                              readOnly: true
                              example: VmwOO9HeTEj20kxM
                            name:
                              type: string
                              example: Marketing
                            type:
                              type: string
                              enum:
                                - personal
                                - team
                              readOnly: true
                              example: team
                            icon:
                              type: object
                              description: Icon of the project, or null when the project has none
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - emoji
                                    - icon
                                value:
                                  type: string
                                color:
                                  type: string
                              required:
                                - type
                                - value
                              nullable: true
                            description:
                              type: string
                              nullable: true
                              example: Workflows the marketing team owns.
                            customTelemetryTags:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                  value:
                                    type: string
                                required:
                                  - key
                                  - value
                            creatorId:
                              type: string
                              nullable: true
                              example: f9a2cbb8-0b1e-4b64-9c1c-0d5f5f1f2a3b
                            createdAt:
                              type: string
                              format: date-time
                              readOnly: true
                            updatedAt:
                              type: string
                              format: date-time
                              readOnly: true
                          required:
                            - id
                            - name
                            - type
                            - icon
                            - description
                            - customTelemetryTags
                            - creatorId
                            - createdAt
                            - updatedAt
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - role
                        - workflowId
                        - projectId
                        - project
                        - createdAt
                        - updatedAt
                  activeVersion:
                    type: object
                    nullable: true
                    properties:
                      versionId:
                        type: string
                      workflowId:
                        type: string
                      nodes:
                        type: array
                        description: Nodes that make up the workflow
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                            name:
                              type: string
                              example: Jira
                            webhookId:
                              type: string
                            disabled:
                              type: boolean
                            notesInFlow:
                              type: boolean
                            notes:
                              type: string
                            type:
                              type: string
                              example: n8n-nodes-base.jira
                            typeVersion:
                              type: number
                              example: 1
                            executeOnce:
                              type: boolean
                              example: false
                            alwaysOutputData:
                              type: boolean
                              example: false
                            retryOnFail:
                              type: boolean
                              example: false
                            maxTries:
                              type: number
                            waitBetweenTries:
                              type: number
                            continueOnFail:
                              type: boolean
                              example: false
                              description: use onError instead
                              deprecated: true
                            onError:
                              type: string
                              example: stopWorkflow
                            position:
                              type: array
                              items:
                                type: number
                              example:
                                - -100
                                - 80
                            parameters:
                              type: object
                              additionalProperties: true
                            credentials:
                              type: object
                              example:
                                jiraSoftwareCloudApi:
                                  name: jiraApi
                            customTelemetryTags:
                              type: object
                              properties:
                                tag:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      key:
                                        type: string
                                      value:
                                        type: string
                                    required:
                                      - key
                                      - value
                      connections:
                        type: object
                        description: Connections between nodes, keyed by source node name
                        example:
                          Jira:
                            main:
                              - - node: Jira
                                  type: main
                                  index: 0
                      nodeGroups:
                        type: array
                        description: Visual groupings of nodes shown as frames on the canvas
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Unique identifier for the node group
                              example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                            name:
                              type: string
                              description: Display name of the node group
                              example: Data processing
                            description:
                              type: string
                              maxLength: 155
                              description: Optional plain-text description of the node group
                              example: Cleans and normalizes incoming records
                            nodeIds:
                              type: array
                              description: IDs of the nodes that belong to this group
                              items:
                                type: string
                          required:
                            - id
                            - name
                            - nodeIds
                      authors:
                        type: string
                      name:
                        type: string
                        nullable: true
                      description:
                        type: string
                        nullable: true
                      autosaved:
                        type: boolean
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      workflowPublishHistory:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                            workflowId:
                              type: string
                            versionId:
                              type: string
                              nullable: true
                            event:
                              type: string
                              enum:
                                - activated
                                - deactivated
                            userId:
                              type: string
                              nullable: true
                            createdAt:
                              type: string
                              format: date-time
                          required:
                            - id
                            - workflowId
                            - versionId
                            - event
                            - userId
                            - createdAt
                    required:
                      - versionId
                      - workflowId
                      - nodes
                      - connections
                      - nodeGroups
                      - authors
                      - name
                      - description
                      - autosaved
                      - createdAt
                      - updatedAt
                      - workflowPublishHistory
                  parentFolder:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      parentFolderId:
                        type: string
                        nullable: true
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                    required:
                      - id
                      - name
                      - parentFolderId
                      - createdAt
                      - updatedAt
                    description: Folder the workflow was placed in, or null at the project root
                required:
                  - id
                  - name
                  - description
                  - active
                  - activeVersionId
                  - createdAt
                  - updatedAt
                  - isArchived
                  - versionId
                  - versionCounter
                  - sourceWorkflowId
                  - triggerCount
                  - nodes
                  - connections
                  - nodeGroups
                  - settings
                  - staticData
                  - meta
                  - shared
                  - activeVersion
                  - parentFolder
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}:
    get:
      operationId: getWorkflow
      tags:
        - Workflow
      summary: Retrieve a workflow
      description: Retrieve a workflow.
      x-required-scope: workflow:read
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          required: false
          name: excludePinnedData
          in: query
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  active:
                    type: boolean
                    description: Deprecated. Check whether `activeVersionId` is not null instead.
                    deprecated: true
                  activeVersionId:
                    type: string
                    nullable: true
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  isArchived:
                    type: boolean
                  versionId:
                    type: string
                  versionCounter:
                    type: number
                  sourceWorkflowId:
                    type: string
                    nullable: true
                  triggerCount:
                    type: number
                  nodes:
                    type: array
                    description: Nodes that make up the workflow
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                        name:
                          type: string
                          example: Jira
                        webhookId:
                          type: string
                        disabled:
                          type: boolean
                        notesInFlow:
                          type: boolean
                        notes:
                          type: string
                        type:
                          type: string
                          example: n8n-nodes-base.jira
                        typeVersion:
                          type: number
                          example: 1
                        executeOnce:
                          type: boolean
                          example: false
                        alwaysOutputData:
                          type: boolean
                          example: false
                        retryOnFail:
                          type: boolean
                          example: false
                        maxTries:
                          type: number
                        waitBetweenTries:
                          type: number
                        continueOnFail:
                          type: boolean
                          example: false
                          description: use onError instead
                          deprecated: true
                        onError:
                          type: string
                          example: stopWorkflow
                        position:
                          type: array
                          items:
                            type: number
                          example:
                            - -100
                            - 80
                        parameters:
                          type: object
                          additionalProperties: true
                        credentials:
                          type: object
                          example:
                            jiraSoftwareCloudApi:
                              name: jiraApi
                        customTelemetryTags:
                          type: object
                          properties:
                            tag:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                  value:
                                    type: string
                                required:
                                  - key
                                  - value
                  connections:
                    type: object
                    description: Connections between nodes, keyed by source node name
                    example:
                      Jira:
                        main:
                          - - node: Jira
                              type: main
                              index: 0
                  nodeGroups:
                    type: array
                    description: Visual groupings of nodes shown as frames on the canvas
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the node group
                          example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                        name:
                          type: string
                          description: Display name of the node group
                          example: Data processing
                        description:
                          type: string
                          maxLength: 155
                          description: Optional plain-text description of the node group
                          example: Cleans and normalizes incoming records
                        nodeIds:
                          type: array
                          description: IDs of the nodes that belong to this group
                          items:
                            type: string
                      required:
                        - id
                        - name
                        - nodeIds
                  settings:
                    type: object
                    description: Execution and behaviour settings for the workflow
                    properties:
                      saveExecutionProgress:
                        oneOf:
                          - type: boolean
                          - type: string
                            enum:
                              - DEFAULT
                      saveManualExecutions:
                        oneOf:
                          - type: boolean
                          - type: string
                            enum:
                              - DEFAULT
                      saveDataErrorExecution:
                        type: string
                        enum:
                          - DEFAULT
                          - all
                          - none
                      saveDataSuccessExecution:
                        type: string
                        enum:
                          - DEFAULT
                          - all
                          - none
                      executionTimeout:
                        type: number
                        example: 3600
                      errorWorkflow:
                        type: string
                        example: VzqKEW0ShTXA5vPj
                        description: The ID of the workflow that contains the error trigger node.
                      timezone:
                        type: string
                        example: America/New_York
                      executionOrder:
                        type: string
                        example: v1
                      binaryMode:
                        type: string
                        enum:
                          - separate
                          - combined
                        description: Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                      engineType:
                        type: string
                        nullable: true
                        example: v1
                        description: The execution engine that runs this workflow. n8n sets it on new workflows when the instance runs new workflows on engine v2 (`N8N_ENGINE_DEFAULT_TYPE=v2` with the `engine-v2` module enabled). It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                      callerPolicy:
                        type: string
                        enum:
                          - any
                          - none
                          - workflowsFromAList
                          - workflowsFromSameOwner
                        example: workflowsFromSameOwner
                        description: |-
                          Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.

                          Available options:
                          - `any`: Any workflow can call this workflow (no restrictions)
                          - `none`: No other workflows can call this workflow (completely blocked)
                          - `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow
                          - `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow
                      callerIds:
                        type: string
                        example: 14, 18, 23
                        description: Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)
                      timeSavedMode:
                        type: string
                        enum:
                          - fixed
                          - dynamic
                        description: |-
                          Controls how the time saved per execution is calculated.

                          Available options:
                          - `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.
                          - `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored.
                      timeSavedPerExecution:
                        type: number
                        description: Estimated time saved per execution in minutes
                      redactionPolicy:
                        type: string
                        enum:
                          - none
                          - non-manual
                          - manual-only
                          - all
                        example: non-manual
                        description: |-
                          Controls whether execution data is redacted for this workflow.

                          Available options:
                          - `none` (default): No redaction. All execution data is stored.
                          - `non-manual`: Redact production (non-manually triggered) executions only.
                          - `manual-only`: Redact manually triggered executions only.
                          - `all`: Redact all executions, manual and production.
                      redactCallerExecutions:
                        type: boolean
                        example: true
                        description: Controls whether a workflow that calls this workflow as a sub-workflow has its executions redacted on the same channels as this workflow. The calling execution keeps a copy of the output of this workflow. Defaults to true. Turn it off only when the output of this workflow is not sensitive. Redaction that this workflow received from its own sub-workflows always passes to the caller.
                      availableInMCP:
                        type: boolean
                        example: false
                        description: Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node.
                      customTelemetryTags:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            value:
                              type: string
                          required:
                            - key
                            - value
                      credentialResolverId:
                        type: string
                        description: ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                    nullable: true
                  staticData:
                    type: object
                    description: Data the workflow keeps between executions
                    example:
                      lastId: 1
                    nullable: true
                  pinData:
                    type: object
                    description: Pinned sample data for nodes, keyed by node name
                    nullable: true
                  meta:
                    type: object
                    description: Workflow metadata such as template information
                    properties:
                      onboardingId:
                        type: string
                      templateId:
                        type: string
                      instanceId:
                        type: string
                      templateCredsSetupCompleted:
                        type: boolean
                    nullable: true
                  tags:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          readOnly: true
                          example: 2tUt1wbLX592XDdX
                        name:
                          type: string
                          example: Production
                        createdAt:
                          type: string
                          format: date-time
                          readOnly: true
                        updatedAt:
                          type: string
                          format: date-time
                          readOnly: true
                      required:
                        - id
                        - name
                        - createdAt
                        - updatedAt
                  shared:
                    type: array
                    items:
                      type: object
                      properties:
                        role:
                          type: string
                        workflowId:
                          type: string
                        projectId:
                          type: string
                        project:
                          type: object
                          properties:
                            id:
                              type: string
                              readOnly: true
                              example: VmwOO9HeTEj20kxM
                            name:
                              type: string
                              example: Marketing
                            type:
                              type: string
                              enum:
                                - personal
                                - team
                              readOnly: true
                              example: team
                            icon:
                              type: object
                              description: Icon of the project, or null when the project has none
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - emoji
                                    - icon
                                value:
                                  type: string
                                color:
                                  type: string
                              required:
                                - type
                                - value
                              nullable: true
                            description:
                              type: string
                              nullable: true
                              example: Workflows the marketing team owns.
                            customTelemetryTags:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                  value:
                                    type: string
                                required:
                                  - key
                                  - value
                            creatorId:
                              type: string
                              nullable: true
                              example: f9a2cbb8-0b1e-4b64-9c1c-0d5f5f1f2a3b
                            createdAt:
                              type: string
                              format: date-time
                              readOnly: true
                            updatedAt:
                              type: string
                              format: date-time
                              readOnly: true
                          required:
                            - id
                            - name
                            - type
                            - icon
                            - description
                            - customTelemetryTags
                            - creatorId
                            - createdAt
                            - updatedAt
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - role
                        - workflowId
                        - projectId
                        - project
                        - createdAt
                        - updatedAt
                  activeVersion:
                    type: object
                    nullable: true
                    properties:
                      versionId:
                        type: string
                      workflowId:
                        type: string
                      nodes:
                        type: array
                        description: Nodes that make up the workflow
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                            name:
                              type: string
                              example: Jira
                            webhookId:
                              type: string
                            disabled:
                              type: boolean
                            notesInFlow:
                              type: boolean
                            notes:
                              type: string
                            type:
                              type: string
                              example: n8n-nodes-base.jira
                            typeVersion:
                              type: number
                              example: 1
                            executeOnce:
                              type: boolean
                              example: false
                            alwaysOutputData:
                              type: boolean
                              example: false
                            retryOnFail:
                              type: boolean
                              example: false
                            maxTries:
                              type: number
                            waitBetweenTries:
                              type: number
                            continueOnFail:
                              type: boolean
                              example: false
                              description: use onError instead
                              deprecated: true
                            onError:
                              type: string
                              example: stopWorkflow
                            position:
                              type: array
                              items:
                                type: number
                              example:
                                - -100
                                - 80
                            parameters:
                              type: object
                              additionalProperties: true
                            credentials:
                              type: object
                              example:
                                jiraSoftwareCloudApi:
                                  name: jiraApi
                            customTelemetryTags:
                              type: object
                              properties:
                                tag:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      key:
                                        type: string
                                      value:
                                        type: string
                                    required:
                                      - key
                                      - value
                      connections:
                        type: object
                        description: Connections between nodes, keyed by source node name
                        example:
                          Jira:
                            main:
                              - - node: Jira
                                  type: main
                                  index: 0
                      nodeGroups:
                        type: array
                        description: Visual groupings of nodes shown as frames on the canvas
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Unique identifier for the node group
                              example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                            name:
                              type: string
                              description: Display name of the node group
                              example: Data processing
                            description:
                              type: string
                              maxLength: 155
                              description: Optional plain-text description of the node group
                              example: Cleans and normalizes incoming records
                            nodeIds:
                              type: array
                              description: IDs of the nodes that belong to this group
                              items:
                                type: string
                          required:
                            - id
                            - name
                            - nodeIds
                      authors:
                        type: string
                      name:
                        type: string
                        nullable: true
                      description:
                        type: string
                        nullable: true
                      autosaved:
                        type: boolean
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      workflowPublishHistory:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                            workflowId:
                              type: string
                            versionId:
                              type: string
                              nullable: true
                            event:
                              type: string
                              enum:
                                - activated
                                - deactivated
                            userId:
                              type: string
                              nullable: true
                            createdAt:
                              type: string
                              format: date-time
                          required:
                            - id
                            - workflowId
                            - versionId
                            - event
                            - userId
                            - createdAt
                    required:
                      - versionId
                      - workflowId
                      - nodes
                      - connections
                      - nodeGroups
                      - authors
                      - name
                      - description
                      - autosaved
                      - createdAt
                      - updatedAt
                      - workflowPublishHistory
                  parentFolder:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      parentFolderId:
                        type: string
                        nullable: true
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                    required:
                      - id
                      - name
                      - parentFolderId
                      - createdAt
                      - updatedAt
                    description: Folder that contains the workflow, or null at the project root
                required:
                  - id
                  - name
                  - description
                  - active
                  - activeVersionId
                  - createdAt
                  - updatedAt
                  - isArchived
                  - versionId
                  - versionCounter
                  - sourceWorkflowId
                  - triggerCount
                  - nodes
                  - connections
                  - nodeGroups
                  - settings
                  - staticData
                  - meta
                  - shared
                  - activeVersion
                  - parentFolder
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    put:
      operationId: updateWorkflow
      tags:
        - Workflow
      summary: Update a workflow
      description: 'Update a workflow. If the workflow is published, the updated version will be automatically re-published unless `publishIfActive` is set to `false`. Because that re-publication puts a new version live, it additionally requires the `workflow:activate` API key scope and the `workflow:publish` project permission. A caller without either can still save: the new version is stored as a draft and the response is a `403` naming the missing permission, leaving the published version live. Saving an unpublished workflow, or saving with `publishIfActive=false`, only needs `workflow:update`.'
      x-required-scope: workflow:update
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'true'
            description: Whether to publish the update if the workflow is currently published. Set to `false` to save the change as a draft on the existing published version instead of releasing it. Has no effect on a workflow that isn't currently published.
          required: false
          name: publishIfActive
          in: query
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  readOnly: true
                  example: 2tUt1wbLX592XDdX
                name:
                  type: string
                  example: Workflow 1
                active:
                  type: boolean
                  description: Deprecated. Check whether `activeVersionId` is not null instead.
                  readOnly: true
                  deprecated: true
                activeVersionId:
                  type: string
                  readOnly: true
                  nullable: true
                createdAt:
                  type: string
                  format: date-time
                  readOnly: true
                updatedAt:
                  type: string
                  format: date-time
                  readOnly: true
                isArchived:
                  type: boolean
                  readOnly: true
                versionId:
                  type: string
                  description: Current version identifier used for optimistic locking
                  readOnly: true
                triggerCount:
                  type: integer
                  description: Number of active trigger nodes in the workflow
                  readOnly: true
                nodes:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                      name:
                        type: string
                        example: Jira
                      webhookId:
                        type: string
                      disabled:
                        type: boolean
                      notesInFlow:
                        type: boolean
                      notes:
                        type: string
                      type:
                        type: string
                        example: n8n-nodes-base.jira
                      typeVersion:
                        type: number
                        example: 1
                      executeOnce:
                        type: boolean
                        example: false
                      alwaysOutputData:
                        type: boolean
                        example: false
                      retryOnFail:
                        type: boolean
                        example: false
                      maxTries:
                        type: number
                      waitBetweenTries:
                        type: number
                      continueOnFail:
                        type: boolean
                        description: use onError instead
                        example: false
                        deprecated: true
                      onError:
                        type: string
                        example: stopWorkflow
                      position:
                        type: array
                        items:
                          type: number
                        example:
                          - -100
                          - 80
                      parameters:
                        type: object
                        additionalProperties: {}
                      credentials:
                        type: object
                        additionalProperties: {}
                        example:
                          jiraSoftwareCloudApi:
                            name: jiraApi
                      customTelemetryTags:
                        type: object
                        properties:
                          tag:
                            type: array
                            items:
                              type: object
                              properties:
                                key:
                                  type: string
                                value:
                                  type: string
                              required:
                                - key
                                - value
                              additionalProperties: false
                        additionalProperties: false
                      extendsCredential:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                        readOnly: true
                      updatedAt:
                        type: string
                        format: date-time
                        readOnly: true
                    additionalProperties: false
                  description: Nodes that make up the workflow
                connections:
                  type: object
                  description: Connections between nodes, keyed by source node name
                  example:
                    Jira:
                      main:
                        - - node: Jira
                            type: main
                            index: 0
                settings:
                  type: object
                  properties:
                    saveExecutionProgress:
                      type: boolean
                    saveManualExecutions:
                      type: boolean
                    saveDataErrorExecution:
                      type: string
                      enum:
                        - all
                        - none
                    saveDataSuccessExecution:
                      type: string
                      enum:
                        - all
                        - none
                    executionTimeout:
                      type: number
                      example: 3600
                    errorWorkflow:
                      type: string
                      description: The ID of the workflow that contains the error trigger node.
                      example: VzqKEW0ShTXA5vPj
                    timezone:
                      type: string
                      example: America/New_York
                    executionOrder:
                      type: string
                      example: v1
                    binaryMode:
                      type: string
                      enum:
                        - separate
                        - combined
                      description: Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                    engineType:
                      type: string
                      nullable: true
                      description: The execution engine that runs this workflow. n8n sets it on new workflows when the instance runs new workflows on engine v2 (`N8N_ENGINE_DEFAULT_TYPE=v2` with the `engine-v2` module enabled). It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                      example: v1
                    callerPolicy:
                      type: string
                      enum:
                        - any
                        - none
                        - workflowsFromAList
                        - workflowsFromSameOwner
                      description: |-
                        Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.

                        Available options:
                        - `any`: Any workflow can call this workflow (no restrictions)
                        - `none`: No other workflows can call this workflow (completely blocked)
                        - `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow
                        - `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow
                      example: workflowsFromSameOwner
                    callerIds:
                      type: string
                      description: Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)
                      example: 14, 18, 23
                    timeSavedMode:
                      type: string
                      enum:
                        - fixed
                        - dynamic
                      description: |-
                        Controls how the time saved per execution is calculated.

                        Available options:
                        - `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.
                        - `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored.
                    timeSavedPerExecution:
                      type: number
                      description: Estimated time saved per execution in minutes
                    redactionPolicy:
                      type: string
                      enum:
                        - none
                        - non-manual
                        - manual-only
                        - all
                      description: |-
                        Controls whether execution data is redacted for this workflow.

                        Available options:
                        - `none` (default): No redaction. All execution data is stored.
                        - `non-manual`: Redact production (non-manually triggered) executions only.
                        - `manual-only`: Redact manually triggered executions only.
                        - `all`: Redact all executions, manual and production.
                      example: non-manual
                    redactCallerExecutions:
                      type: boolean
                      description: Controls whether a workflow that calls this workflow as a sub-workflow has its executions redacted on the same channels as this workflow. The calling execution keeps a copy of the output of this workflow. Defaults to true. Turn it off only when the output of this workflow is not sensitive. Redaction that this workflow received from its own sub-workflows always passes to the caller.
                      example: true
                    availableInMCP:
                      type: boolean
                      description: Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node.
                      example: false
                    customTelemetryTags:
                      type: array
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                          value:
                            type: string
                        required:
                          - key
                          - value
                        additionalProperties: false
                    credentialResolverId:
                      type: string
                      description: ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                  additionalProperties: false
                nodeGroups:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Unique identifier for the node group
                        example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                      name:
                        type: string
                        description: Display name of the node group
                        example: Data processing
                      description:
                        type: string
                        maxLength: 155
                        description: Optional plain-text description of the node group
                        example: Cleans and normalizes incoming records
                      nodeIds:
                        type: array
                        items:
                          type: string
                        description: IDs of the nodes that belong to this group
                    required:
                      - id
                      - name
                      - nodeIds
                    additionalProperties: false
                  description: Visual groupings of nodes shown as frames on the canvas
                staticData:
                  anyOf:
                    - type: string
                      format: jsonString
                    - type: object
                      additionalProperties: {}
                    - {}
                  description: Data the workflow keeps between executions
                  example:
                    lastId: 1
                pinData:
                  type: object
                  nullable: true
                  additionalProperties: {}
                  description: Pinned sample data for nodes, keyed by node name
                parentFolderId:
                  type: string
                  nullable: true
                  description: ID of the folder to move the workflow into. Pass null to move it to the project root; omit to leave its current folder unchanged.
                  writeOnly: true
                  example: X8ovzm8lTQjcXRZQ
                meta:
                  type: object
                  description: Workflow metadata such as template information
                  readOnly: true
                  properties:
                    onboardingId:
                      type: string
                    templateId:
                      type: string
                    instanceId:
                      type: string
                    templateCredsSetupCompleted:
                      type: boolean
                  nullable: true
                tags:
                  type: array
                  readOnly: true
                  items:
                    type: object
                    additionalProperties: false
                    required:
                      - name
                    properties:
                      id:
                        type: string
                        readOnly: true
                        example: 2tUt1wbLX592XDdX
                      name:
                        type: string
                        example: Production
                      createdAt:
                        type: string
                        format: date-time
                        readOnly: true
                      updatedAt:
                        type: string
                        format: date-time
                        readOnly: true
                shared:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                        example: workflow:owner
                      workflowId:
                        type: string
                        example: 2tUt1wbLX592XDdX
                      projectId:
                        type: string
                        example: 2tUt1wbLX592XDdX
                      project:
                        type: object
                        properties:
                          id:
                            type: string
                            readOnly: true
                          name:
                            type: string
                          type:
                            type: string
                            readOnly: true
                      createdAt:
                        type: string
                        format: date-time
                        readOnly: true
                      updatedAt:
                        type: string
                        format: date-time
                        readOnly: true
                    additionalProperties: false
                  description: Accepted for compatibility and ignored. The owner share is derived from the target project.
                activeVersion:
                  type: object
                  readOnly: true
                  nullable: true
                  additionalProperties: false
                  properties:
                    versionId:
                      type: string
                      readOnly: true
                      description: Unique identifier for this workflow version
                      example: 7c6b9e3f-8d4a-4b2c-9f1e-6a5d3b8c7e4f
                    workflowId:
                      type: string
                      readOnly: true
                      description: The workflow this version belongs to
                      example: 2tUt1wbLX592XDdX
                    nodes:
                      type: array
                      description: Nodes that make up the workflow
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                          name:
                            type: string
                            example: Jira
                          webhookId:
                            type: string
                          disabled:
                            type: boolean
                          notesInFlow:
                            type: boolean
                          notes:
                            type: string
                          type:
                            type: string
                            example: n8n-nodes-base.jira
                          typeVersion:
                            type: number
                            example: 1
                          executeOnce:
                            type: boolean
                            example: false
                          alwaysOutputData:
                            type: boolean
                            example: false
                          retryOnFail:
                            type: boolean
                            example: false
                          maxTries:
                            type: number
                          waitBetweenTries:
                            type: number
                          continueOnFail:
                            type: boolean
                            example: false
                            description: use onError instead
                            deprecated: true
                          onError:
                            type: string
                            example: stopWorkflow
                          position:
                            type: array
                            items:
                              type: number
                            example:
                              - -100
                              - 80
                          parameters:
                            type: object
                            additionalProperties: true
                          credentials:
                            type: object
                            example:
                              jiraSoftwareCloudApi:
                                name: jiraApi
                          customTelemetryTags:
                            type: object
                            additionalProperties: false
                            properties:
                              tag:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: false
                                  required:
                                    - key
                                    - value
                                  properties:
                                    key:
                                      type: string
                                    value:
                                      type: string
                          createdAt:
                            type: string
                            format: date-time
                            readOnly: true
                          updatedAt:
                            type: string
                            format: date-time
                            readOnly: true
                        additionalProperties: false
                      readOnly: true
                    connections:
                      type: object
                      description: Connections between nodes, keyed by source node name
                      example:
                        Jira:
                          main:
                            - - node: Jira
                                type: main
                                index: 0
                      readOnly: true
                    nodeGroups:
                      type: array
                      description: Visual groupings of nodes shown as frames on the canvas
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            description: Unique identifier for the node group
                            example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                          name:
                            type: string
                            description: Display name of the node group
                            example: Data processing
                          description:
                            type: string
                            maxLength: 155
                            description: Optional plain-text description of the node group
                            example: Cleans and normalizes incoming records
                          nodeIds:
                            type: array
                            description: IDs of the nodes that belong to this group
                            items:
                              type: string
                        required:
                          - id
                          - name
                          - nodeIds
                        additionalProperties: false
                      readOnly: true
                    authors:
                      type: string
                      readOnly: true
                      description: Comma-separated list of author IDs who contributed to this version
                      example: 1,2,3
                    name:
                      type: string
                      nullable: true
                      readOnly: true
                      description: Optional name for this workflow version
                      example: Production release
                    description:
                      type: string
                      nullable: true
                      readOnly: true
                      description: Optional description for this workflow version
                    autosaved:
                      type: boolean
                      readOnly: true
                      description: Whether this version was created by autosave
                    createdAt:
                      type: string
                      format: date-time
                      readOnly: true
                    updatedAt:
                      type: string
                      format: date-time
                      readOnly: true
                description:
                  type: string
                  description: Description of the workflow
                  example: My workflow description
              required:
                - name
                - nodes
                - connections
                - settings
              additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  active:
                    type: boolean
                    description: Deprecated. Check whether `activeVersionId` is not null instead.
                    deprecated: true
                  activeVersionId:
                    type: string
                    nullable: true
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  isArchived:
                    type: boolean
                  versionId:
                    type: string
                  versionCounter:
                    type: number
                  sourceWorkflowId:
                    type: string
                    nullable: true
                  triggerCount:
                    type: number
                  nodes:
                    type: array
                    description: Nodes that make up the workflow
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                        name:
                          type: string
                          example: Jira
                        webhookId:
                          type: string
                        disabled:
                          type: boolean
                        notesInFlow:
                          type: boolean
                        notes:
                          type: string
                        type:
                          type: string
                          example: n8n-nodes-base.jira
                        typeVersion:
                          type: number
                          example: 1
                        executeOnce:
                          type: boolean
                          example: false
                        alwaysOutputData:
                          type: boolean
                          example: false
                        retryOnFail:
                          type: boolean
                          example: false
                        maxTries:
                          type: number
                        waitBetweenTries:
                          type: number
                        continueOnFail:
                          type: boolean
                          example: false
                          description: use onError instead
                          deprecated: true
                        onError:
                          type: string
                          example: stopWorkflow
                        position:
                          type: array
                          items:
                            type: number
                          example:
                            - -100
                            - 80
                        parameters:
                          type: object
                          additionalProperties: true
                        credentials:
                          type: object
                          example:
                            jiraSoftwareCloudApi:
                              name: jiraApi
                        customTelemetryTags:
                          type: object
                          properties:
                            tag:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                  value:
                                    type: string
                                required:
                                  - key
                                  - value
                  connections:
                    type: object
                    description: Connections between nodes, keyed by source node name
                    example:
                      Jira:
                        main:
                          - - node: Jira
                              type: main
                              index: 0
                  nodeGroups:
                    type: array
                    description: Visual groupings of nodes shown as frames on the canvas
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the node group
                          example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                        name:
                          type: string
                          description: Display name of the node group
                          example: Data processing
                        description:
                          type: string
                          maxLength: 155
                          description: Optional plain-text description of the node group
                          example: Cleans and normalizes incoming records
                        nodeIds:
                          type: array
                          description: IDs of the nodes that belong to this group
                          items:
                            type: string
                      required:
                        - id
                        - name
                        - nodeIds
                  settings:
                    type: object
                    description: Execution and behaviour settings for the workflow
                    properties:
                      saveExecutionProgress:
                        oneOf:
                          - type: boolean
                          - type: string
                            enum:
                              - DEFAULT
                      saveManualExecutions:
                        oneOf:
                          - type: boolean
                          - type: string
                            enum:
                              - DEFAULT
                      saveDataErrorExecution:
                        type: string
                        enum:
                          - DEFAULT
                          - all
                          - none
                      saveDataSuccessExecution:
                        type: string
                        enum:
                          - DEFAULT
                          - all
                          - none
                      executionTimeout:
                        type: number
                        example: 3600
                      errorWorkflow:
                        type: string
                        example: VzqKEW0ShTXA5vPj
                        description: The ID of the workflow that contains the error trigger node.
                      timezone:
                        type: string
                        example: America/New_York
                      executionOrder:
                        type: string
                        example: v1
                      binaryMode:
                        type: string
                        enum:
                          - separate
                          - combined
                        description: Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                      engineType:
                        type: string
                        nullable: true
                        example: v1
                        description: The execution engine that runs this workflow. n8n sets it on new workflows when the instance runs new workflows on engine v2 (`N8N_ENGINE_DEFAULT_TYPE=v2` with the `engine-v2` module enabled). It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                      callerPolicy:
                        type: string
                        enum:
                          - any
                          - none
                          - workflowsFromAList
                          - workflowsFromSameOwner
                        example: workflowsFromSameOwner
                        description: |-
                          Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.

                          Available options:
                          - `any`: Any workflow can call this workflow (no restrictions)
                          - `none`: No other workflows can call this workflow (completely blocked)
                          - `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow
                          - `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow
                      callerIds:
                        type: string
                        example: 14, 18, 23
                        description: Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)
                      timeSavedMode:
                        type: string
                        enum:
                          - fixed
                          - dynamic
                        description: |-
                          Controls how the time saved per execution is calculated.

                          Available options:
                          - `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.
                          - `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored.
                      timeSavedPerExecution:
                        type: number
                        description: Estimated time saved per execution in minutes
                      redactionPolicy:
                        type: string
                        enum:
                          - none
                          - non-manual
                          - manual-only
                          - all
                        example: non-manual
                        description: |-
                          Controls whether execution data is redacted for this workflow.

                          Available options:
                          - `none` (default): No redaction. All execution data is stored.
                          - `non-manual`: Redact production (non-manually triggered) executions only.
                          - `manual-only`: Redact manually triggered executions only.
                          - `all`: Redact all executions, manual and production.
                      redactCallerExecutions:
                        type: boolean
                        example: true
                        description: Controls whether a workflow that calls this workflow as a sub-workflow has its executions redacted on the same channels as this workflow. The calling execution keeps a copy of the output of this workflow. Defaults to true. Turn it off only when the output of this workflow is not sensitive. Redaction that this workflow received from its own sub-workflows always passes to the caller.
                      availableInMCP:
                        type: boolean
                        example: false
                        description: Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node.
                      customTelemetryTags:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            value:
                              type: string
                          required:
                            - key
                            - value
                      credentialResolverId:
                        type: string
                        description: ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                    nullable: true
                  staticData:
                    type: object
                    description: Data the workflow keeps between executions
                    example:
                      lastId: 1
                    nullable: true
                  pinData:
                    type: object
                    description: Pinned sample data for nodes, keyed by node name
                    nullable: true
                  meta:
                    type: object
                    description: Workflow metadata such as template information
                    properties:
                      onboardingId:
                        type: string
                      templateId:
                        type: string
                      instanceId:
                        type: string
                      templateCredsSetupCompleted:
                        type: boolean
                    nullable: true
                  tags:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          readOnly: true
                          example: 2tUt1wbLX592XDdX
                        name:
                          type: string
                          example: Production
                        createdAt:
                          type: string
                          format: date-time
                          readOnly: true
                        updatedAt:
                          type: string
                          format: date-time
                          readOnly: true
                      required:
                        - id
                        - name
                        - createdAt
                        - updatedAt
                  activeVersion:
                    type: object
                    nullable: true
                    properties:
                      versionId:
                        type: string
                      workflowId:
                        type: string
                      nodes:
                        type: array
                        description: Nodes that make up the workflow
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                            name:
                              type: string
                              example: Jira
                            webhookId:
                              type: string
                            disabled:
                              type: boolean
                            notesInFlow:
                              type: boolean
                            notes:
                              type: string
                            type:
                              type: string
                              example: n8n-nodes-base.jira
                            typeVersion:
                              type: number
                              example: 1
                            executeOnce:
                              type: boolean
                              example: false
                            alwaysOutputData:
                              type: boolean
                              example: false
                            retryOnFail:
                              type: boolean
                              example: false
                            maxTries:
                              type: number
                            waitBetweenTries:
                              type: number
                            continueOnFail:
                              type: boolean
                              example: false
                              description: use onError instead
                              deprecated: true
                            onError:
                              type: string
                              example: stopWorkflow
                            position:
                              type: array
                              items:
                                type: number
                              example:
                                - -100
                                - 80
                            parameters:
                              type: object
                              additionalProperties: true
                            credentials:
                              type: object
                              example:
                                jiraSoftwareCloudApi:
                                  name: jiraApi
                            customTelemetryTags:
                              type: object
                              properties:
                                tag:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      key:
                                        type: string
                                      value:
                                        type: string
                                    required:
                                      - key
                                      - value
                      connections:
                        type: object
                        description: Connections between nodes, keyed by source node name
                        example:
                          Jira:
                            main:
                              - - node: Jira
                                  type: main
                                  index: 0
                      nodeGroups:
                        type: array
                        description: Visual groupings of nodes shown as frames on the canvas
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Unique identifier for the node group
                              example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                            name:
                              type: string
                              description: Display name of the node group
                              example: Data processing
                            description:
                              type: string
                              maxLength: 155
                              description: Optional plain-text description of the node group
                              example: Cleans and normalizes incoming records
                            nodeIds:
                              type: array
                              description: IDs of the nodes that belong to this group
                              items:
                                type: string
                          required:
                            - id
                            - name
                            - nodeIds
                      authors:
                        type: string
                      name:
                        type: string
                        nullable: true
                      description:
                        type: string
                        nullable: true
                      autosaved:
                        type: boolean
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      workflowPublishHistory:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                            workflowId:
                              type: string
                            versionId:
                              type: string
                              nullable: true
                            event:
                              type: string
                              enum:
                                - activated
                                - deactivated
                            userId:
                              type: string
                              nullable: true
                            createdAt:
                              type: string
                              format: date-time
                          required:
                            - id
                            - workflowId
                            - versionId
                            - event
                            - userId
                            - createdAt
                    required:
                      - versionId
                      - workflowId
                      - nodes
                      - connections
                      - nodeGroups
                      - authors
                      - name
                      - description
                      - autosaved
                      - createdAt
                      - updatedAt
                required:
                  - id
                  - name
                  - description
                  - active
                  - activeVersionId
                  - createdAt
                  - updatedAt
                  - isArchived
                  - versionId
                  - versionCounter
                  - sourceWorkflowId
                  - triggerCount
                  - nodes
                  - connections
                  - nodeGroups
                  - settings
                  - staticData
                  - meta
                  - activeVersion
        '400':
          description: The request body is invalid, or the update changes a node that uses a credential the caller cannot access.
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          description: The update would re-publish the workflow, but the API key lacks `workflow:activate` or the caller lacks `workflow:publish` on the project. The update is still saved as a draft, named by `versionId`, and the published version stays live.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  reason:
                    type: string
                    enum:
                      - insufficient_api_key_scope
                      - insufficient_permissions
                  versionId:
                    type: string
                required:
                  - message
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          description: Conflict, e.g. re-publication blocked by an open workflow review (then `reason` and `workflowReviewRequestId` are present; the update itself is still saved as a draft) or a webhook path conflict.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  reason:
                    type: string
                    enum:
                      - review_pending
                      - changes_requested
                  workflowReviewRequestId:
                    type: string
                required:
                  - message
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    delete:
      operationId: deleteWorkflow
      tags:
        - Workflow
      summary: Delete a workflow
      description: Delete a workflow.
      x-required-scope: workflow:delete
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  active:
                    type: boolean
                    description: Deprecated. Check whether `activeVersionId` is not null instead.
                    deprecated: true
                  activeVersionId:
                    type: string
                    nullable: true
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  isArchived:
                    type: boolean
                  versionId:
                    type: string
                  versionCounter:
                    type: number
                  sourceWorkflowId:
                    type: string
                    nullable: true
                  triggerCount:
                    type: number
                  nodes:
                    type: array
                    description: Nodes that make up the workflow
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                        name:
                          type: string
                          example: Jira
                        webhookId:
                          type: string
                        disabled:
                          type: boolean
                        notesInFlow:
                          type: boolean
                        notes:
                          type: string
                        type:
                          type: string
                          example: n8n-nodes-base.jira
                        typeVersion:
                          type: number
                          example: 1
                        executeOnce:
                          type: boolean
                          example: false
                        alwaysOutputData:
                          type: boolean
                          example: false
                        retryOnFail:
                          type: boolean
                          example: false
                        maxTries:
                          type: number
                        waitBetweenTries:
                          type: number
                        continueOnFail:
                          type: boolean
                          example: false
                          description: use onError instead
                          deprecated: true
                        onError:
                          type: string
                          example: stopWorkflow
                        position:
                          type: array
                          items:
                            type: number
                          example:
                            - -100
                            - 80
                        parameters:
                          type: object
                          additionalProperties: true
                        credentials:
                          type: object
                          example:
                            jiraSoftwareCloudApi:
                              name: jiraApi
                        customTelemetryTags:
                          type: object
                          properties:
                            tag:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                  value:
                                    type: string
                                required:
                                  - key
                                  - value
                  connections:
                    type: object
                    description: Connections between nodes, keyed by source node name
                    example:
                      Jira:
                        main:
                          - - node: Jira
                              type: main
                              index: 0
                  nodeGroups:
                    type: array
                    description: Visual groupings of nodes shown as frames on the canvas
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the node group
                          example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                        name:
                          type: string
                          description: Display name of the node group
                          example: Data processing
                        description:
                          type: string
                          maxLength: 155
                          description: Optional plain-text description of the node group
                          example: Cleans and normalizes incoming records
                        nodeIds:
                          type: array
                          description: IDs of the nodes that belong to this group
                          items:
                            type: string
                      required:
                        - id
                        - name
                        - nodeIds
                  settings:
                    type: object
                    description: Execution and behaviour settings for the workflow
                    properties:
                      saveExecutionProgress:
                        oneOf:
                          - type: boolean
                          - type: string
                            enum:
                              - DEFAULT
                      saveManualExecutions:
                        oneOf:
                          - type: boolean
                          - type: string
                            enum:
                              - DEFAULT
                      saveDataErrorExecution:
                        type: string
                        enum:
                          - DEFAULT
                          - all
                          - none
                      saveDataSuccessExecution:
                        type: string
                        enum:
                          - DEFAULT
                          - all
                          - none
                      executionTimeout:
                        type: number
                        example: 3600
                      errorWorkflow:
                        type: string
                        example: VzqKEW0ShTXA5vPj
                        description: The ID of the workflow that contains the error trigger node.
                      timezone:
                        type: string
                        example: America/New_York
                      executionOrder:
                        type: string
                        example: v1
                      binaryMode:
                        type: string
                        enum:
                          - separate
                          - combined
                        description: Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                      engineType:
                        type: string
                        nullable: true
                        example: v1
                        description: The execution engine that runs this workflow. n8n sets it on new workflows when the instance runs new workflows on engine v2 (`N8N_ENGINE_DEFAULT_TYPE=v2` with the `engine-v2` module enabled). It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                      callerPolicy:
                        type: string
                        enum:
                          - any
                          - none
                          - workflowsFromAList
                          - workflowsFromSameOwner
                        example: workflowsFromSameOwner
                        description: |-
                          Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.

                          Available options:
                          - `any`: Any workflow can call this workflow (no restrictions)
                          - `none`: No other workflows can call this workflow (completely blocked)
                          - `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow
                          - `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow
                      callerIds:
                        type: string
                        example: 14, 18, 23
                        description: Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)
                      timeSavedMode:
                        type: string
                        enum:
                          - fixed
                          - dynamic
                        description: |-
                          Controls how the time saved per execution is calculated.

                          Available options:
                          - `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.
                          - `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored.
                      timeSavedPerExecution:
                        type: number
                        description: Estimated time saved per execution in minutes
                      redactionPolicy:
                        type: string
                        enum:
                          - none
                          - non-manual
                          - manual-only
                          - all
                        example: non-manual
                        description: |-
                          Controls whether execution data is redacted for this workflow.

                          Available options:
                          - `none` (default): No redaction. All execution data is stored.
                          - `non-manual`: Redact production (non-manually triggered) executions only.
                          - `manual-only`: Redact manually triggered executions only.
                          - `all`: Redact all executions, manual and production.
                      redactCallerExecutions:
                        type: boolean
                        example: true
                        description: Controls whether a workflow that calls this workflow as a sub-workflow has its executions redacted on the same channels as this workflow. The calling execution keeps a copy of the output of this workflow. Defaults to true. Turn it off only when the output of this workflow is not sensitive. Redaction that this workflow received from its own sub-workflows always passes to the caller.
                      availableInMCP:
                        type: boolean
                        example: false
                        description: Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node.
                      customTelemetryTags:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            value:
                              type: string
                          required:
                            - key
                            - value
                      credentialResolverId:
                        type: string
                        description: ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
                    nullable: true
                  staticData:
                    type: object
                    description: Data the workflow keeps between executions
                    example:
                      lastId: 1
                    nullable: true
                  pinData:
                    type: object
                    description: Pinned sample data for nodes, keyed by node name
                    nullable: true
                  meta:
                    type: object
                    description: Workflow metadata such as template information
                    properties:
                      onboardingId:
                        type: string
                      templateId:
                        type: string
                      instanceId:
                        type: string
                      templateCredsSetupCompleted:
                        type: boolean
                    nullable: true
                  tags:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          readOnly: true
                          example: 2tUt1wbLX592XDdX
                        name:
                          type: string
                          example: Production
                        createdAt:
                          type: string
                          format: date-time
                          readOnly: true
                        updatedAt:
                          type: string
                          format: date-time
                          readOnly: true
                      required:
                        - id
                        - name
                        - createdAt
                        - updatedAt
                  shared:
                    type: array
                    items:
                      type: object
                      properties:
                        role:
                          type: string
                        workflowId:
                          type: string
                        projectId:
                          type: string
                        project:
                          type: object
                          properties:
                            id:
                              type: string
                              readOnly: true
                              example: VmwOO9HeTEj20kxM
                            name:
                              type: string
                              example: Marketing
                            type:
                              type: string
                              enum:
                                - personal
                                - team
                              readOnly: true
                              example: team
                            icon:
                              type: object
                              description: Icon of the project, or null when the project has none
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - emoji
                                    - icon
                                value:
                                  type: string
                                color:
                                  type: string
                              required:
                                - type
                                - value
                              nullable: true
                            description:
                              type: string
                              nullable: true
                              example: Workflows the marketing team owns.
                            customTelemetryTags:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                  value:
                                    type: string
                                required:
                                  - key
                                  - value
                            creatorId:
                              type: string
                              nullable: true
                              example: f9a2cbb8-0b1e-4b64-9c1c-0d5f5f1f2a3b
                            createdAt:
                              type: string
                              format: date-time
                              readOnly: true
                            updatedAt:
                              type: string
                              format: date-time
                              readOnly: true
                          required:
                            - id
                            - name
                            - type
                            - icon
                            - description
                            - customTelemetryTags
                            - creatorId
                            - createdAt
                            - updatedAt
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - role
                        - workflowId
                        - projectId
                        - project
                        - createdAt
                        - updatedAt
                  activeVersion:
                    type: object
                    nullable: true
                    properties:
                      versionId:
                        type: string
                      workflowId:
                        type: string
                      nodes:
                        type: array
                        description: Nodes that make up the workflow
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                            name:
                              type: string
                              example: Jira
                            webhookId:
                              type: string
                            disabled:
                              type: boolean
                            notesInFlow:
                              type: boolean
                            notes:
                              type: string
                            type:
                              type: string
                              example: n8n-nodes-base.jira
                            typeVersion:
                              type: number
                              example: 1
                            executeOnce:
                              type: boolean
                              example: false
                            alwaysOutputData:
                              type: boolean
                              example: false
                            retryOnFail:
                              type: boolean
                              example: false
                            maxTries:
                              type: number
                            waitBetweenTries:
                              type: number
                            continueOnFail:
                              type: boolean
                              example: false
                              description: use onError instead
                              deprecated: true
                            onError:
                              type: string
                              example: stopWorkflow
                            position:
                              type: array
                              items:
                                type: number
                              example:
                                - -100
                                - 80
                            parameters:
                              type: object
                              additionalProperties: true
                            credentials:
                              type: object
                              example:
                                jiraSoftwareCloudApi:
                                  name: jiraApi
                            customTelemetryTags:
                              type: object
                              properties:
                                tag:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      key:
                                        type: string
                                      value:
                                        type: string
                                    required:
                                      - key
                                      - value
                      connections:
                        type: object
                        description: Connections between nodes, keyed by source node name
                        example:
                          Jira:
                            main:
                              - - node: Jira
                                  type: main
                                  index: 0
                      nodeGroups:
                        type: array
                        description: Visual groupings of nodes shown as frames on the canvas
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Unique identifier for the node group
                              example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                            name:
                              type: string
                              description: Display name of the node group
                              example: Data processing
                            description:
                              type: string
                              maxLength: 155
                              description: Optional plain-text description of the node group
                              example: Cleans and normalizes incoming records
                            nodeIds:
                              type: array
                              description: IDs of the nodes that belong to this group
                              items:
                                type: string
                          required:
                            - id
                            - name
                            - nodeIds
                      authors:
                        type: string
                      name:
                        type: string
                        nullable: true
                      description:
                        type: string
                        nullable: true
                      autosaved:
                        type: boolean
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      workflowPublishHistory:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                            workflowId:
                              type: string
                            versionId:
                              type: string
                              nullable: true
                            event:
                              type: string
                              enum:
                                - activated
                                - deactivated
                            userId:
                              type: string
                              nullable: true
                            createdAt:
                              type: string
                              format: date-time
                          required:
                            - id
                            - workflowId
                            - versionId
                            - event
                            - userId
                            - createdAt
                    required:
                      - versionId
                      - workflowId
                      - nodes
                      - connections
                      - nodeGroups
                      - authors
                      - name
                      - description
                      - autosaved
                      - createdAt
                      - updatedAt
                      - workflowPublishHistory
                required:
                  - id
                  - name
                  - description
                  - active
                  - activeVersionId
                  - createdAt
                  - updatedAt
                  - isArchived
                  - versionId
                  - versionCounter
                  - sourceWorkflowId
                  - triggerCount
                  - nodes
                  - connections
                  - nodeGroups
                  - settings
                  - staticData
                  - meta
                  - shared
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/archive:
    post:
      operationId: archiveWorkflow
      tags:
        - Workflow
      summary: Archive a workflow
      description: 'Soft-deletes a workflow by archiving it. Idempotent: archiving an already archived workflow returns 200 with the current workflow.'
      x-required-scope: workflow:delete
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workflowPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/unarchive:
    post:
      operationId: unarchiveWorkflow
      tags:
        - Workflow
      summary: Unarchive a workflow
      description: Restores an archived workflow.
      x-required-scope: workflow:delete
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workflowPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/transfer:
    put:
      operationId: transferWorkflow
      tags:
        - Workflow
      summary: Transfer a workflow to another project
      description: Transfer a workflow to another project.
      x-required-scope: workflow:move
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                destinationProjectId:
                  type: string
              required:
                - destinationProjectId
      responses:
        '204':
          description: Operation successful.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/publish:
    post:
      operationId: publishWorkflow
      tags:
        - Workflow
      summary: Publish a workflow
      description: Publish a workflow. In n8n v1, this action was termed activating a workflow.
      x-required-scope: workflow:activate
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                versionId:
                  type: string
                  description: The specific version ID to publish. If not provided, the latest version is used.
                name:
                  type: string
                  description: Optional name for the workflow version during publication.
                description:
                  type: string
                  description: Optional description for the workflow version during publication.
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workflowPublishPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          description: Conflict, e.g. publication blocked by an open workflow review (then `reason` and `workflowReviewRequestId` are present) or a webhook path conflict.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  reason:
                    type: string
                    enum:
                      - review_pending
                      - changes_requested
                  workflowReviewRequestId:
                    type: string
                required:
                  - message
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/unpublish:
    post:
      operationId: unpublishWorkflow
      tags:
        - Workflow
      summary: Unpublish a workflow
      description: Unpublish a workflow. In n8n v1, this action was termed deactivating a workflow.
      x-required-scope: workflow:deactivate
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workflowPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/activate:
    post:
      operationId: activateWorkflow
      tags:
        - Workflow
      summary: Publish a workflow
      description: 'Deprecated: use POST /workflows/{id}/publish instead. Publish a workflow. In n8n v1, this action was termed activating a workflow.'
      x-required-scope: workflow:activate
      deprecated: true
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                versionId:
                  type: string
                  description: The specific version ID to activate or publish. If not provided, the latest version is used.
                name:
                  type: string
                  description: Optional name for the workflow version during activation.
                description:
                  type: string
                  description: Optional description for the workflow version during activation.
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workflowPublishPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          description: Conflict, e.g. publication blocked by an open workflow review (then `reason` and `workflowReviewRequestId` are present) or a webhook path conflict.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  reason:
                    type: string
                    enum:
                      - review_pending
                      - changes_requested
                  workflowReviewRequestId:
                    type: string
                required:
                  - message
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/deactivate:
    post:
      operationId: deactivateWorkflow
      tags:
        - Workflow
      summary: Deactivate a workflow
      description: 'Deprecated: use POST /workflows/{id}/unpublish instead. Deactivate a workflow.'
      x-required-scope: workflow:deactivate
      deprecated: true
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workflowPublicDto.generated'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/history:
    get:
      operationId: getWorkflowHistory
      tags:
        - Workflow
      summary: Retrieve workflow version history
      description: Returns a paginated list of workflow versions (version IDs and metadata) for a workflow.
      x-required-scope: workflow:read
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        versionId:
                          type: string
                        workflowId:
                          type: string
                        authors:
                          type: string
                        name:
                          type: string
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - versionId
                        - workflowId
                        - authors
                        - name
                        - description
                        - createdAt
                        - updatedAt
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
                  - nextCursor
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/versions/{workflowVersionId}:
    get:
      operationId: getWorkflowVersion
      tags:
        - Workflow
      summary: Retrieve a workflow version
      description: Retrieve a single version of a workflow from its version history.
      x-required-scope: workflow:read
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the workflow version.
          name: workflowVersionId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  versionId:
                    type: string
                  workflowId:
                    type: string
                  nodes:
                    type: array
                    description: Nodes that make up the workflow
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                        name:
                          type: string
                          example: Jira
                        webhookId:
                          type: string
                        disabled:
                          type: boolean
                        notesInFlow:
                          type: boolean
                        notes:
                          type: string
                        type:
                          type: string
                          example: n8n-nodes-base.jira
                        typeVersion:
                          type: number
                          example: 1
                        executeOnce:
                          type: boolean
                          example: false
                        alwaysOutputData:
                          type: boolean
                          example: false
                        retryOnFail:
                          type: boolean
                          example: false
                        maxTries:
                          type: number
                        waitBetweenTries:
                          type: number
                        continueOnFail:
                          type: boolean
                          example: false
                          description: use onError instead
                          deprecated: true
                        onError:
                          type: string
                          example: stopWorkflow
                        position:
                          type: array
                          items:
                            type: number
                          example:
                            - -100
                            - 80
                        parameters:
                          type: object
                          additionalProperties: true
                        credentials:
                          type: object
                          example:
                            jiraSoftwareCloudApi:
                              name: jiraApi
                        customTelemetryTags:
                          type: object
                          properties:
                            tag:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                  value:
                                    type: string
                                required:
                                  - key
                                  - value
                  connections:
                    type: object
                    description: Connections between nodes, keyed by source node name
                    example:
                      Jira:
                        main:
                          - - node: Jira
                              type: main
                              index: 0
                  nodeGroups:
                    type: array
                    description: Visual groupings of nodes shown as frames on the canvas
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the node group
                          example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                        name:
                          type: string
                          description: Display name of the node group
                          example: Data processing
                        description:
                          type: string
                          maxLength: 155
                          description: Optional plain-text description of the node group
                          example: Cleans and normalizes incoming records
                        nodeIds:
                          type: array
                          description: IDs of the nodes that belong to this group
                          items:
                            type: string
                      required:
                        - id
                        - name
                        - nodeIds
                  authors:
                    type: string
                  name:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                required:
                  - versionId
                  - workflowId
                  - nodes
                  - connections
                  - nodeGroups
                  - authors
                  - name
                  - description
                  - createdAt
                  - updatedAt
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/tags:
    get:
      operationId: getWorkflowTags
      tags:
        - Workflow
      summary: Get workflow tags
      description: Get workflow tags.
      x-required-scope: workflowTags:list
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workflowTagsPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
    put:
      operationId: updateWorkflowTags
      tags:
        - Workflow
      summary: Update tags of a workflow
      description: Update tags of a workflow.
      x-required-scope: workflowTags:update
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    example: 2tUt1wbLX592XDdX
                required:
                  - id
                additionalProperties: false
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workflowTagsPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/dependencies:
    get:
      operationId: getWorkflowDependencies
      tags:
        - Workflow
      summary: List workflow dependencies
      description: List the credentials, data tables, sub-workflows and error workflow that the workflow uses, and the workflows and agents that use the workflow.
      x-required-scope: workflow:read
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dependencyListPublicDto.generated'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
  /workflows/{workflowId}/{workflowVersionId}:
    get:
      operationId: getDeprecatedWorkflowVersion
      tags:
        - Workflow
      summary: Retrieves a specific version of a workflow
      description: 'Deprecated: use GET /workflows/{workflowId}/versions/{workflowVersionId} instead. Retrieves a specific version of a workflow from workflow history.'
      x-required-scope: workflow:read
      deprecated: true
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the workflow.
          name: workflowId
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the workflow version.
          name: workflowVersionId
          in: path
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  versionId:
                    type: string
                  workflowId:
                    type: string
                  nodes:
                    type: array
                    description: Nodes that make up the workflow
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                        name:
                          type: string
                          example: Jira
                        webhookId:
                          type: string
                        disabled:
                          type: boolean
                        notesInFlow:
                          type: boolean
                        notes:
                          type: string
                        type:
                          type: string
                          example: n8n-nodes-base.jira
                        typeVersion:
                          type: number
                          example: 1
                        executeOnce:
                          type: boolean
                          example: false
                        alwaysOutputData:
                          type: boolean
                          example: false
                        retryOnFail:
                          type: boolean
                          example: false
                        maxTries:
                          type: number
                        waitBetweenTries:
                          type: number
                        continueOnFail:
                          type: boolean
                          example: false
                          description: use onError instead
                          deprecated: true
                        onError:
                          type: string
                          example: stopWorkflow
                        position:
                          type: array
                          items:
                            type: number
                          example:
                            - -100
                            - 80
                        parameters:
                          type: object
                          additionalProperties: true
                        credentials:
                          type: object
                          example:
                            jiraSoftwareCloudApi:
                              name: jiraApi
                        customTelemetryTags:
                          type: object
                          properties:
                            tag:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                  value:
                                    type: string
                                required:
                                  - key
                                  - value
                  connections:
                    type: object
                    description: Connections between nodes, keyed by source node name
                    example:
                      Jira:
                        main:
                          - - node: Jira
                              type: main
                              index: 0
                  nodeGroups:
                    type: array
                    description: Visual groupings of nodes shown as frames on the canvas
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the node group
                          example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                        name:
                          type: string
                          description: Display name of the node group
                          example: Data processing
                        description:
                          type: string
                          maxLength: 155
                          description: Optional plain-text description of the node group
                          example: Cleans and normalizes incoming records
                        nodeIds:
                          type: array
                          description: IDs of the nodes that belong to this group
                          items:
                            type: string
                      required:
                        - id
                        - name
                        - nodeIds
                  authors:
                    type: string
                  name:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                required:
                  - versionId
                  - workflowId
                  - nodes
                  - connections
                  - authors
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
components:
  parameters:
    idempotencyKey:
      name: Idempotency-Key
      in: header
      description: Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 128
        pattern: ^[\x21-\x7E]+$
    limit:
      name: limit
      in: query
      description: The maximum number of items to return.
      required: false
      schema:
        type: number
        example: 100
        default: 100
        maximum: 250
    cursor:
      name: cursor
      in: query
      description: Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first "page" of the collection. See pagination for more detail.
      required: false
      style: form
      schema:
        type: string
    offset:
      name: offset
      in: query
      description: The number of items to skip before starting to collect the result set.
      required: false
      schema:
        type: number
        example: 0
        default: 0
        minimum: 0
  schemas:
    auditVersion.generated:
      type: object
      properties:
        name:
          type: string
        nodes:
          type: array
          items: {}
        createdAt:
          type: string
        description:
          type: string
        documentationUrl:
          type: string
        hasBreakingChange:
          type: boolean
        hasSecurityFix:
          type: boolean
          nullable: true
        hasSecurityIssue:
          type: boolean
          nullable: true
        securityIssueFixVersion:
          type: string
          nullable: true
      required:
        - name
        - nodes
        - createdAt
        - description
        - documentationUrl
        - hasBreakingChange
        - hasSecurityFix
        - hasSecurityIssue
        - securityIssueFixVersion
    credentialTypePolicyEffectivePublicDto.generated:
      type: object
      properties:
        scopeId:
          type: string
          nullable: true
        rules:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              action:
                type: string
                enum:
                  - allow
                  - deny
                  - delegate
              selector:
                oneOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - name
                      value:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - value
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - package
                      value:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - value
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - extends
                      value:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - value
                    description: Matches the named credential type and every type that extends it
                type: object
            required:
              - id
              - action
              - selector
        defaultAction:
          type: string
          enum:
            - allow
            - deny
            - delegate
        version:
          type: integer
          minimum: 0
      required:
        - scopeId
        - rules
        - defaultAction
        - version
    credentialTypePolicyEffectiveWriteResultPublicDto.generated:
      type: object
      properties:
        scopeId:
          type: string
          nullable: true
        rules:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              action:
                type: string
                enum:
                  - allow
                  - deny
                  - delegate
              selector:
                oneOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - name
                      value:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - value
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - package
                      value:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - value
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - extends
                      value:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - value
                    description: Matches the named credential type and every type that extends it
                type: object
            required:
              - id
              - action
              - selector
        defaultAction:
          type: string
          enum:
            - allow
            - deny
            - delegate
        version:
          type: integer
          minimum: 0
        warnings:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - shadowed
                  ruleId:
                    type: string
                  shadowedByRuleId:
                    type: string
                required:
                  - kind
                  - ruleId
                  - shadowedByRuleId
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - notLoaded
                  ruleId:
                    type: string
                required:
                  - kind
                  - ruleId
            type: object
      required:
        - scopeId
        - rules
        - defaultAction
        - version
        - warnings
    credentialTypePolicyDocumentWriteResultPublicDto.generated:
      type: object
      properties:
        policy:
          type: object
          properties:
            id:
              type: string
            kind:
              type: string
            rules:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                  action:
                    type: string
                    enum:
                      - allow
                      - deny
                      - delegate
                  selector:
                    oneOf:
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - name
                          value:
                            type: string
                            minLength: 1
                        required:
                          - kind
                          - value
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - package
                          value:
                            type: string
                            minLength: 1
                        required:
                          - kind
                          - value
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - extends
                          value:
                            type: string
                            minLength: 1
                        required:
                          - kind
                          - value
                        description: Matches the named credential type and every type that extends it
                    type: object
                required:
                  - id
                  - action
                  - selector
            version:
              type: integer
              minimum: 0
              exclusiveMinimum: true
            updatedBy:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
          required:
            - id
            - kind
            - rules
            - version
            - updatedBy
            - createdAt
            - updatedAt
        warnings:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - shadowed
                  ruleId:
                    type: string
                  shadowedByRuleId:
                    type: string
                required:
                  - kind
                  - ruleId
                  - shadowedByRuleId
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - notLoaded
                  ruleId:
                    type: string
                required:
                  - kind
                  - ruleId
            type: object
      required:
        - policy
        - warnings
    credentialTypePolicyAttachmentsPublicDto.generated:
      type: object
      properties:
        attachments:
          type: array
          items:
            type: object
            properties:
              policyId:
                type: string
              rules:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      minLength: 1
                    action:
                      type: string
                      enum:
                        - allow
                        - deny
                        - delegate
                    selector:
                      oneOf:
                        - type: object
                          properties:
                            kind:
                              type: string
                              enum:
                                - name
                            value:
                              type: string
                              minLength: 1
                          required:
                            - kind
                            - value
                        - type: object
                          properties:
                            kind:
                              type: string
                              enum:
                                - package
                            value:
                              type: string
                              minLength: 1
                          required:
                            - kind
                            - value
                        - type: object
                          properties:
                            kind:
                              type: string
                              enum:
                                - extends
                            value:
                              type: string
                              minLength: 1
                          required:
                            - kind
                            - value
                          description: Matches the named credential type and every type that extends it
                      type: object
                  required:
                    - id
                    - action
                    - selector
              priority:
                type: integer
              isFloor:
                type: boolean
            required:
              - policyId
              - rules
              - priority
              - isFloor
        version:
          type: integer
          minimum: 0
          exclusiveMinimum: true
      required:
        - attachments
        - version
    credentialPublicDto.generated:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        type:
          type: string
        isManaged:
          type: boolean
        isGlobal:
          type: boolean
        isResolvable:
          type: boolean
        resolvableAllowFallback:
          type: boolean
        resolverId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        description:
          type: string
          nullable: true
          description: Present only when credential descriptions are enabled.
          example: Read-only key for the reporting database
      required:
        - id
        - name
        - type
        - isManaged
        - isGlobal
        - isResolvable
        - resolvableAllowFallback
        - resolverId
        - createdAt
        - updatedAt
    dependencyListPublicDto.generated:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - agent
                  - credential
                  - dataTable
                  - errorWorkflow
                  - errorWorkflowParent
                  - parentWorkflow
                  - subWorkflow
                description: 'The relation to the requested resource. `credential`, `dataTable`, `subWorkflow`, `errorWorkflow`: the requested workflow uses this dependency. `parentWorkflow`: this workflow uses the requested resource. `errorWorkflowParent`: this workflow uses the requested workflow as its error workflow. `agent`: this agent uses the requested resource.'
              id:
                type: string
                example: 2tUt1wbLX592XDdX
              name:
                type: string
                example: Sync customers
              projectId:
                type: string
                description: The project that owns the dependency, when it is known.
            required:
              - type
              - id
              - name
        nextCursor:
          type: string
          nullable: true
        inaccessibleCount:
          type: integer
          minimum: 0
          description: The number of dependencies that you do not have access to. They are not listed.
      required:
        - data
        - nextCursor
        - inaccessibleCount
    dataTablePublicDto.generated:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the data table
        name:
          type: string
          description: Name of the data table
        columns:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Column ID
              name:
                type: string
                description: Column name
              type:
                type: string
                description: Column data type
                enum:
                  - string
                  - number
                  - boolean
                  - date
              index:
                type: integer
                description: Column position
              createdAt:
                type: string
                format: date-time
                description: Timestamp when the column was created
              updatedAt:
                type: string
                format: date-time
                description: Timestamp when the column was last updated
            required:
              - id
              - name
              - type
              - index
              - createdAt
              - updatedAt
          description: Column definitions
        projectId:
          type: string
          description: ID of the project this table belongs to
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the table was created
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the table was last updated
        sizeBytes:
          type: integer
          description: Physical storage in bytes, including indexes and internal overhead. Not reduced immediately by row deletion, and may be a few seconds stale.
      required:
        - id
        - name
        - columns
        - projectId
        - createdAt
        - updatedAt
        - sizeBytes
    dataTableColumnPublicDto.generated:
      type: object
      properties:
        id:
          type: string
          description: Column ID
        name:
          type: string
          description: Column name
        type:
          type: string
          description: Column data type
          enum:
            - string
            - number
            - boolean
            - date
        index:
          type: integer
          description: Column position
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the column was created
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the column was last updated
        dataTableId:
          type: string
          description: ID of the data table this column belongs to
      required:
        - id
        - name
        - type
        - index
        - createdAt
        - updatedAt
        - dataTableId
    executionTagsPublicDto.generated:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
            readOnly: true
            example: 2tUt1wbLX592XDdX
          name:
            type: string
            example: Production
          createdAt:
            type: string
            format: date-time
            readOnly: true
          updatedAt:
            type: string
            format: date-time
            readOnly: true
        required:
          - id
          - name
          - createdAt
          - updatedAt
    ldapConfigurationPublicDto.generated:
      type: object
      properties:
        loginEnabled:
          type: boolean
          description: Whether LDAP login is enabled.
          example: false
        loginLabel:
          type: string
          description: Label shown on the LDAP login button.
          example: LDAP
        connectionUrl:
          type: string
          description: LDAP server URL.
          example: ldap://ldap.example.com
        allowUnauthorizedCerts:
          type: boolean
          description: Whether to allow unauthorized (self-signed) certificates.
          example: false
        connectionSecurity:
          type: string
          enum:
            - none
            - tls
            - startTls
          description: TLS/SSL security mode for the LDAP connection.
          example: none
        connectionPort:
          type: number
          description: LDAP server port.
          example: 389
        baseDn:
          type: string
          description: Base DN for LDAP search queries.
          example: dc=example,dc=com
        bindingAdminDn:
          type: string
          description: DN of the LDAP admin user for binding.
          example: cn=admin,dc=example,dc=com
        bindingAdminPassword:
          type: string
          description: Password for the LDAP admin user. Redacted on GET; returns the blanking placeholder when a password is stored, empty string when unset. Send the blanking placeholder from a prior GET to keep the stored password unchanged.
        firstNameAttribute:
          type: string
          description: LDAP attribute mapped to the user's first name.
          example: givenName
        lastNameAttribute:
          type: string
          description: LDAP attribute mapped to the user's last name.
          example: sn
        emailAttribute:
          type: string
          description: LDAP attribute mapped to the user's email.
          example: mail
        loginIdAttribute:
          type: string
          description: LDAP attribute used for login (usually the same as emailAttribute).
          example: mail
        ldapIdAttribute:
          type: string
          description: LDAP attribute that uniquely identifies a user.
          example: uid
        userFilter:
          type: string
          description: Additional LDAP filter to apply when searching for users. Use an empty string for no additional filter.
          example: (objectClass=inetOrgPerson)
        synchronizationEnabled:
          type: boolean
          description: Whether automatic LDAP synchronization is enabled.
          example: false
        synchronizationInterval:
          type: number
          description: Interval in minutes between automatic synchronizations. Ignored if synchronizationEnabled is false.
          example: 60
        searchPageSize:
          type: number
          description: Number of LDAP entries to fetch per search page.
          example: 1000
        searchTimeout:
          type: number
          description: LDAP search timeout in seconds.
          example: 60
        enforceEmailUniqueness:
          type: boolean
          description: Whether to enforce that email addresses are unique across LDAP users. When true, if two users have the same email, only the first will be imported.
          example: true
        linkExistingAccountsByEmail:
          type: boolean
          description: Whether an LDAP user may be linked to an existing n8n account that has the same email. When false, login and synchronization skip such users. Optional on PUT; the stored value is kept when omitted.
          example: true
      required:
        - loginEnabled
        - loginLabel
        - connectionUrl
        - allowUnauthorizedCerts
        - connectionSecurity
        - connectionPort
        - baseDn
        - bindingAdminDn
        - bindingAdminPassword
        - firstNameAttribute
        - lastNameAttribute
        - emailAttribute
        - loginIdAttribute
        - ldapIdAttribute
        - userFilter
        - synchronizationEnabled
        - synchronizationInterval
        - searchPageSize
        - searchTimeout
        - enforceEmailUniqueness
        - linkExistingAccountsByEmail
      description: Full LDAP configuration. Every field is returned by GET; send the full object back as PUT body.
      additionalProperties: false
    logStreamingDestinationPublicDto.generated:
      oneOf:
        - type: object
          properties:
            label:
              type: string
              minLength: 1
              description: Human-readable name shown in the UI.
              example: My destination
            enabled:
              type: boolean
              description: Whether the destination currently receives events.
              example: true
            subscribedEvents:
              type: array
              items:
                type: string
              description: Event names (or group prefixes, e.g. `n8n.workflow`, which matches all `n8n.workflow.*` events) this destination receives. Retrieve the full list of streamable event names from `GET /settings/log-streaming/event-types`.
              example:
                - n8n.workflow
                - n8n.audit
            anonymizeAuditMessages:
              type: boolean
              description: Whether audit message payloads are anonymized before being sent.
              example: false
            circuitBreaker:
              type: object
              properties:
                maxFailures:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: Maximum failures within the sliding window before the breaker opens.
                failureWindow:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: Sliding window, in milliseconds, over which failures are counted.
              description: Circuit-breaker tuning for delivery. After repeated failures the destination stops sending for a cool-down window instead of hammering an unhealthy target. All fields are optional; sensible defaults apply when omitted.
            type:
              type: string
              enum:
                - webhook
              description: Sends each event as an HTTP request to a URL.
              example: webhook
            url:
              type: string
              format: uri
              description: Target URL that receives the event payload.
              example: https://example.com/n8n-events
            method:
              type: string
              description: HTTP method used for the request.
              example: POST
            sendHeaders:
              type: boolean
              description: Whether to attach custom headers to the request.
              example: false
            specifyHeaders:
              type: string
              description: How custom headers are provided — `keypair` or `json`.
              example: keypair
            headerParameters:
              type: object
              properties:
                parameters:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: Authorization
                      value:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - {}
                          - {}
                        description: Parameter value. Usually a string; numbers, booleans and null are also accepted.
                        example: Bearer <token>
                    required:
                      - name
                      - value
              required:
                - parameters
              description: Key-value pairs used when the matching `specify*` field is `keypair`.
            jsonHeaders:
              type: string
              description: Custom headers as a JSON string when `specifyHeaders` is `json`.
            sendQuery:
              type: boolean
              description: Whether to attach query parameters to the request.
              example: false
            specifyQuery:
              type: string
              description: How query parameters are provided — `keypair` or `json`.
            queryParameters:
              type: object
              properties:
                parameters:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: Authorization
                      value:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - {}
                          - {}
                        description: Parameter value. Usually a string; numbers, booleans and null are also accepted.
                        example: Bearer <token>
                    required:
                      - name
                      - value
              required:
                - parameters
              description: Key-value pairs used when the matching `specify*` field is `keypair`.
            jsonQuery:
              type: string
              description: Query parameters as a JSON string when `specifyQuery` is `json`.
            options:
              type: object
              properties:
                timeout:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: Request timeout in milliseconds.
                allowUnauthorizedCerts:
                  type: boolean
                  description: Accept self-signed or otherwise invalid TLS certificates.
                queryParameterArrays:
                  type: string
                  enum:
                    - indices
                    - brackets
                    - repeat
                  description: How array-valued query parameters are serialized into the query string.
                redirect:
                  type: object
                  properties:
                    redirect:
                      type: object
                      properties:
                        followRedirects:
                          type: boolean
                          description: Whether to follow HTTP redirects.
                        maxRedirects:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Maximum number of redirects to follow.
                  required:
                    - redirect
                  description: Redirect-following behaviour.
                proxy:
                  type: object
                  properties:
                    proxy:
                      type: object
                      properties:
                        protocol:
                          type: string
                          enum:
                            - https
                            - http
                          description: Proxy protocol.
                        host:
                          type: string
                          description: Proxy host, without protocol or port.
                        port:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Proxy port.
                      required:
                        - protocol
                        - host
                        - port
                  required:
                    - proxy
                  description: Outbound proxy configuration.
                socket:
                  type: object
                  properties:
                    keepAlive:
                      type: boolean
                      description: Whether to keep sockets open for reuse.
                    maxSockets:
                      type: integer
                      minimum: 0
                      exclusiveMinimum: true
                      description: Maximum sockets per host kept open at once.
                    maxFreeSockets:
                      type: integer
                      minimum: 0
                      exclusiveMinimum: true
                      description: Maximum idle sockets per host kept open.
                  description: Connection socket options.
              description: Additional HTTP request options.
            id:
              type: string
              description: Server-generated unique id of the destination. Returned in responses; not accepted in requests.
              example: 88be6560-bfb4-455c-8aa1-06971e9e5522
          required:
            - type
            - url
            - id
        - type: object
          properties:
            label:
              type: string
              minLength: 1
              description: Human-readable name shown in the UI.
              example: My destination
            enabled:
              type: boolean
              description: Whether the destination currently receives events.
              example: true
            subscribedEvents:
              type: array
              items:
                type: string
              description: Event names (or group prefixes, e.g. `n8n.workflow`, which matches all `n8n.workflow.*` events) this destination receives. Retrieve the full list of streamable event names from `GET /settings/log-streaming/event-types`.
              example:
                - n8n.workflow
                - n8n.audit
            anonymizeAuditMessages:
              type: boolean
              description: Whether audit message payloads are anonymized before being sent.
              example: false
            circuitBreaker:
              type: object
              properties:
                maxFailures:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: Maximum failures within the sliding window before the breaker opens.
                failureWindow:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: Sliding window, in milliseconds, over which failures are counted.
              description: Circuit-breaker tuning for delivery. After repeated failures the destination stops sending for a cool-down window instead of hammering an unhealthy target. All fields are optional; sensible defaults apply when omitted.
            type:
              type: string
              enum:
                - syslog
              description: Sends each event to a syslog server.
              example: syslog
            host:
              type: string
              minLength: 1
              description: Syslog server host.
              example: syslog.example.com
            port:
              type: integer
              minimum: 0
              exclusiveMinimum: true
              description: Syslog server port.
              example: 514
            protocol:
              type: string
              enum:
                - udp
                - tcp
                - tls
              description: Transport protocol.
              example: udp
            facility:
              type: integer
              minimum: 0
              maximum: 23
              description: 'Syslog facility code (0–23, per RFC 5424). Common values: 0 Kernel, 1 User, 3 System, 13 Audit, 14 Alert, 16 Local0, 17 Local1, 18 Local2, 19 Local3, 20 Local4, 21 Local5, 22 Local6, 23 Local7.'
              example: 16
            app_name:
              type: string
              description: Application name reported in the syslog message.
              example: n8n
            tlsCa:
              type: string
              description: PEM-encoded CA certificate used when `protocol` is `tls`.
            id:
              type: string
              description: Server-generated unique id of the destination. Returned in responses; not accepted in requests.
              example: 88be6560-bfb4-455c-8aa1-06971e9e5522
          required:
            - type
            - host
            - id
        - type: object
          properties:
            label:
              type: string
              minLength: 1
              description: Human-readable name shown in the UI.
              example: My destination
            enabled:
              type: boolean
              description: Whether the destination currently receives events.
              example: true
            subscribedEvents:
              type: array
              items:
                type: string
              description: Event names (or group prefixes, e.g. `n8n.workflow`, which matches all `n8n.workflow.*` events) this destination receives. Retrieve the full list of streamable event names from `GET /settings/log-streaming/event-types`.
              example:
                - n8n.workflow
                - n8n.audit
            anonymizeAuditMessages:
              type: boolean
              description: Whether audit message payloads are anonymized before being sent.
              example: false
            circuitBreaker:
              type: object
              properties:
                maxFailures:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: Maximum failures within the sliding window before the breaker opens.
                failureWindow:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: Sliding window, in milliseconds, over which failures are counted.
              description: Circuit-breaker tuning for delivery. After repeated failures the destination stops sending for a cool-down window instead of hammering an unhealthy target. All fields are optional; sensible defaults apply when omitted.
            type:
              type: string
              enum:
                - sentry
              description: Sends each event to a Sentry project.
              example: sentry
            dsn:
              type: string
              format: uri
              description: Sentry DSN the events are sent to.
              example: https://examplePublicKey@o0.ingest.sentry.io/0
            id:
              type: string
              description: Server-generated unique id of the destination. Returned in responses; not accepted in requests.
              example: 88be6560-bfb4-455c-8aa1-06971e9e5522
          required:
            - type
            - dsn
            - id
      description: 'A log streaming destination. The `type` field selects the variant and its type-specific fields: `webhook`, `syslog`, or `sentry`.'
      type: object
    importResultDto.generated:
      type: object
      properties:
        package:
          type: object
          properties:
            sourceN8nVersion:
              type: string
            sourceId:
              type: string
          required:
            - sourceN8nVersion
            - sourceId
        agents:
          type: array
          items:
            type: object
            properties:
              sourceAgentId:
                type: string
                description: Agent ID in the package.
              localId:
                type: string
                description: Agent ID on the target instance. New Agents use the package ID. Updated and skipped Agents keep their destination ID.
              name:
                type: string
              projectId:
                type: string
              activeVersionId:
                type: string
                nullable: true
                description: Published version on the target after import. Null when no version is published.
              status:
                type: string
                enum:
                  - created
                  - updated
                  - skipped
              publishing:
                type: object
                properties:
                  state:
                    type: string
                    enum:
                      - published
                      - unpublished
                      - unchanged
                      - blocked
                      - failed
                    description: '`blocked` means the imported version could not be published and no version is active (for example because the Agent or workflow uses an empty or incomplete credential, or a node type this instance does not have, or an Agent channel needs setup while publication is requested). When a prior published version remains active, `state` is `unchanged` with `skippedPublishReason` instead. `failed` means publish or unpublish was attempted but did not succeed.'
                  error:
                    type: string
                    description: Present when `state` is `failed`. Explains why publish or unpublish could not be applied.
                  blockedReason:
                    type: string
                    enum:
                      - stub-credential
                      - incomplete-credential
                      - missing-node-type
                      - channel-setup-required
                    description: 'Present when `state` is `blocked`: the imported version could not be published and no version is active.'
                  skippedPublishReason:
                    type: string
                    enum:
                      - stub-credential
                      - incomplete-credential
                      - missing-node-type
                      - channel-setup-required
                    description: 'Present when `state` is `unchanged` but the policy wanted to publish the imported version: a prior published version is still active (for example after an update with empty or incomplete credentials).'
                required:
                  - state
                description: Publication outcome. A failed publication does not undo the definition import.
              channels:
                type: array
                items:
                  oneOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          description: Channel type, for example `slack`.
                        status:
                          type: string
                          enum:
                            - reused
                          description: The import kept the channel connection that the destination Agent already had.
                      required:
                        - type
                        - status
                    - type: object
                      properties:
                        type:
                          type: string
                          description: Channel type, for example `slack`.
                        status:
                          type: string
                          enum:
                            - setup-required
                          description: The import saved the channel settings without a connection. Set up the channel in the destination before the Agent can be published.
                        reason:
                          type: string
                          enum:
                            - new-channel
                            - destination-draft
                          description: '`new-channel`: the destination Agent had no connection for this channel. `destination-draft`: the destination Agent has this channel, but its setup is not complete.'
                        setupUrl:
                          type: string
                          description: Link to the destination Agent, where you can set up the channel.
                      required:
                        - type
                        - status
                        - reason
                        - setupUrl
                  type: object
                description: Channel outcome for each external channel in the imported definition. A credential from the package never connects a channel. Empty for skipped Agents.
            required:
              - sourceAgentId
              - localId
              - name
              - projectId
              - activeVersionId
              - status
              - publishing
              - channels
        counts:
          type: object
          properties:
            agents:
              type: object
              properties:
                created:
                  type: integer
                  minimum: 0
                updated:
                  type: integer
                  minimum: 0
                skipped:
                  type: integer
                  minimum: 0
              required:
                - created
                - updated
                - skipped
          required:
            - agents
        workflows:
          type: array
          items:
            type: object
            properties:
              sourceWorkflowId:
                type: string
                description: Workflow id as it appeared in the package.
              localId:
                type: string
                description: Workflow ID on the target instance. New workflows use the package ID. Updated and skipped workflows keep their destination ID.
              name:
                type: string
              projectId:
                type: string
              parentFolderId:
                type: string
                nullable: true
              activeVersionId:
                type: string
                nullable: true
                description: Published version on the target instance, if any. `null` when the workflow is not published after import.
              isArchived:
                type: boolean
                description: Whether the workflow is archived on the target after import. Under `new-version` this follows the package's `isArchived` flag. A skipped workflow keeps its own state.
              publishing:
                type: object
                properties:
                  state:
                    type: string
                    enum:
                      - published
                      - unpublished
                      - unchanged
                      - blocked
                      - failed
                    description: '`blocked` means the imported version could not be published and no version is active (for example because the Agent or workflow uses an empty or incomplete credential, or a node type this instance does not have, or an Agent channel needs setup while publication is requested). When a prior published version remains active, `state` is `unchanged` with `skippedPublishReason` instead. `failed` means publish or unpublish was attempted but did not succeed.'
                  error:
                    type: string
                    description: Present when `state` is `failed`. Explains why publish or unpublish could not be applied.
                  blockedReason:
                    type: string
                    enum:
                      - stub-credential
                      - incomplete-credential
                      - missing-node-type
                      - channel-setup-required
                    description: 'Present when `state` is `blocked`: the imported version could not be published and no version is active.'
                  skippedPublishReason:
                    type: string
                    enum:
                      - stub-credential
                      - incomplete-credential
                      - missing-node-type
                      - channel-setup-required
                    description: 'Present when `state` is `unchanged` but the policy wanted to publish the imported version: a prior published version is still active (for example after an update with empty or incomplete credentials).'
                required:
                  - state
                description: Outcome of applying the selected publishing policy to this workflow.
              status:
                type: string
                enum:
                  - created
                  - updated
                  - skipped
                description: Import outcome for this package workflow.
            required:
              - sourceWorkflowId
              - localId
              - name
              - projectId
              - parentFolderId
              - activeVersionId
              - isArchived
              - publishing
              - status
        removedWorkflows:
          type: array
          items:
            type: object
            properties:
              workflowId:
                type: string
                description: Id of the removed workflow on this instance.
              name:
                type: string
              projectId:
                type: string
                description: Project the workflow was reconciled against.
              parentFolderId:
                type: string
                nullable: true
                description: Folder that held the workflow, or null at the project root.
              deletion:
                type: string
                enum:
                  - archived
                  - deleted
                description: 'What actually happened, not what `overwriteDeletionPolicy` asked for: a `hard-delete` whose row could not be dropped yet is reported as `archived`.'
            required:
              - workflowId
              - name
              - projectId
              - parentFolderId
              - deletion
          description: Workflows removed from the target during this import.
        removedFolders:
          type: array
          items:
            type: object
            properties:
              folderId:
                type: string
              name:
                type: string
              projectId:
                type: string
              parentFolderId:
                type: string
                nullable: true
                description: Folder that held it, or null at the project root.
            required:
              - folderId
              - name
              - projectId
              - parentFolderId
          description: Folders the package does not define that reconciliation left empty, removed by `folderConflictPolicy=overwrite`. A folder still holding anything survives, so target-only content is never swept up. Empty under every other policy.
        folders:
          type: array
          items:
            type: object
            properties:
              sourceFolderId:
                type: string
                description: Folder id as it appeared in the package.
              localId:
                type: string
                description: Folder id on the target instance (equal to `sourceFolderId`; folder ids are reused).
              name:
                type: string
              parentFolderId:
                type: string
                nullable: true
                description: Resolved parent folder on the target, or `null` at the project root.
              status:
                type: string
                enum:
                  - created
                  - skipped
                description: Import outcome for this package folder.
            required:
              - sourceFolderId
              - localId
              - name
              - parentFolderId
              - status
          description: Folder shells created or skipped in the target project.
        projects:
          type: array
          items:
            type: object
            properties:
              sourceProjectId:
                type: string
                description: Project id as it appeared in the package.
              localId:
                type: string
                description: Project id on the target instance (equal to `sourceProjectId`; project ids are reused).
              name:
                type: string
                description: "The project's name on the target: the package's under `overwrite`, the pre-existing one under `merge`."
              status:
                type: string
                enum:
                  - created
                  - updated
                  - skipped
                description: Import outcome for this package project. `skipped` means the project already existed and `projectConflictPolicy=merge` left its details untouched — its contents were still imported.
            required:
              - sourceProjectId
              - localId
              - name
              - status
          description: Project shells created, or matched and then updated or left as-is (see `projectConflictPolicy`). Present for project packages; empty when importing loose workflows/folders.
        bindings:
          type: object
          properties:
            agents:
              type: object
              additionalProperties:
                type: string
              description: Source-to-target IDs for created, updated, and skipped package Agents.
            workflows:
              type: object
              additionalProperties:
                type: string
            credentials:
              type: object
              additionalProperties:
                type: string
              description: Credential id from `requirements.credentials` in the package manifest → resolved target credential id on the target instance. Covers both a matched existing credential and a credential that the import created under `credentialMissingMode=create-stub` or `create-with-values`.
          required:
            - agents
            - workflows
            - credentials
          description: Source id → target id mappings produced during import, one map per entity type. Each value maps an id as it appeared in the package to the id on the target instance.
        credentials:
          type: object
          properties:
            matched:
              type: array
              items:
                type: string
              description: Source credential ids from the package that matched existing credentials on the target instance.
            stubbed:
              type: array
              items:
                type: string
              description: Source credential ids for which empty placeholder credentials were created in the target project.
            seeded:
              type: array
              items:
                type: string
              description: Source credential ids for which credentials were created in the target project with all their source data from the bundled expression values.
            incomplete:
              type: array
              items:
                type: string
              description: Source credential ids for which credentials were created in the target project with bundled expression values, but the package does not confirm that it carries all source data. These credentials need input. The import does not publish the imported version of workflows that use them (`incomplete-credential`).
            updated:
              type: array
              items:
                type: string
              description: Source credential ids whose matched credential this import changed under `credentialConflictPolicy=overwrite`. These ids are not listed under `matched`. Empty for other policies.
          required:
            - matched
            - stubbed
            - seeded
            - incomplete
            - updated
          description: Source credential ids grouped by whether they matched an existing credential, were created as empty stubs, seeded credentials, or incomplete credentials, or matched a credential that this import updated. Full source→target id mapping is in `bindings.credentials`.
        dataTables:
          type: object
          properties:
            matched:
              type: integer
              minimum: 0
            created:
              type: integer
              minimum: 0
            updated:
              type: integer
              minimum: 0
          required:
            - matched
            - created
            - updated
        variables:
          type: object
          properties:
            matched:
              type: array
              items:
                type: string
              description: Variable names that resolved to an existing variable (importing project's scope first, then global) and were left untouched. A resolved variable this import rewrote is listed under `updated` instead.
            missing:
              type: array
              items:
                type: string
              description: Variable names still unresolved after import. Under `variableMissingMode=do-nothing` these are warnings — the import still succeeds and nothing is created. A successful `create-stub` or `create-with-value` import normally leaves this empty.
            created:
              type: array
              items:
                type: string
              description: Variable names created with a package value under `variableMissingMode=create-with-value`. Empty stubs are listed under `stubbed`.
            stubbed:
              type: array
              items:
                type: string
              description: Variable names created with an empty value by this import under `variableMissingMode=create-stub`, or because `create-with-value` had no exported value. Empty for other outcomes.
            updated:
              type: array
              items:
                type: string
              description: Variable names whose existing value this import replaced with the package value under `variableConflictPolicy=overwrite`. Empty for other policies.
          required:
            - matched
            - missing
            - created
            - stubbed
            - updated
          description: Resolution of the package's variable requirements. Names only — values never travel in the response. For project packages these arrays are package-level unions of per-destination outcomes and may overlap (for example, a name may be created with a value in one project and stubbed in another); classification under concurrent external writes is best-effort.
        tags:
          type: object
          properties:
            matched:
              type: array
              items:
                type: string
              description: Tags that resolved to an existing tag with the same id and name; attached as-is.
            created:
              type: array
              items:
                type: string
              description: Tags created by this import, by name, under `tagMissingMode=create`.
            renamed:
              type: array
              items:
                type: string
              description: Target tags renamed to the package name under `tagConflictPolicy=rename`; listed by their new name.
            reconciled:
              type: array
              items:
                type: string
              description: Existing target tags re-keyed to the package (source) id on a name collision under `tagConflictPolicy=rename`; their name, workflow and folder taggings are kept.
            skipped:
              type: array
              items:
                type: string
              description: Tags dropped from the import — not created, not renamed, and not attached to any imported workflow — under `tagMissingMode=do-nothing` or `tagConflictPolicy=skip`.
          required:
            - matched
            - created
            - renamed
            - reconciled
            - skipped
          description: Resolution of the tags referenced by the imported workflows, matched by source id. Tag names only.
      required:
        - package
        - agents
        - counts
        - workflows
        - removedWorkflows
        - removedFolders
        - folders
        - projects
        - bindings
        - credentials
        - dataTables
        - variables
        - tags
    packageRequirementConsumer.generated:
      type: object
      properties:
        kind:
          type: string
          enum:
            - workflow
            - agent
        id:
          type: string
          minLength: 1
      required:
        - kind
        - id
    importBlockingIssue.generated:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - agent-conflict
            kind:
              type: string
              enum:
                - existing
                - id
                - task-id
            sourceAgentId:
              type: string
            projectId:
              type: string
            sourceTaskId:
              type: string
            targetIds:
              type: array
              items:
                type: string
          required:
            - type
            - kind
            - sourceAgentId
            - projectId
            - targetIds
        - type: object
          properties:
            type:
              type: string
              enum:
                - agent-invalid
            sourceAgentId:
              type: string
            path:
              type: string
            message:
              type: string
          required:
            - type
            - sourceAgentId
            - path
            - message
        - type: object
          properties:
            type:
              type: string
              enum:
                - agent-dependency-unresolved
            sourceAgentId:
              type: string
            projectId:
              type: string
            dependencyType:
              type: string
              enum:
                - agent
                - workflow
                - credential
            referenceId:
              type: string
            path:
              type: string
            reason:
              type: string
              enum:
                - missing
                - inaccessible
                - ambiguous
                - unsupported
          required:
            - type
            - sourceAgentId
            - projectId
            - dependencyType
            - referenceId
            - path
            - reason
        - type: object
          properties:
            type:
              type: string
              enum:
                - agent-policy-violation
            sourceAgentId:
              type: string
            name:
              type: string
            violations:
              type: array
              items:
                type: object
                properties:
                  kind:
                    type: string
                  checkId:
                    type: string
                  message:
                    type: string
                  subject:
                    type: string
                  subjectType:
                    type: string
                  scope:
                    type: string
                  matchedRuleId:
                    type: string
                  projectId:
                    type: string
                  optInAvailable:
                    type: boolean
                required:
                  - kind
                  - checkId
                  - message
          required:
            - type
            - sourceAgentId
            - name
            - violations
        - type: object
          properties:
            type:
              type: string
              enum:
                - workflow-conflict
            sourceWorkflowId:
              type: string
            existingWorkflowId:
              type: string
            name:
              type: string
          required:
            - type
            - sourceWorkflowId
            - existingWorkflowId
            - name
          description: A workflow whose source id already matches one in the target project, under the `fail` conflict policy.
        - type: object
          properties:
            type:
              type: string
              enum:
                - workflow-lineage-conflict
            sourceWorkflowId:
              type: string
            projectId:
              type: string
            existingWorkflows:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  isArchived:
                    type: boolean
                required:
                  - id
                  - name
                  - isArchived
          required:
            - type
            - sourceWorkflowId
            - projectId
            - existingWorkflows
          description: A package workflow whose source id matches multiple workflows in the target project. The import cannot choose a workflow safely.
        - type: object
          properties:
            type:
              type: string
              enum:
                - workflow-id-conflict
            sourceWorkflowId:
              type: string
            existingWorkflowId:
              type: string
            existingProjectId:
              type: string
              nullable: true
              description: Project that owns the existing workflow, or null when no owning project could be determined.
            isArchived:
              type: boolean
              description: Whether the existing workflow is archived.
            name:
              type: string
          required:
            - type
            - sourceWorkflowId
            - existingWorkflowId
            - existingProjectId
            - isArchived
            - name
          description: A `source`-policy workflow whose id is already taken on the instance. Workflow ids are globally unique, so the id cannot be created in the target project. The existing workflow can be in another project, can lack an owner share, or can use a different source id. It can also be archived.
        - type: object
          properties:
            type:
              type: string
              enum:
                - workflow-folder-conflict
            sourceWorkflowId:
              type: string
            existingWorkflowId:
              type: string
            existingParentFolderId:
              type: string
              nullable: true
              description: Folder that currently contains the matched workflow, or null when it lives at the project root.
            targetFolderId:
              type: string
              nullable: true
              description: Folder the import was requested to land in, or null when a project package puts the workflow at the project root.
            name:
              type: string
          required:
            - type
            - sourceWorkflowId
            - existingWorkflowId
            - existingParentFolderId
            - targetFolderId
            - name
          description: A workflow whose source id already matches one in the target project but lives in a different folder than the import target. An import cannot move a workflow while it updates it in place. For a project package, the project root is a target too.
        - type: object
          properties:
            type:
              type: string
              enum:
                - workflow-archive-forbidden
            sourceWorkflowId:
              type: string
            existingWorkflowId:
              type: string
            name:
              type: string
            projectId:
              type: string
              description: Project that owns the matched workflow.
            transition:
              type: string
              enum:
                - archive
                - unarchive
              description: The step the import needs to bring the workflow to the package's state.
          required:
            - type
            - sourceWorkflowId
            - existingWorkflowId
            - name
            - projectId
            - transition
          description: A matched workflow whose archived state differs from the package, so the import must archive or unarchive it, but the caller lacks `workflow:delete` on it. Reported at plan time so nothing is written.
        - type: object
          properties:
            type:
              type: string
              enum:
                - credential-unresolved
            kind:
              type: string
              enum:
                - not_found
                - unknown_type
                - source_not_found
                - type_mismatch
            reason:
              type: string
              enum:
                - not-on-instance
                - access-required
                - incompatible-usage-scope
              description: 'For `not_found` of a credential named by id, when the caller can read all credentials: `not-on-instance` (no credential has the id), `access-required` (the credential exists, but it is not shared with the target project), or `incompatible-usage-scope` (the credential is not a project credential).'
            sourceId:
              type: string
            targetId:
              type: string
              description: 'Target credential id: for `not_found`, the explicit binding that could not be resolved; for `type_mismatch`, the credential id that was resolved — via an explicit binding or automatic matching — but has the wrong type.'
            expectedType:
              type: string
              description: "For `type_mismatch`: the credential type the package's workflow node requires."
            actualType:
              type: string
              description: 'For `type_mismatch`: the actual type of the resolved target credential.'
            usedBy:
              type: array
              items:
                $ref: '#/components/schemas/packageRequirementConsumer.generated'
          required:
            - type
            - kind
            - sourceId
            - usedBy
          description: A credential reference that could not be resolved in the target project.
        - type: object
          properties:
            type:
              type: string
              enum:
                - credential-conflict
            kind:
              type: string
              enum:
                - differs
                - divergent
              description: '`differs`: under `credentialConflictPolicy=fail`, the package would change the name or values of the destination credential. `divergent`: under `overwrite`, two or more package credentials with different names or values resolve to one destination credential. The import does not select one of them.'
            targetId:
              type: string
              description: Id of the destination credential.
            sourceIds:
              type: array
              items:
                type: string
              description: Ids of the package credentials that resolve to the destination credential. For `differs`, the package credentials that would change it.
            name:
              type: string
              description: Name of the destination credential.
            usedBy:
              type: array
              items:
                $ref: '#/components/schemas/packageRequirementConsumer.generated'
              description: Package consumers that use the listed package credentials.
          required:
            - type
            - kind
            - targetId
            - sourceIds
            - name
            - usedBy
          description: 'A matched credential that the credential conflict policy does not let the import change. Only a credential that the import can update is checked: a credential owned by a project of the import. Values are never reported.'
        - type: object
          properties:
            type:
              type: string
              enum:
                - credential-update-forbidden
            targetId:
              type: string
              description: Id of the destination credential.
            sourceIds:
              type: array
              items:
                type: string
              description: Ids of the package credentials that resolve to it.
            name:
              type: string
              description: Name of the destination credential.
            usedBy:
              type: array
              items:
                $ref: '#/components/schemas/packageRequirementConsumer.generated'
              description: Package consumers that use the listed package credentials.
          required:
            - type
            - targetId
            - sourceIds
            - name
            - usedBy
          description: A matched credential that the import can update, but the caller has no `credential:update` permission on it. Only under `credentialConflictPolicy` `overwrite` or `fail`. The import does not read its values, so this blocks also when the package would not change it. Use `keep-existing` to bind it without a change.
        - type: object
          properties:
            type:
              type: string
              enum:
                - project-conflict
            kind:
              type: string
              enum:
                - fail-policy
                - not-team
                - update-forbidden
                - create-forbidden
                - license
              description: '`fail-policy`: the project exists and `projectConflictPolicy` is `fail`. The import endpoints return only this kind. They report the other kinds as a 403 error: `not-team` (the id belongs to a personal project), `update-forbidden`, `create-forbidden`, and `license` (the license does not allow team projects).'
            sourceProjectId:
              type: string
            name:
              type: string
              description: The project's name as it appears in the package.
          required:
            - type
            - kind
            - sourceProjectId
            - name
          description: A project defined by the package that already exists on this instance, under `projectConflictPolicy=fail`.
        - type: object
          properties:
            type:
              type: string
              enum:
                - folder-conflict
            kind:
              type: string
              enum:
                - parent-mismatch
                - id-in-other-project
                - fail-policy
            sourceFolderId:
              type: string
            name:
              type: string
            existingParentFolderId:
              type: string
              nullable: true
              description: "For `parent-mismatch`: the matched folder's current parent in the target."
            expectedParentFolderId:
              type: string
              nullable: true
              description: 'For `parent-mismatch`: the parent the package would place the folder under.'
            existingProjectId:
              type: string
              nullable: true
              description: 'For `id-in-other-project`: the project that already owns the id.'
          required:
            - type
            - kind
            - sourceFolderId
            - name
          description: 'A package folder that cannot be imported as-is. `kind` distinguishes the cause: `parent-mismatch` (a folder matched by id sits under a different parent than the package places it), `id-in-other-project` (the folder id already exists in a different project — ids are globally unique), or `fail-policy` (the folder already exists and `folderConflictPolicy` is `fail`).'
        - type: object
          properties:
            type:
              type: string
              enum:
                - workflow-removal-forbidden
            workflowId:
              type: string
            name:
              type: string
            projectId:
              type: string
              description: Project the workflow was being reconciled against.
          required:
            - type
            - workflowId
            - name
            - projectId
          description: "A workflow the import would remove but the caller lacks `workflow:delete` on: either `folderConflictPolicy=overwrite` would remove it because the package does not contain it, or it is named in the selection's `deletedWorkflowIds`. Reported instead of removing a subset, which would leave the project matching neither the package nor its previous state."
        - type: object
          properties:
            type:
              type: string
              enum:
                - workflow-removal-conflict
            sourceWorkflowId:
              type: string
            workflowId:
              type: string
              description: The destination id of the selected workflow.
            projectId:
              type: string
          required:
            - type
            - sourceWorkflowId
            - workflowId
            - projectId
          description: A selected workflow resolves to a destination id in `deletedWorkflowIds`. The import stops before any writes, including when the conflict policy is `skip`.
        - type: object
          properties:
            type:
              type: string
              enum:
                - folder-removal-forbidden
            folderId:
              type: string
            name:
              type: string
            projectId:
              type: string
              description: Project the folder was being reconciled against.
          required:
            - type
            - folderId
            - name
            - projectId
          description: A folder that `folderConflictPolicy=overwrite` would delete — the package does not define it and reconciliation leaves it empty — but the caller lacks `folder:delete` on the target project. Reported instead of removing a subset, which would leave the project matching neither the package nor its previous state.
        - type: object
          properties:
            type:
              type: string
              enum:
                - data-table-unresolved
            kind:
              type: string
              enum:
                - missing
                - id-conflict
                - name-conflict
                - schema-incompatible
                - module-disabled
                - permission-denied
                - column-id-conflict
            sourceId:
              type: string
              description: Absent for import-wide failures (`module-disabled`, `permission-denied`).
            name:
              type: string
            existingProjectId:
              type: string
              description: 'For `id-conflict`: the project owning the conflicting target table.'
            missingColumns:
              type: array
              items:
                type: string
              description: 'For `schema-incompatible`: package columns absent from the target table.'
            typeMismatches:
              type: array
              items:
                type: object
                properties:
                  column:
                    type: string
                  expectedType:
                    type: string
                  actualType:
                    type: string
                required:
                  - column
                  - expectedType
                  - actualType
              description: 'For `schema-incompatible`: package columns whose target type differs.'
            extraColumns:
              type: array
              items:
                type: string
              description: 'For `schema-incompatible` under the `fail` policy: target columns not in the package schema.'
            overwriteChanges:
              type: array
              items:
                oneOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - add-column
                      column:
                        type: string
                      type:
                        type: string
                        enum:
                          - string
                          - number
                          - boolean
                          - date
                      destructive:
                        type: boolean
                        enum:
                          - false
                    required:
                      - kind
                      - column
                      - type
                      - destructive
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - remove-column
                      column:
                        type: string
                      type:
                        type: string
                        enum:
                          - string
                          - number
                          - boolean
                          - date
                      destructive:
                        type: boolean
                        enum:
                          - true
                    required:
                      - kind
                      - column
                      - type
                      - destructive
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - change-column-type
                      column:
                        type: string
                      from:
                        type: string
                        enum:
                          - string
                          - number
                          - boolean
                          - date
                      to:
                        type: string
                        enum:
                          - string
                          - number
                          - boolean
                          - date
                      destructive:
                        type: boolean
                        enum:
                          - true
                    required:
                      - kind
                      - column
                      - from
                      - to
                      - destructive
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - rename-column
                      from:
                        type: string
                      to:
                        type: string
                      destructive:
                        type: boolean
                        enum:
                          - false
                    required:
                      - kind
                      - from
                      - to
                      - destructive
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - reorder-columns
                      destructive:
                        type: boolean
                        enum:
                          - false
                    required:
                      - kind
                      - destructive
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - rename-table
                      from:
                        type: string
                      to:
                        type: string
                      destructive:
                        type: boolean
                        enum:
                          - false
                    required:
                      - kind
                      - from
                      - to
                      - destructive
                description: A single change `dataTableSchemaConflictPolicy=overwrite` would make (or made) to a matched target table's schema. `destructive` operations remove the values in a column.
                type: object
              description: 'For `schema-incompatible`: the changes `overwrite` would make to the target table.'
            missingScope:
              type: string
              enum:
                - dataTable:create
                - dataTable:update
              description: 'For `permission-denied`: the project scope the user lacks.'
            conflictingTableId:
              type: string
              description: 'For `name-conflict`: the other table that holds or claims the name.'
            currentName:
              type: string
              description: "For a rename `name-conflict`: the matched table's current name."
            column:
              type: object
              properties:
                id:
                  type: string
                name:
                  type: string
              required:
                - id
                - name
              description: 'For `column-id-conflict`: the package column whose id a column of another table already uses. The import endpoints do not return this. They fail with an error.'
            usedBy:
              type: array
              items:
                $ref: '#/components/schemas/packageRequirementConsumer.generated'
          required:
            - type
            - kind
            - usedBy
          description: A data table referenced by the package's workflows that could not be resolved against the target project — under `dataTableMissingMode=must-preexist` or `dataTableSchemaConflictPolicy`, or because the data table module is disabled on this instance, or the caller lacks the scope the resolution needs.
        - type: object
          properties:
            type:
              type: string
              enum:
                - tag-unresolved
            kind:
              type: string
              enum:
                - rename-drift
                - name-collision
                - invalid-name
                - invalid-id
                - permission-denied
            sourceId:
              type: string
              description: Tag id as it appears in the package. Absent for `permission-denied`.
            name:
              type: string
              description: The (trimmed) package tag name. Absent for `permission-denied`.
            missingScope:
              type: string
              enum:
                - tag:create
                - tag:update
              description: 'For `permission-denied`: the global scope the importing user lacks.'
            existingTagId:
              type: string
              description: Id of the contested target tag — the different tag currently holding the wanted name, or the target tag a blocked reconcile would re-key. Absent when two package tags collide with each other rather than over a target tag.
            existingName:
              type: string
              description: 'For `rename-drift`: the current name of the same-id target tag.'
            usedBy:
              type: array
              items:
                $ref: '#/components/schemas/packageRequirementConsumer.generated'
              description: Package consumers that reference the source tag. This excludes skipped consumers and workflows attached to the contested target tag.
          required:
            - type
            - kind
            - usedBy
          description: "A tag referenced by the package's workflows that could not be resolved on the target instance. `kind` distinguishes the cause: `rename-drift` (the same-id target tag carries a different name — under `tagConflictPolicy=fail`, or `rename` when the package name is held by another tag), `name-collision` (the id is free but the name belongs to a different tag under `tagMissingMode=create` with `tagConflictPolicy=fail`; also raised when two package tags collide with each other, or when the target tag a reconcile would re-key is claimed by another package tag), `invalid-name` / `invalid-id` (the package tag's name or id cannot be written on this instance), or `permission-denied` (the importing user lacks the global `tag:create` / `tag:update` scope the plan needs)."
        - type: object
          properties:
            type:
              type: string
              enum:
                - variable-unresolved
            name:
              type: string
              description: Requirement name with no match in the target project or global scope.
            usedBy:
              type: array
              items:
                $ref: '#/components/schemas/packageRequirementConsumer.generated'
          required:
            - type
            - name
            - usedBy
          description: A variable reference that could not be resolved in the target project or the global scope, under `variableMissingMode=must-preexist`.
        - type: object
          properties:
            type:
              type: string
              enum:
                - variable-conflict
            name:
              type: string
              description: Name of the variable whose value differs.
            projectId:
              type: string
              description: Project owning the resolved variable. Absent when it resolved at the global scope.
            usedBy:
              type: array
              items:
                $ref: '#/components/schemas/packageRequirementConsumer.generated'
          required:
            - type
            - name
            - usedBy
          description: A variable that resolved in the target project or the global scope, but whose value differs from the one the package bundles for it, under `variableConflictPolicy=fail`. Also reported under `overwrite`, once per scope, when the projects of a package resolve one row and disagree about the value it should hold. Values are never reported — only the name and the scope the variable was found in.
        - type: object
          properties:
            type:
              type: string
              enum:
                - variable-limit-exceeded
            limit:
              type: integer
              description: The instance variable quota.
            remaining:
              type: integer
              description: Variable rows still available under the quota. The import is blocked because `requested` exceeds this, not because it exceeds `limit`.
            requested:
              type: integer
              description: Number of new variable rows the import would create (destination-deduplicated).
            names:
              type: array
              items:
                type: string
              description: The unique variable names the import would create.
            usedBy:
              type: array
              items:
                $ref: '#/components/schemas/packageRequirementConsumer.generated'
              description: Package consumers that reference any of the listed variables.
          required:
            - type
            - limit
            - remaining
            - requested
            - names
            - usedBy
          description: Creating the package's variables under `create-stub` or `create-with-value` would exceed the instance variable quota (`quota:maxVariables`). Reported once for the whole import; nothing is created.
        - type: object
          properties:
            type:
              type: string
              enum:
                - missing-node-type
            nodeType:
              type: string
              description: Full node type name as used by the package's workflows.
            typeVersion:
              type: number
              description: Node type version the package's workflows use.
            usedBy:
              type: array
              items:
                $ref: '#/components/schemas/packageRequirementConsumer.generated'
              description: Package consumers that use this node type and version.
          required:
            - type
            - nodeType
            - typeVersion
            - usedBy
          description: A node type — or a version of a node type — used by a package workflow that this instance does not have, under `missingNodeTypeMode=fail`. One issue is reported per missing `(nodeType, typeVersion)` pair.
        - type: object
          properties:
            type:
              type: string
              enum:
                - policy-violation
            sourceWorkflowId:
              type: string
              description: Workflow id as it appears in the package.
            name:
              type: string
            violations:
              type: array
              items:
                type: object
                properties:
                  kind:
                    type: string
                  checkId:
                    type: string
                  message:
                    type: string
                  subject:
                    type: string
                  subjectType:
                    type: string
                  scope:
                    type: string
                  matchedRuleId:
                    type: string
                  projectId:
                    type: string
                  optInAvailable:
                    type: boolean
                required:
                  - kind
                  - checkId
                  - message
          required:
            - type
            - sourceWorkflowId
            - name
            - violations
          description: 'A workflow the content-import policy refused. Takes down the whole package rather than skipping the workflow: the import rewrites cross-workflow references to the ids each workflow would get, so dropping one leaves the workflows that call it pointing at a row nothing ever wrote.'
        - type: object
          properties:
            type:
              type: string
              enum:
                - policy-check-failed
            point:
              type: string
              enum:
                - contentImport
                - credentialSave
          required:
            - type
            - point
          description: A policy check that could not run. The import endpoints do not return this. They fail with an error.
        - type: object
          properties:
            type:
              type: string
              enum:
                - credential-policy-violation
            sourceId:
              type: string
              description: Credential id as it appears in the package.
            targetId:
              type: string
              description: Id of the matched credential on the target instance. Set when the policy refused an update of this credential under `credentialConflictPolicy=overwrite`. Absent when the policy refused a credential that the import would create.
            name:
              type: string
            credentialType:
              type: string
            usedBy:
              type: array
              items:
                $ref: '#/components/schemas/packageRequirementConsumer.generated'
              description: Package consumers that use this credential.
            violations:
              type: array
              items:
                type: object
                properties:
                  kind:
                    type: string
                  checkId:
                    type: string
                  message:
                    type: string
                  subject:
                    type: string
                  subjectType:
                    type: string
                  scope:
                    type: string
                  matchedRuleId:
                    type: string
                  projectId:
                    type: string
                  optInAvailable:
                    type: boolean
                required:
                  - kind
                  - checkId
                  - message
          required:
            - type
            - sourceId
            - credentialType
            - usedBy
            - violations
          description: A credential the import would write that a credential-save or content-import policy refused, for example a stub of a credential type this instance does not allow, or an update of a matched credential. The import stops before any writes.
      type: object
    policyEffectivePublicDto.generated:
      type: object
      properties:
        scopeId:
          type: string
          nullable: true
        rules:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              action:
                type: string
                enum:
                  - allow
                  - deny
                  - delegate
              selector:
                oneOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - name
                      value:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - value
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - package
                      value:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - value
                type: object
            required:
              - id
              - action
              - selector
        defaultAction:
          type: string
          enum:
            - allow
            - deny
            - delegate
        version:
          type: integer
          minimum: 0
      required:
        - scopeId
        - rules
        - defaultAction
        - version
    policyEffectiveWriteResultPublicDto.generated:
      type: object
      properties:
        scopeId:
          type: string
          nullable: true
        rules:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              action:
                type: string
                enum:
                  - allow
                  - deny
                  - delegate
              selector:
                oneOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - name
                      value:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - value
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - package
                      value:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - value
                type: object
            required:
              - id
              - action
              - selector
        defaultAction:
          type: string
          enum:
            - allow
            - deny
            - delegate
        version:
          type: integer
          minimum: 0
        warnings:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - shadowed
                  ruleId:
                    type: string
                  shadowedByRuleId:
                    type: string
                required:
                  - kind
                  - ruleId
                  - shadowedByRuleId
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - notLoaded
                  ruleId:
                    type: string
                required:
                  - kind
                  - ruleId
            type: object
      required:
        - scopeId
        - rules
        - defaultAction
        - version
        - warnings
    policyDocumentWriteResultPublicDto.generated:
      type: object
      properties:
        policy:
          type: object
          properties:
            id:
              type: string
            kind:
              type: string
            rules:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                  action:
                    type: string
                    enum:
                      - allow
                      - deny
                      - delegate
                  selector:
                    oneOf:
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - name
                          value:
                            type: string
                            minLength: 1
                        required:
                          - kind
                          - value
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - package
                          value:
                            type: string
                            minLength: 1
                        required:
                          - kind
                          - value
                    type: object
                required:
                  - id
                  - action
                  - selector
            version:
              type: integer
              minimum: 0
              exclusiveMinimum: true
            updatedBy:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
          required:
            - id
            - kind
            - rules
            - version
            - updatedBy
            - createdAt
            - updatedAt
        warnings:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - shadowed
                  ruleId:
                    type: string
                  shadowedByRuleId:
                    type: string
                required:
                  - kind
                  - ruleId
                  - shadowedByRuleId
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - notLoaded
                  ruleId:
                    type: string
                required:
                  - kind
                  - ruleId
            type: object
      required:
        - policy
        - warnings
    policyAttachmentsPublicDto.generated:
      type: object
      properties:
        attachments:
          type: array
          items:
            type: object
            properties:
              policyId:
                type: string
              rules:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      minLength: 1
                    action:
                      type: string
                      enum:
                        - allow
                        - deny
                        - delegate
                    selector:
                      oneOf:
                        - type: object
                          properties:
                            kind:
                              type: string
                              enum:
                                - name
                            value:
                              type: string
                              minLength: 1
                          required:
                            - kind
                            - value
                        - type: object
                          properties:
                            kind:
                              type: string
                              enum:
                                - package
                            value:
                              type: string
                              minLength: 1
                          required:
                            - kind
                            - value
                      type: object
                  required:
                    - id
                    - action
                    - selector
              priority:
                type: integer
              isFloor:
                type: boolean
            required:
              - policyId
              - rules
              - priority
              - isFloor
        version:
          type: integer
          minimum: 0
          exclusiveMinimum: true
      required:
        - attachments
        - version
    otelSettingsPublicDto.generated:
      type: object
      properties:
        enabled:
          type: boolean
          description: Whether OpenTelemetry tracing is enabled.
          example: true
        exporterProtocol:
          type: string
          default: http/protobuf
          description: 'The wire protocol used to export spans. Collectors conventionally serve OTLP/HTTP on port 4318 and OTLP/gRPC on port 4317. The endpoint scheme (`http://` or `https://`) controls TLS for both protocols. Optional: a write that omits it selects `http/protobuf`, but an instance that sets this field to another value with an environment variable rejects that write with 409.'
          example: http/protobuf
          enum:
            - http/protobuf
            - grpc
        exporterEndpoint:
          type: string
          format: uri
          description: The base URL of the OTLP collector to export traces to. The value must be an `http://` or `https://` URL, because the scheme selects TLS — for gRPC, `https://` uses SSL and `http://` is plaintext.
          example: http://localhost:4318
        exporterTracingPath:
          type: string
          description: The path appended to the endpoint for the OTLP traces signal. Ignored when `exporterProtocol` is `grpc`, which takes no URL path.
          example: /v1/traces
        exporterServiceName:
          type: string
          minLength: 1
          description: The `service.name` resource attribute reported on every span.
          example: n8n
        exporterHeaders:
          type: string
          description: Additional headers sent to the OTLP collector, as a single string of comma-separated `key=value` pairs (e.g. `authorization=Bearer my-token,x-tenant-id=acme`). Whitespace around each key and value is trimmed; a value may contain spaces but not commas. Use an empty string when unused.
          example: authorization=Bearer my-token,x-tenant-id=acme
        tracesSampleRate:
          type: number
          description: The ratio of traces to sample, between 0 (none) and 1 (all).
          minimum: 0
          maximum: 1
          example: 1
        startupConnectivityTimeoutMs:
          type: integer
          description: How long, in milliseconds, to wait when checking the collector is reachable. Also used as the timeout for the test-trace endpoint.
          minimum: 0
          example: 2000
        includeNodeSpans:
          type: boolean
          description: Whether to emit a span for each node execution in addition to the workflow span.
          example: true
        emitWorkflowStartSpan:
          type: boolean
          description: 'Whether to emit a `workflow.execute.started` span with a duration of 0 ms when each execution or resumed segment starts. Optional: a write that omits it selects `false`, but an instance that sets this field to `true` with an environment variable rejects that write with 409.'
          example: false
        emitNodeStartSpan:
          type: boolean
          description: 'Whether to emit a `node.execute.started` span with a duration of 0 ms when each node span starts. This doubles the number of node spans. Has no effect when `includeNodeSpans` is false. Optional: a write that omits it selects `false`, but an instance that sets this field to `true` with an environment variable rejects that write with 409.'
          example: false
        injectOutbound:
          type: boolean
          description: Whether to inject trace context headers into outbound HTTP requests made by nodes.
          example: true
        productionExecutionsOnly:
          type: boolean
          description: When true, only production executions of published (active) workflows are traced, not manual/test runs.
          example: true
      required:
        - enabled
        - exporterProtocol
        - exporterEndpoint
        - exporterTracingPath
        - exporterServiceName
        - exporterHeaders
        - tracesSampleRate
        - startupConnectivityTimeoutMs
        - includeNodeSpans
        - emitWorkflowStartSpan
        - emitNodeStartSpan
        - injectOutbound
        - productionExecutionsOnly
      additionalProperties: false
      description: 'The OpenTelemetry configuration, matching the fields exposed in the UI. On a write this is a full replacement: every field must be provided, except `exporterProtocol`, which defaults to `http/protobuf` when omitted, and `emitWorkflowStartSpan` and `emitNodeStartSpan`, which default to `false` when omitted. Fields managed declaratively via environment variables are returned with their effective value. A write can repeat these values, but changing them returns 409.'
    promotionProviderPublicDto.generated:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 36
        name:
          type: string
        type:
          type: string
          enum:
            - git
            - gitlab
        authType:
          type: string
          enum:
            - ssh-key
            - token
        config:
          anyOf:
            - type: object
              properties:
                schemaVersion:
                  type: number
                  enum:
                    - 1
                publicKey:
                  type: string
                  minLength: 1
                keyType:
                  type: string
                  enum:
                    - ed25519
                    - rsa
              required:
                - schemaVersion
                - publicKey
                - keyType
              additionalProperties: false
            - type: object
              properties:
                schemaVersion:
                  type: number
                  enum:
                    - 1
              required:
                - schemaVersion
              additionalProperties: false
            - type: object
              properties:
                schemaVersion:
                  type: number
                  enum:
                    - 1
                baseUrl:
                  type: string
              required:
                - schemaVersion
                - baseUrl
              additionalProperties: false
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - name
        - type
        - authType
        - config
        - createdAt
        - updatedAt
    promotionEnvironmentPublicDto.generated:
      oneOf:
        - type: object
          properties:
            id:
              type: string
              minLength: 1
              maxLength: 36
            name:
              type: string
            scope:
              type: string
              enum:
                - instance
                - projects
            remote:
              type: object
              properties:
                schemaVersion:
                  type: number
                  enum:
                    - 1
                remoteUrl:
                  type: string
                  minLength: 1
                repositoryPath:
                  type: string
                  description: The stored repository path of a Git host remote. URL-encode it before you use it as repositoryId to list branches. Requests do not accept it.
              required:
                - schemaVersion
                - remoteUrl
              additionalProperties: false
            provider:
              type: object
              properties:
                id:
                  type: string
                  minLength: 1
                  maxLength: 36
                name:
                  type: string
                type:
                  type: string
                  enum:
                    - git
                    - gitlab
                authType:
                  type: string
                  enum:
                    - ssh-key
                    - token
                createdAt:
                  type: string
                  format: date-time
                updatedAt:
                  type: string
                  format: date-time
              required:
                - id
                - name
                - type
                - authType
                - createdAt
                - updatedAt
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            direction:
              type: string
              enum:
                - apply
            settings:
              type: object
              properties:
                schemaVersion:
                  type: number
                  enum:
                    - 1
                branchName:
                  type: string
                  minLength: 1
                  maxLength: 255
              required:
                - schemaVersion
                - branchName
              additionalProperties: false
            checkout:
              type: object
              properties:
                hasCheckout:
                  type: boolean
                matchesEnvironment:
                  type: boolean
              required:
                - hasCheckout
                - matchesEnvironment
          required:
            - id
            - name
            - scope
            - remote
            - provider
            - createdAt
            - updatedAt
            - direction
            - settings
            - checkout
        - type: object
          properties:
            id:
              type: string
              minLength: 1
              maxLength: 36
            name:
              type: string
            scope:
              type: string
              enum:
                - instance
                - projects
            remote:
              type: object
              properties:
                schemaVersion:
                  type: number
                  enum:
                    - 1
                remoteUrl:
                  type: string
                  minLength: 1
                repositoryPath:
                  type: string
                  description: The stored repository path of a Git host remote. URL-encode it before you use it as repositoryId to list branches. Requests do not accept it.
              required:
                - schemaVersion
                - remoteUrl
              additionalProperties: false
            provider:
              type: object
              properties:
                id:
                  type: string
                  minLength: 1
                  maxLength: 36
                name:
                  type: string
                type:
                  type: string
                  enum:
                    - git
                    - gitlab
                authType:
                  type: string
                  enum:
                    - ssh-key
                    - token
                createdAt:
                  type: string
                  format: date-time
                updatedAt:
                  type: string
                  format: date-time
              required:
                - id
                - name
                - type
                - authType
                - createdAt
                - updatedAt
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            direction:
              type: string
              enum:
                - promote
            settings:
              type: object
              properties:
                schemaVersion:
                  type: number
                  enum:
                    - 1
                baseBranchName:
                  type: string
                  minLength: 1
                  maxLength: 255
                createBranchOnPromotion:
                  type: boolean
              required:
                - schemaVersion
                - baseBranchName
                - createBranchOnPromotion
              additionalProperties: false
            checkout:
              type: object
              properties:
                hasCheckout:
                  type: boolean
                matchesEnvironment:
                  type: boolean
              required:
                - hasCheckout
                - matchesEnvironment
          required:
            - id
            - name
            - scope
            - remote
            - provider
            - createdAt
            - updatedAt
            - direction
            - settings
            - checkout
      type: object
    promotionCheckoutPublicDto.generated:
      type: object
      properties:
        environmentId:
          type: string
          minLength: 1
          maxLength: 36
        direction:
          type: string
          enum:
            - apply
            - promote
        branchName:
          type: string
        hasCheckout:
          type: boolean
      required:
        - environmentId
        - direction
        - branchName
        - hasCheckout
    promotePackageResultDto.generated:
      type: object
      properties:
        environmentId:
          type: string
          minLength: 1
          maxLength: 36
        counts:
          type: object
          properties:
            workflows:
              type: integer
              minimum: 0
            folders:
              type: integer
              minimum: 0
            credentials:
              type: integer
              minimum: 0
            dataTables:
              type: integer
              minimum: 0
            variables:
              type: integer
              minimum: 0
            tags:
              type: integer
              minimum: 0
          required:
            - workflows
            - folders
            - credentials
            - dataTables
            - variables
            - tags
        git:
          type: object
          properties:
            commitSha:
              type: string
            branchName:
              type: string
          required:
            - commitSha
            - branchName
        review:
          type: object
          properties:
            reviewId:
              type: string
              minLength: 1
              maxLength: 36
            number:
              type: integer
            webUrl:
              type: string
          required:
            - reviewId
            - number
            - webUrl
        warnings:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              linkUrl:
                type: string
            required:
              - message
      required:
        - environmentId
        - counts
        - git
    promotionCredentialExpressionValue.generated:
      anyOf:
        - type: string
        - type: array
          items:
            $ref: '#/components/schemas/promotionCredentialExpressionValue.generated'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/promotionCredentialExpressionValue.generated'
      description: Values can be strings, arrays, or nested objects. Every leaf is an expression string.
    applyPackageResultDto.generated:
      oneOf:
        - type: object
          properties:
            environmentId:
              type: string
              minLength: 1
              maxLength: 36
            git:
              type: object
              properties:
                commitSha:
                  type: string
                branchName:
                  type: string
              required:
                - commitSha
                - branchName
            status:
              type: string
              enum:
                - applied
            counts:
              type: object
              properties:
                projects:
                  type: object
                  properties:
                    created:
                      type: integer
                      minimum: 0
                    updated:
                      type: integer
                      minimum: 0
                    skipped:
                      type: integer
                      minimum: 0
                    deleted:
                      type: integer
                      minimum: 0
                  required:
                    - created
                    - updated
                    - skipped
                    - deleted
                folders:
                  type: object
                  properties:
                    created:
                      type: integer
                      minimum: 0
                    updated:
                      type: integer
                      minimum: 0
                      description: Existing folders that Apply moved or renamed to match the branch.
                    skipped:
                      type: integer
                      minimum: 0
                    moved:
                      type: integer
                      minimum: 0
                      description: Updated folders that Apply moved under another parent of their project. Included in `updated`.
                    renamed:
                      type: integer
                      minimum: 0
                      description: Updated folders that Apply gave the name on the branch. Included in `updated`.
                    removed:
                      type: integer
                      minimum: 0
                  required:
                    - created
                    - updated
                    - skipped
                    - moved
                    - renamed
                    - removed
                workflows:
                  type: object
                  properties:
                    created:
                      type: integer
                      minimum: 0
                    updated:
                      type: integer
                      minimum: 0
                    skipped:
                      type: integer
                      minimum: 0
                    moved:
                      type: integer
                      minimum: 0
                      description: Updated workflows that Apply also moved to another folder of their project. Included in `updated`.
                    archived:
                      type: integer
                      minimum: 0
                    deleted:
                      type: integer
                      minimum: 0
                    publishing:
                      type: object
                      properties:
                        published:
                          type: integer
                          minimum: 0
                        unpublished:
                          type: integer
                          minimum: 0
                        unchanged:
                          type: integer
                          minimum: 0
                        blocked:
                          type: integer
                          minimum: 0
                        failed:
                          type: integer
                          minimum: 0
                      required:
                        - published
                        - unpublished
                        - unchanged
                        - blocked
                        - failed
                  required:
                    - created
                    - updated
                    - skipped
                    - moved
                    - archived
                    - deleted
                    - publishing
                credentials:
                  type: object
                  properties:
                    matched:
                      type: integer
                      minimum: 0
                    stubbed:
                      type: integer
                      minimum: 0
                    updated:
                      type: integer
                      minimum: 0
                  required:
                    - matched
                    - stubbed
                    - updated
                dataTables:
                  type: object
                  properties:
                    matched:
                      type: integer
                      minimum: 0
                    created:
                      type: integer
                      minimum: 0
                    updated:
                      type: integer
                      minimum: 0
                  required:
                    - matched
                    - created
                    - updated
                variables:
                  type: object
                  properties:
                    matched:
                      type: integer
                      minimum: 0
                    created:
                      type: integer
                      minimum: 0
                    updated:
                      type: integer
                      minimum: 0
                    stubbed:
                      type: integer
                      minimum: 0
                    missing:
                      type: integer
                      minimum: 0
                  required:
                    - matched
                    - created
                    - updated
                    - stubbed
                    - missing
                tags:
                  type: object
                  properties:
                    matched:
                      type: integer
                      minimum: 0
                    created:
                      type: integer
                      minimum: 0
                    renamed:
                      type: integer
                      minimum: 0
                    reconciled:
                      type: integer
                      minimum: 0
                    skipped:
                      type: integer
                      minimum: 0
                  required:
                    - matched
                    - created
                    - renamed
                    - reconciled
                    - skipped
              required:
                - projects
                - folders
                - workflows
                - credentials
                - dataTables
                - variables
                - tags
            warnings:
              type: array
              items:
                type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - variable
                  code:
                    type: string
                    enum:
                      - variable-shadowed
                  name:
                    type: string
                    minLength: 1
                  scope:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - global
                    required:
                      - kind
                  consumers:
                    type: array
                    items:
                      type: object
                      properties:
                        project:
                          type: object
                          properties:
                            id:
                              type: string
                              minLength: 1
                            name:
                              type: string
                          required:
                            - id
                            - name
                        workflows:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              name:
                                type: string
                            required:
                              - id
                              - name
                          minItems: 1
                      required:
                        - project
                        - workflows
                    minItems: 1
                required:
                  - kind
                  - code
                  - name
                  - scope
                  - consumers
          required:
            - environmentId
            - git
            - status
            - counts
            - warnings
        - type: object
          properties:
            environmentId:
              type: string
              minLength: 1
              maxLength: 36
            git:
              type: object
              properties:
                commitSha:
                  type: string
                branchName:
                  type: string
              required:
                - commitSha
                - branchName
            status:
              type: string
              enum:
                - blocked
            check:
              type: object
              properties:
                missingProjects:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      name:
                        type: string
                      icon:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - emoji
                              - icon
                          value:
                            type: string
                        required:
                          - type
                          - value
                      description:
                        type: string
                      customTelemetryTags:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            value:
                              type: string
                          required:
                            - key
                            - value
                    required:
                      - id
                      - name
                  description: Projects in the package that do not exist on this instance. The check keeps their metadata without checking project creation rules. The project creation API can reject invalid values.
                missingBindings:
                  type: array
                  items:
                    oneOf:
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - credential
                          sourceId:
                            type: string
                            minLength: 1
                          name:
                            type: string
                          credentialType:
                            type: string
                            minLength: 1
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                          ownerProject:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              name:
                                type: string
                            required:
                              - id
                              - name
                          expressionData:
                            type: object
                            additionalProperties:
                              $ref: '#/components/schemas/promotionCredentialExpressionValue.generated'
                            description: Credential expressions.
                        required:
                          - kind
                          - sourceId
                          - name
                          - credentialType
                          - consumers
                          - ownerProject
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - variable
                          name:
                            type: string
                            minLength: 1
                          variableType:
                            type: string
                            enum:
                              - string
                            default: string
                          scope:
                            oneOf:
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - global
                                required:
                                  - kind
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - project
                                  project:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                required:
                                  - kind
                                  - project
                            type: object
                          sourceValue:
                            type: string
                            maxLength: 1000
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                        required:
                          - kind
                          - name
                          - scope
                          - consumers
                    type: object
                accessRequirements:
                  type: array
                  items:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - credential
                      sourceId:
                        type: string
                        minLength: 1
                      name:
                        type: string
                      credentialType:
                        type: string
                        minLength: 1
                      consumers:
                        type: array
                        items:
                          type: object
                          properties:
                            project:
                              type: object
                              properties:
                                id:
                                  type: string
                                  minLength: 1
                                name:
                                  type: string
                              required:
                                - id
                                - name
                            workflows:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    minLength: 1
                                  name:
                                    type: string
                                required:
                                  - id
                                  - name
                              minItems: 1
                          required:
                            - project
                            - workflows
                        minItems: 1
                      code:
                        type: string
                        enum:
                          - access-required
                    required:
                      - kind
                      - sourceId
                      - name
                      - credentialType
                      - consumers
                      - code
                conflicts:
                  type: array
                  items:
                    oneOf:
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - credential
                          sourceId:
                            type: string
                            nullable: true
                            minLength: 1
                          name:
                            type: string
                          expectedTypes:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          filePath:
                            type: string
                          referenceFiles:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                          code:
                            type: string
                            enum:
                              - missing-id
                        required:
                          - kind
                          - sourceId
                          - name
                          - expectedTypes
                          - referenceFiles
                          - consumers
                          - code
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - credential
                          sourceId:
                            type: string
                            nullable: true
                            minLength: 1
                          name:
                            type: string
                          expectedTypes:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          filePath:
                            type: string
                          referenceFiles:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                          code:
                            type: string
                            enum:
                              - conflicting-types
                        required:
                          - kind
                          - sourceId
                          - name
                          - expectedTypes
                          - referenceFiles
                          - consumers
                          - code
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - credential
                          sourceId:
                            type: string
                            nullable: true
                            minLength: 1
                          name:
                            type: string
                          expectedTypes:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          filePath:
                            type: string
                          referenceFiles:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                          code:
                            type: string
                            enum:
                              - unknown-type
                        required:
                          - kind
                          - sourceId
                          - name
                          - expectedTypes
                          - referenceFiles
                          - consumers
                          - code
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - credential
                          sourceId:
                            type: string
                            nullable: true
                            minLength: 1
                          name:
                            type: string
                          expectedTypes:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          filePath:
                            type: string
                          referenceFiles:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                          code:
                            type: string
                            enum:
                              - unknown-owner
                        required:
                          - kind
                          - sourceId
                          - name
                          - expectedTypes
                          - referenceFiles
                          - consumers
                          - code
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - credential
                          sourceId:
                            type: string
                            nullable: true
                            minLength: 1
                          name:
                            type: string
                          expectedTypes:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          filePath:
                            type: string
                          referenceFiles:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                          code:
                            type: string
                            enum:
                              - type-mismatch
                          targetType:
                            type: string
                        required:
                          - kind
                          - sourceId
                          - name
                          - expectedTypes
                          - referenceFiles
                          - consumers
                          - code
                          - targetType
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - credential
                          sourceId:
                            type: string
                            nullable: true
                            minLength: 1
                          name:
                            type: string
                          expectedTypes:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          filePath:
                            type: string
                          referenceFiles:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                          code:
                            type: string
                            enum:
                              - incompatible-usage-scope
                          usageScope:
                            type: string
                        required:
                          - kind
                          - sourceId
                          - name
                          - expectedTypes
                          - referenceFiles
                          - consumers
                          - code
                          - usageScope
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - variable
                          code:
                            type: string
                            enum:
                              - missing-definition
                          name:
                            type: string
                            minLength: 1
                          referenceFiles:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                        required:
                          - kind
                          - code
                          - name
                          - referenceFiles
                          - consumers
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - project
                          code:
                            type: string
                            enum:
                              - project-not-team
                          project:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              name:
                                type: string
                            required:
                              - id
                              - name
                          filePath:
                            type: string
                          workflows:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  minLength: 1
                                name:
                                  type: string
                              required:
                                - id
                                - name
                        required:
                          - kind
                          - code
                          - project
                          - filePath
                          - workflows
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - project
                          code:
                            type: string
                            enum:
                              - project-deletion
                          project:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              name:
                                type: string
                            required:
                              - id
                              - name
                        required:
                          - kind
                          - code
                          - project
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - data-table
                          code:
                            type: string
                            enum:
                              - destructive-change
                          id:
                            type: string
                            minLength: 1
                          name:
                            type: string
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                          changes:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - add-column
                                    column:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - string
                                        - number
                                        - boolean
                                        - date
                                    destructive:
                                      type: boolean
                                      enum:
                                        - false
                                  required:
                                    - kind
                                    - column
                                    - type
                                    - destructive
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - remove-column
                                    column:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - string
                                        - number
                                        - boolean
                                        - date
                                    destructive:
                                      type: boolean
                                      enum:
                                        - true
                                  required:
                                    - kind
                                    - column
                                    - type
                                    - destructive
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - change-column-type
                                    column:
                                      type: string
                                    from:
                                      type: string
                                      enum:
                                        - string
                                        - number
                                        - boolean
                                        - date
                                    to:
                                      type: string
                                      enum:
                                        - string
                                        - number
                                        - boolean
                                        - date
                                    destructive:
                                      type: boolean
                                      enum:
                                        - true
                                  required:
                                    - kind
                                    - column
                                    - from
                                    - to
                                    - destructive
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - rename-column
                                    from:
                                      type: string
                                    to:
                                      type: string
                                    destructive:
                                      type: boolean
                                      enum:
                                        - false
                                  required:
                                    - kind
                                    - from
                                    - to
                                    - destructive
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - reorder-columns
                                    destructive:
                                      type: boolean
                                      enum:
                                        - false
                                  required:
                                    - kind
                                    - destructive
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - rename-table
                                    from:
                                      type: string
                                    to:
                                      type: string
                                    destructive:
                                      type: boolean
                                      enum:
                                        - false
                                  required:
                                    - kind
                                    - from
                                    - to
                                    - destructive
                              type: object
                            minItems: 1
                        required:
                          - kind
                          - code
                          - id
                          - name
                          - consumers
                          - changes
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - workflow
                          code:
                            type: string
                            enum:
                              - workflow-id-conflict
                              - lineage-conflict
                              - policy-violation
                              - missing-node-type
                              - workflow-forbidden
                          reason:
                            type: string
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                        required:
                          - kind
                          - code
                          - consumers
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - data-table
                          code:
                            type: string
                            enum:
                              - data-table-conflict
                          id:
                            type: string
                            minLength: 1
                          name:
                            type: string
                          reason:
                            type: string
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                        required:
                          - kind
                          - code
                          - reason
                          - consumers
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - tag
                          code:
                            type: string
                            enum:
                              - tag-conflict
                          id:
                            type: string
                            minLength: 1
                          name:
                            type: string
                          reason:
                            type: string
                          consumers:
                            type: array
                            items:
                              type: object
                              properties:
                                project:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                workflows:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        minLength: 1
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  minItems: 1
                              required:
                                - project
                                - workflows
                            minItems: 1
                        required:
                          - kind
                          - code
                          - reason
                          - consumers
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - project
                          code:
                            type: string
                            enum:
                              - project-conflict
                              - check-not-run
                              - import-blocked
                              - project-not-on-branch
                          project:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              name:
                                type: string
                            required:
                              - id
                              - name
                          reason:
                            type: string
                        required:
                          - kind
                          - code
                          - project
                      - type: object
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                          project:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              name:
                                type: string
                            required:
                              - id
                              - name
                          projectExists:
                            type: boolean
                          instanceProject:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              name:
                                type: string
                            required:
                              - id
                          kind:
                            type: string
                            enum:
                              - workflow
                              - folder
                          code:
                            type: string
                            enum:
                              - moved
                        required:
                          - id
                          - name
                          - project
                          - projectExists
                          - instanceProject
                          - kind
                          - code
                    type: object
                warnings:
                  type: array
                  items:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - variable
                      code:
                        type: string
                        enum:
                          - variable-shadowed
                      name:
                        type: string
                        minLength: 1
                      scope:
                        type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - global
                        required:
                          - kind
                      consumers:
                        type: array
                        items:
                          type: object
                          properties:
                            project:
                              type: object
                              properties:
                                id:
                                  type: string
                                  minLength: 1
                                name:
                                  type: string
                              required:
                                - id
                                - name
                            workflows:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    minLength: 1
                                  name:
                                    type: string
                                required:
                                  - id
                                  - name
                              minItems: 1
                          required:
                            - project
                            - workflows
                        minItems: 1
                    required:
                      - kind
                      - code
                      - name
                      - scope
                      - consumers
              required:
                - missingProjects
                - missingBindings
                - accessRequirements
                - conflicts
                - warnings
          required:
            - environmentId
            - git
            - status
            - check
        - type: object
          properties:
            environmentId:
              type: string
              minLength: 1
              maxLength: 36
            git:
              type: object
              properties:
                commitSha:
                  type: string
                branchName:
                  type: string
              required:
                - commitSha
                - branchName
            status:
              type: string
              enum:
                - source-changed
          required:
            - environmentId
            - git
            - status
        - type: object
          properties:
            environmentId:
              type: string
              minLength: 1
              maxLength: 36
            git:
              type: object
              properties:
                commitSha:
                  type: string
                branchName:
                  type: string
              required:
                - commitSha
                - branchName
            status:
              type: string
              enum:
                - preview-changed
          required:
            - environmentId
            - git
            - status
      type: object
    rateLimitSettingsPublicDto.generated:
      type: object
      properties:
        enabled:
          type: boolean
          description: Whether Public API rate limiting is enabled.
        globalReadLimit:
          type: integer
          minimum: 0
          description: Read requests allowed for one API key across all endpoints. Set 0 for no limit.
        globalReadWindowSeconds:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: The window for the global read limit, in seconds.
        globalWriteLimit:
          type: integer
          minimum: 0
          description: Write requests allowed for one API key across all endpoints. Set 0 for no limit.
        globalWriteWindowSeconds:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: The window for the global write limit, in seconds.
        endpointReadLimit:
          type: integer
          minimum: 0
          description: Read requests allowed for one API key on one endpoint. Set 0 for no limit.
        endpointReadWindowSeconds:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: The window for the endpoint read limit, in seconds.
        endpointWriteLimit:
          type: integer
          minimum: 0
          description: Write requests allowed for one API key on one endpoint. Set 0 for no limit.
        endpointWriteWindowSeconds:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: The window for the endpoint write limit, in seconds.
        envManagedFields:
          type: array
          items:
            type: string
            enum:
              - enabled
              - globalReadLimit
              - globalReadWindowSeconds
              - globalWriteLimit
              - globalWriteWindowSeconds
              - endpointReadLimit
              - endpointReadWindowSeconds
              - endpointWriteLimit
              - endpointWriteWindowSeconds
          description: Fields controlled by environment variables, including _FILE variables. These fields return their effective values. A PUT can repeat these values but cannot change them.
          readOnly: true
      required:
        - enabled
        - globalReadLimit
        - globalReadWindowSeconds
        - globalWriteLimit
        - globalWriteWindowSeconds
        - endpointReadLimit
        - endpointReadWindowSeconds
        - endpointWriteLimit
        - endpointWriteWindowSeconds
        - envManagedFields
    roleMappingRulePublicDto.generated:
      type: object
      properties:
        id:
          type: string
        expression:
          type: string
        role:
          type: string
        type:
          type: string
          enum:
            - instance
            - project
        order:
          type: integer
        projectIds:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - expression
        - role
        - type
        - order
        - projectIds
        - createdAt
        - updatedAt
    rolePublicDto.generated:
      type: object
      properties:
        slug:
          type: string
        displayName:
          type: string
        description:
          type: string
          nullable: true
        systemRole:
          type: boolean
        roleType:
          type: string
          enum:
            - project
            - global
        scopes:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - slug
        - displayName
        - description
        - systemRole
        - roleType
        - scopes
        - createdAt
        - updatedAt
    securityPolicyPublicDto.generated:
      type: object
      properties:
        personalSpacePublishing:
          type: boolean
          description: Whether members may publish workflows and agents from their personal space.
          example: true
        personalSpaceSharing:
          type: boolean
          description: Whether members may share workflows and credentials from their personal space.
          example: true
        publishedPersonalWorkflowsCount:
          type: integer
          description: Number of currently published personal workflows, shown for awareness before tightening the policy.
          readOnly: true
          example: 3
        sharedPersonalWorkflowsCount:
          type: integer
          description: Number of personal workflows currently shared with other users.
          readOnly: true
          example: 5
        sharedPersonalCredentialsCount:
          type: integer
          description: Number of personal credentials currently shared with other users.
          readOnly: true
          example: 2
        redactionEnforcement:
          type: object
          properties:
            floor:
              type: string
              enum:
                - off
                - production
                - all
              description: Minimum execution-data redaction level enforced across the instance.
              example: production
          required:
            - floor
          additionalProperties: false
      required:
        - personalSpacePublishing
        - personalSpaceSharing
        - publishedPersonalWorkflowsCount
        - sharedPersonalWorkflowsCount
        - sharedPersonalCredentialsCount
        - redactionEnforcement
      additionalProperties: false
    oidcConfigurationPublicDto.generated:
      type: object
      properties:
        clientId:
          type: string
          description: The client ID issued when registering n8n with the OIDC provider.
          example: n8n-client
        clientSecret:
          type: string
          description: The client secret issued when registering n8n with the OIDC provider. Redacted on read when set; never echoed back in plaintext.
          example: '**hidden**'
        discoveryEndpoint:
          type: string
          format: uri
          description: The OIDC provider's well-known discovery endpoint.
          example: https://accounts.google.com/.well-known/openid-configuration
        loginEnabled:
          type: boolean
          description: Whether OIDC single sign-on is enabled.
          example: false
        prompt:
          type: string
          enum:
            - none
            - login
            - consent
            - select_account
            - create
          description: The prompt parameter to use when authenticating with the OIDC provider.
          example: select_account
        authenticationContextClassReference:
          type: array
          items:
            type: string
          description: ACR values to include in the authorization request (acr_values parameter), in order of preference.
          example:
            - mfa
            - pwd
        additionalScopes:
          type: string
          description: Additional scopes to request, space separated. n8n always requests `openid`, `profile` and `email`.
          example: groups roles
        emailVerifiedRequired:
          type: boolean
          description: Whether the identity provider must assert that the user's email address is verified before the login is accepted. When disabled, only an explicit negative assertion is rejected.
          example: false
        rpInitiatedLogoutEnabled:
          type: boolean
          description: Whether signing out of n8n also ends the session at the OIDC provider via RP-Initiated Logout. When disabled, sign-out is local to n8n only.
          example: false
      required:
        - clientId
        - clientSecret
        - discoveryEndpoint
        - loginEnabled
        - prompt
        - authenticationContextClassReference
        - additionalScopes
        - emailVerifiedRequired
        - rpInitiatedLogoutEnabled
      additionalProperties: false
    samlConfigurationPublicDto.generated:
      type: object
      properties:
        entityID:
          type: string
          description: Service provider entity ID (metadata URL).
          readOnly: true
          example: https://n8n.example.com/rest/sso/saml/metadata
        returnUrl:
          type: string
          description: Assertion Consumer Service (ACS) return URL.
          readOnly: true
          example: https://n8n.example.com/rest/sso/saml/acs
        mapping:
          type: object
          properties:
            email:
              type: string
              description: SAML attribute mapped to the user's email.
            firstName:
              type: string
              description: SAML attribute mapped to the user's first name.
            lastName:
              type: string
              description: SAML attribute mapped to the user's last name.
            userPrincipalName:
              type: string
              description: SAML attribute mapped to the user's principal name.
            emailVerified:
              type: string
              description: SAML attribute that states whether the identity provider verified the user's email. An empty string when unused.
            n8nInstanceRole:
              type: string
              description: SAML attribute mapped to the n8n instance role.
            n8nProjectRoles:
              type: array
              items:
                type: string
              description: SAML attributes mapped to n8n project roles, formatted as `<projectId>:<role>`.
          required:
            - email
            - firstName
            - lastName
            - userPrincipalName
            - emailVerified
            - n8nInstanceRole
            - n8nProjectRoles
          description: Mapping of SAML attributes to n8n user fields.
          additionalProperties: false
        metadata:
          type: string
          description: Identity provider metadata in XML format. Redacted on read when set because it contains IdP certificates; never echoed back in plaintext. Use an empty string when unset.
          example: '**hidden**'
        metadataUrl:
          type: string
          description: URL to fetch identity provider metadata from. Use an empty string when unset.
        ignoreSSL:
          type: boolean
          description: Whether to ignore SSL certificate errors when fetching metadata from a URL.
          example: false
        loginBinding:
          type: string
          enum:
            - redirect
            - post
          description: SAML login request binding.
          example: redirect
        loginEnabled:
          type: boolean
          description: Whether SAML login is enabled.
          example: false
        loginLabel:
          type: string
          description: Label shown on the SAML login button.
          example: SAML
        authnRequestsSigned:
          type: boolean
          description: Whether authentication requests are signed.
          example: false
        wantAssertionsSigned:
          type: boolean
          description: Whether signed assertions are required.
          example: true
        wantMessageSigned:
          type: boolean
          description: Whether signed SAML messages are required.
          example: true
        emailVerifiedRequired:
          type: boolean
          description: Whether the identity provider must assert that the user's email address is verified before a login is linked to an existing user by email. When disabled, only an explicit negative assertion is rejected.
          example: false
        signingPrivateKey:
          type: string
          description: PEM-encoded private key for signing SAML AuthnRequests. Redacted on read when set; never echoed back in plaintext. Use an empty string when unset.
          example: '**hidden**'
        signingCertificate:
          type: string
          description: PEM-encoded certificate containing the public key matching the signing private key. Redacted on read when set; never echoed back in plaintext. Use an empty string when unset.
          example: '**hidden**'
        acsBinding:
          type: string
          enum:
            - redirect
            - post
          description: Assertion Consumer Service binding.
          example: post
        signatureConfig:
          type: object
          properties:
            prefix:
              type: string
              example: ds
            location:
              type: object
              properties:
                reference:
                  type: string
                  example: /samlp:Response/saml:Issuer
                action:
                  type: string
                  enum:
                    - before
                    - after
                    - prepend
                    - append
                  example: after
              required:
                - reference
                - action
              additionalProperties: false
          required:
            - prefix
            - location
          description: Configuration for the signature in SAML requests and responses.
          additionalProperties: false
        relayState:
          type: string
          description: Default relay state value for SAML requests. Use an empty string when unset.
          example: https://n8n.example.com
      required:
        - entityID
        - returnUrl
        - mapping
        - metadata
        - metadataUrl
        - ignoreSSL
        - loginBinding
        - loginEnabled
        - loginLabel
        - authnRequestsSigned
        - wantAssertionsSigned
        - wantMessageSigned
        - emailVerifiedRequired
        - signingPrivateKey
        - signingCertificate
        - acsBinding
        - signatureConfig
        - relayState
      additionalProperties: false
    tagPublicDto.generated:
      type: object
      properties:
        id:
          type: string
          readOnly: true
          example: 2tUt1wbLX592XDdX
        name:
          type: string
          example: Production
        createdAt:
          type: string
          format: date-time
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          readOnly: true
      required:
        - id
        - name
        - createdAt
        - updatedAt
    workflowPublicDto.generated:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        active:
          type: boolean
          description: Deprecated. Check whether `activeVersionId` is not null instead.
          deprecated: true
        activeVersionId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        isArchived:
          type: boolean
        versionId:
          type: string
        versionCounter:
          type: number
        sourceWorkflowId:
          type: string
          nullable: true
        triggerCount:
          type: number
        nodes:
          type: array
          description: Nodes that make up the workflow
          items:
            type: object
            properties:
              id:
                type: string
                example: 0f5532f9-36ba-4bef-86c7-30d607400b15
              name:
                type: string
                example: Jira
              webhookId:
                type: string
              disabled:
                type: boolean
              notesInFlow:
                type: boolean
              notes:
                type: string
              type:
                type: string
                example: n8n-nodes-base.jira
              typeVersion:
                type: number
                example: 1
              executeOnce:
                type: boolean
                example: false
              alwaysOutputData:
                type: boolean
                example: false
              retryOnFail:
                type: boolean
                example: false
              maxTries:
                type: number
              waitBetweenTries:
                type: number
              continueOnFail:
                type: boolean
                example: false
                description: use onError instead
                deprecated: true
              onError:
                type: string
                example: stopWorkflow
              position:
                type: array
                items:
                  type: number
                example:
                  - -100
                  - 80
              parameters:
                type: object
                additionalProperties: true
              credentials:
                type: object
                example:
                  jiraSoftwareCloudApi:
                    name: jiraApi
              customTelemetryTags:
                type: object
                properties:
                  tag:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        value:
                          type: string
                      required:
                        - key
                        - value
        connections:
          type: object
          description: Connections between nodes, keyed by source node name
          example:
            Jira:
              main:
                - - node: Jira
                    type: main
                    index: 0
        nodeGroups:
          type: array
          description: Visual groupings of nodes shown as frames on the canvas
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique identifier for the node group
                example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
              name:
                type: string
                description: Display name of the node group
                example: Data processing
              description:
                type: string
                maxLength: 155
                description: Optional plain-text description of the node group
                example: Cleans and normalizes incoming records
              nodeIds:
                type: array
                description: IDs of the nodes that belong to this group
                items:
                  type: string
            required:
              - id
              - name
              - nodeIds
        settings:
          type: object
          description: Execution and behaviour settings for the workflow
          properties:
            saveExecutionProgress:
              oneOf:
                - type: boolean
                - type: string
                  enum:
                    - DEFAULT
            saveManualExecutions:
              oneOf:
                - type: boolean
                - type: string
                  enum:
                    - DEFAULT
            saveDataErrorExecution:
              type: string
              enum:
                - DEFAULT
                - all
                - none
            saveDataSuccessExecution:
              type: string
              enum:
                - DEFAULT
                - all
                - none
            executionTimeout:
              type: number
              example: 3600
            errorWorkflow:
              type: string
              example: VzqKEW0ShTXA5vPj
              description: The ID of the workflow that contains the error trigger node.
            timezone:
              type: string
              example: America/New_York
            executionOrder:
              type: string
              example: v1
            binaryMode:
              type: string
              enum:
                - separate
                - combined
              description: Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
            engineType:
              type: string
              nullable: true
              example: v1
              description: The execution engine that runs this workflow. n8n sets it on new workflows when the instance runs new workflows on engine v2 (`N8N_ENGINE_DEFAULT_TYPE=v2` with the `engine-v2` module enabled). It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
            callerPolicy:
              type: string
              enum:
                - any
                - none
                - workflowsFromAList
                - workflowsFromSameOwner
              example: workflowsFromSameOwner
              description: |-
                Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.

                Available options:
                - `any`: Any workflow can call this workflow (no restrictions)
                - `none`: No other workflows can call this workflow (completely blocked)
                - `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow
                - `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow
            callerIds:
              type: string
              example: 14, 18, 23
              description: Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)
            timeSavedMode:
              type: string
              enum:
                - fixed
                - dynamic
              description: |-
                Controls how the time saved per execution is calculated.

                Available options:
                - `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.
                - `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored.
            timeSavedPerExecution:
              type: number
              description: Estimated time saved per execution in minutes
            redactionPolicy:
              type: string
              enum:
                - none
                - non-manual
                - manual-only
                - all
              example: non-manual
              description: |-
                Controls whether execution data is redacted for this workflow.

                Available options:
                - `none` (default): No redaction. All execution data is stored.
                - `non-manual`: Redact production (non-manually triggered) executions only.
                - `manual-only`: Redact manually triggered executions only.
                - `all`: Redact all executions, manual and production.
            redactCallerExecutions:
              type: boolean
              example: true
              description: Controls whether a workflow that calls this workflow as a sub-workflow has its executions redacted on the same channels as this workflow. The calling execution keeps a copy of the output of this workflow. Defaults to true. Turn it off only when the output of this workflow is not sensitive. Redaction that this workflow received from its own sub-workflows always passes to the caller.
            availableInMCP:
              type: boolean
              example: false
              description: Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node.
            customTelemetryTags:
              type: array
              items:
                type: object
                properties:
                  key:
                    type: string
                  value:
                    type: string
                required:
                  - key
                  - value
            credentialResolverId:
              type: string
              description: ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
          nullable: true
        staticData:
          type: object
          description: Data the workflow keeps between executions
          example:
            lastId: 1
          nullable: true
        pinData:
          type: object
          description: Pinned sample data for nodes, keyed by node name
          nullable: true
        meta:
          type: object
          description: Workflow metadata such as template information
          properties:
            onboardingId:
              type: string
            templateId:
              type: string
            instanceId:
              type: string
            templateCredsSetupCompleted:
              type: boolean
          nullable: true
        tags:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                readOnly: true
                example: 2tUt1wbLX592XDdX
              name:
                type: string
                example: Production
              createdAt:
                type: string
                format: date-time
                readOnly: true
              updatedAt:
                type: string
                format: date-time
                readOnly: true
            required:
              - id
              - name
              - createdAt
              - updatedAt
        shared:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
              workflowId:
                type: string
              projectId:
                type: string
              project:
                type: object
                properties:
                  id:
                    type: string
                    readOnly: true
                    example: VmwOO9HeTEj20kxM
                  name:
                    type: string
                    example: Marketing
                  type:
                    type: string
                    enum:
                      - personal
                      - team
                    readOnly: true
                    example: team
                  icon:
                    type: object
                    description: Icon of the project, or null when the project has none
                    properties:
                      type:
                        type: string
                        enum:
                          - emoji
                          - icon
                      value:
                        type: string
                      color:
                        type: string
                    required:
                      - type
                      - value
                    nullable: true
                  description:
                    type: string
                    nullable: true
                    example: Workflows the marketing team owns.
                  customTelemetryTags:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        value:
                          type: string
                      required:
                        - key
                        - value
                  creatorId:
                    type: string
                    nullable: true
                    example: f9a2cbb8-0b1e-4b64-9c1c-0d5f5f1f2a3b
                  createdAt:
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    type: string
                    format: date-time
                    readOnly: true
                required:
                  - id
                  - name
                  - type
                  - icon
                  - description
                  - customTelemetryTags
                  - creatorId
                  - createdAt
                  - updatedAt
              createdAt:
                type: string
                format: date-time
              updatedAt:
                type: string
                format: date-time
            required:
              - role
              - workflowId
              - projectId
              - project
              - createdAt
              - updatedAt
        activeVersion:
          type: object
          nullable: true
          properties:
            versionId:
              type: string
            workflowId:
              type: string
            nodes:
              type: array
              description: Nodes that make up the workflow
              items:
                type: object
                properties:
                  id:
                    type: string
                    example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                  name:
                    type: string
                    example: Jira
                  webhookId:
                    type: string
                  disabled:
                    type: boolean
                  notesInFlow:
                    type: boolean
                  notes:
                    type: string
                  type:
                    type: string
                    example: n8n-nodes-base.jira
                  typeVersion:
                    type: number
                    example: 1
                  executeOnce:
                    type: boolean
                    example: false
                  alwaysOutputData:
                    type: boolean
                    example: false
                  retryOnFail:
                    type: boolean
                    example: false
                  maxTries:
                    type: number
                  waitBetweenTries:
                    type: number
                  continueOnFail:
                    type: boolean
                    example: false
                    description: use onError instead
                    deprecated: true
                  onError:
                    type: string
                    example: stopWorkflow
                  position:
                    type: array
                    items:
                      type: number
                    example:
                      - -100
                      - 80
                  parameters:
                    type: object
                    additionalProperties: true
                  credentials:
                    type: object
                    example:
                      jiraSoftwareCloudApi:
                        name: jiraApi
                  customTelemetryTags:
                    type: object
                    properties:
                      tag:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            value:
                              type: string
                          required:
                            - key
                            - value
            connections:
              type: object
              description: Connections between nodes, keyed by source node name
              example:
                Jira:
                  main:
                    - - node: Jira
                        type: main
                        index: 0
            nodeGroups:
              type: array
              description: Visual groupings of nodes shown as frames on the canvas
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the node group
                    example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                  name:
                    type: string
                    description: Display name of the node group
                    example: Data processing
                  description:
                    type: string
                    maxLength: 155
                    description: Optional plain-text description of the node group
                    example: Cleans and normalizes incoming records
                  nodeIds:
                    type: array
                    description: IDs of the nodes that belong to this group
                    items:
                      type: string
                required:
                  - id
                  - name
                  - nodeIds
            authors:
              type: string
            name:
              type: string
              nullable: true
            description:
              type: string
              nullable: true
            autosaved:
              type: boolean
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            workflowPublishHistory:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: number
                  workflowId:
                    type: string
                  versionId:
                    type: string
                    nullable: true
                  event:
                    type: string
                    enum:
                      - activated
                      - deactivated
                  userId:
                    type: string
                    nullable: true
                  createdAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - workflowId
                  - versionId
                  - event
                  - userId
                  - createdAt
          required:
            - versionId
            - workflowId
            - nodes
            - connections
            - nodeGroups
            - authors
            - name
            - description
            - autosaved
            - createdAt
            - updatedAt
            - workflowPublishHistory
      required:
        - id
        - name
        - description
        - active
        - activeVersionId
        - createdAt
        - updatedAt
        - isArchived
        - versionId
        - versionCounter
        - sourceWorkflowId
        - triggerCount
        - nodes
        - connections
        - nodeGroups
        - settings
        - staticData
        - meta
        - shared
        - activeVersion
    workflowPublishPublicDto.generated:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        active:
          type: boolean
          description: Deprecated. Check whether `activeVersionId` is not null instead.
          deprecated: true
        activeVersionId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        isArchived:
          type: boolean
        versionId:
          type: string
        versionCounter:
          type: number
        sourceWorkflowId:
          type: string
          nullable: true
        triggerCount:
          type: number
        nodes:
          type: array
          description: Nodes that make up the workflow
          items:
            type: object
            properties:
              id:
                type: string
                example: 0f5532f9-36ba-4bef-86c7-30d607400b15
              name:
                type: string
                example: Jira
              webhookId:
                type: string
              disabled:
                type: boolean
              notesInFlow:
                type: boolean
              notes:
                type: string
              type:
                type: string
                example: n8n-nodes-base.jira
              typeVersion:
                type: number
                example: 1
              executeOnce:
                type: boolean
                example: false
              alwaysOutputData:
                type: boolean
                example: false
              retryOnFail:
                type: boolean
                example: false
              maxTries:
                type: number
              waitBetweenTries:
                type: number
              continueOnFail:
                type: boolean
                example: false
                description: use onError instead
                deprecated: true
              onError:
                type: string
                example: stopWorkflow
              position:
                type: array
                items:
                  type: number
                example:
                  - -100
                  - 80
              parameters:
                type: object
                additionalProperties: true
              credentials:
                type: object
                example:
                  jiraSoftwareCloudApi:
                    name: jiraApi
              customTelemetryTags:
                type: object
                properties:
                  tag:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        value:
                          type: string
                      required:
                        - key
                        - value
        connections:
          type: object
          description: Connections between nodes, keyed by source node name
          example:
            Jira:
              main:
                - - node: Jira
                    type: main
                    index: 0
        nodeGroups:
          type: array
          description: Visual groupings of nodes shown as frames on the canvas
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique identifier for the node group
                example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
              name:
                type: string
                description: Display name of the node group
                example: Data processing
              description:
                type: string
                maxLength: 155
                description: Optional plain-text description of the node group
                example: Cleans and normalizes incoming records
              nodeIds:
                type: array
                description: IDs of the nodes that belong to this group
                items:
                  type: string
            required:
              - id
              - name
              - nodeIds
        settings:
          type: object
          description: Execution and behaviour settings for the workflow
          properties:
            saveExecutionProgress:
              oneOf:
                - type: boolean
                - type: string
                  enum:
                    - DEFAULT
            saveManualExecutions:
              oneOf:
                - type: boolean
                - type: string
                  enum:
                    - DEFAULT
            saveDataErrorExecution:
              type: string
              enum:
                - DEFAULT
                - all
                - none
            saveDataSuccessExecution:
              type: string
              enum:
                - DEFAULT
                - all
                - none
            executionTimeout:
              type: number
              example: 3600
            errorWorkflow:
              type: string
              example: VzqKEW0ShTXA5vPj
              description: The ID of the workflow that contains the error trigger node.
            timezone:
              type: string
              example: America/New_York
            executionOrder:
              type: string
              example: v1
            binaryMode:
              type: string
              enum:
                - separate
                - combined
              description: Controls how binary data is resolved from a node's input. This is a derived, internal setting rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
            engineType:
              type: string
              nullable: true
              example: v1
              description: The execution engine that runs this workflow. n8n sets it on new workflows when the instance runs new workflows on engine v2 (`N8N_ENGINE_DEFAULT_TYPE=v2` with the `engine-v2` module enabled). It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
            callerPolicy:
              type: string
              enum:
                - any
                - none
                - workflowsFromAList
                - workflowsFromSameOwner
              example: workflowsFromSameOwner
              description: |-
                Controls which workflows are allowed to call this workflow using the Execute Workflow node. Defaults to workflowsFromSameOwner.

                Available options:
                - `any`: Any workflow can call this workflow (no restrictions)
                - `none`: No other workflows can call this workflow (completely blocked)
                - `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow
                - `workflowsFromAList`: Only the workflows listed in `callerIds` can call this workflow
            callerIds:
              type: string
              example: 14, 18, 23
              description: Comma-separated list of workflow IDs allowed to call this workflow (only used with the workflowsFromAList policy)
            timeSavedMode:
              type: string
              enum:
                - fixed
                - dynamic
              description: |-
                Controls how the time saved per execution is calculated.

                Available options:
                - `fixed`: Uses the value in `timeSavedPerExecution`. Use when the time saved is the same for every execution.
                - `dynamic`: Calculates the time saved from actual execution metrics. `timeSavedPerExecution` is ignored.
            timeSavedPerExecution:
              type: number
              description: Estimated time saved per execution in minutes
            redactionPolicy:
              type: string
              enum:
                - none
                - non-manual
                - manual-only
                - all
              example: non-manual
              description: |-
                Controls whether execution data is redacted for this workflow.

                Available options:
                - `none` (default): No redaction. All execution data is stored.
                - `non-manual`: Redact production (non-manually triggered) executions only.
                - `manual-only`: Redact manually triggered executions only.
                - `all`: Redact all executions, manual and production.
            redactCallerExecutions:
              type: boolean
              example: true
              description: Controls whether a workflow that calls this workflow as a sub-workflow has its executions redacted on the same channels as this workflow. The calling execution keeps a copy of the output of this workflow. Defaults to true. Turn it off only when the output of this workflow is not sensitive. Redaction that this workflow received from its own sub-workflows always passes to the caller.
            availableInMCP:
              type: boolean
              example: false
              description: Controls whether this workflow is reachable over the Model Context Protocol (MCP). Defaults to false. The workflow must be active and must hold at least one active Webhook node.
            customTelemetryTags:
              type: array
              items:
                type: object
                properties:
                  key:
                    type: string
                  value:
                    type: string
                required:
                  - key
                  - value
            credentialResolverId:
              type: string
              description: ID of the credential resolver that resolves credentials for this workflow. This is a derived, internal setting managed through the credential resolver configuration rather than something intended to be set programmatically. It is included in workflow responses for reference, but any value sent when creating or updating a workflow is ignored.
          nullable: true
        staticData:
          type: object
          description: Data the workflow keeps between executions
          example:
            lastId: 1
          nullable: true
        pinData:
          type: object
          description: Pinned sample data for nodes, keyed by node name
          nullable: true
        meta:
          type: object
          description: Workflow metadata such as template information
          properties:
            onboardingId:
              type: string
            templateId:
              type: string
            instanceId:
              type: string
            templateCredsSetupCompleted:
              type: boolean
          nullable: true
        tags:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                readOnly: true
                example: 2tUt1wbLX592XDdX
              name:
                type: string
                example: Production
              createdAt:
                type: string
                format: date-time
                readOnly: true
              updatedAt:
                type: string
                format: date-time
                readOnly: true
            required:
              - id
              - name
              - createdAt
              - updatedAt
        activeVersion:
          type: object
          nullable: true
          properties:
            versionId:
              type: string
            workflowId:
              type: string
            nodes:
              type: array
              description: Nodes that make up the workflow
              items:
                type: object
                properties:
                  id:
                    type: string
                    example: 0f5532f9-36ba-4bef-86c7-30d607400b15
                  name:
                    type: string
                    example: Jira
                  webhookId:
                    type: string
                  disabled:
                    type: boolean
                  notesInFlow:
                    type: boolean
                  notes:
                    type: string
                  type:
                    type: string
                    example: n8n-nodes-base.jira
                  typeVersion:
                    type: number
                    example: 1
                  executeOnce:
                    type: boolean
                    example: false
                  alwaysOutputData:
                    type: boolean
                    example: false
                  retryOnFail:
                    type: boolean
                    example: false
                  maxTries:
                    type: number
                  waitBetweenTries:
                    type: number
                  continueOnFail:
                    type: boolean
                    example: false
                    description: use onError instead
                    deprecated: true
                  onError:
                    type: string
                    example: stopWorkflow
                  position:
                    type: array
                    items:
                      type: number
                    example:
                      - -100
                      - 80
                  parameters:
                    type: object
                    additionalProperties: true
                  credentials:
                    type: object
                    example:
                      jiraSoftwareCloudApi:
                        name: jiraApi
                  customTelemetryTags:
                    type: object
                    properties:
                      tag:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            value:
                              type: string
                          required:
                            - key
                            - value
            connections:
              type: object
              description: Connections between nodes, keyed by source node name
              example:
                Jira:
                  main:
                    - - node: Jira
                        type: main
                        index: 0
            nodeGroups:
              type: array
              description: Visual groupings of nodes shown as frames on the canvas
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the node group
                    example: 9b1c8e2a-4d3f-4a6b-8c7d-1e2f3a4b5c6d
                  name:
                    type: string
                    description: Display name of the node group
                    example: Data processing
                  description:
                    type: string
                    maxLength: 155
                    description: Optional plain-text description of the node group
                    example: Cleans and normalizes incoming records
                  nodeIds:
                    type: array
                    description: IDs of the nodes that belong to this group
                    items:
                      type: string
                required:
                  - id
                  - name
                  - nodeIds
            authors:
              type: string
            name:
              type: string
              nullable: true
            description:
              type: string
              nullable: true
            autosaved:
              type: boolean
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            workflowPublishHistory:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: number
                  workflowId:
                    type: string
                  versionId:
                    type: string
                    nullable: true
                  event:
                    type: string
                    enum:
                      - activated
                      - deactivated
                  userId:
                    type: string
                    nullable: true
                  createdAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - workflowId
                  - versionId
                  - event
                  - userId
                  - createdAt
          required:
            - versionId
            - workflowId
            - nodes
            - connections
            - nodeGroups
            - authors
            - name
            - description
            - autosaved
            - createdAt
            - updatedAt
            - workflowPublishHistory
      required:
        - id
        - name
        - description
        - active
        - activeVersionId
        - createdAt
        - updatedAt
        - isArchived
        - versionId
        - versionCounter
        - sourceWorkflowId
        - triggerCount
        - nodes
        - connections
        - nodeGroups
        - settings
        - staticData
        - meta
        - activeVersion
    workflowTagsPublicDto.generated:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
            readOnly: true
            example: 2tUt1wbLX592XDdX
          name:
            type: string
            example: Production
          createdAt:
            type: string
            format: date-time
            readOnly: true
          updatedAt:
            type: string
            format: date-time
            readOnly: true
        required:
          - id
          - name
          - createdAt
          - updatedAt
  responses:
    badRequest:
      description: The request is invalid or provides malformed data.
    unauthorized:
      description: Unauthorized
    forbidden:
      description: Forbidden
    conflict:
      description: Conflict
    unsupportedMediaType:
      description: Unsupported media type.
    unprocessableEntity:
      description: Unprocessable Entity
    tooManyRequests:
      description: Too many requests.
      headers:
        Retry-After:
          description: The number of seconds to wait before you retry the request.
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Limit:
          description: The maximum number of requests allowed in the rate-limit window.
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Remaining:
          description: The number of requests remaining in the rate-limit window.
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Reset:
          description: The time when the rate-limit window resets, as a Unix timestamp in seconds.
          schema:
            type: integer
            format: int64
            minimum: 0
      content:
        application/json:
          schema:
            type: object
            required:
              - message
            properties:
              message:
                type: string
                example: Too many requests
    internalServerError:
      description: Internal server error.
    notFound:
      description: The specified resource was not found.
    serviceUnavailable:
      description: The requested service is temporarily unavailable.
    paymentRequired:
      description: Payment required
    contentTooLarge:
      description: Content too large.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-N8N-API-KEY
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    CookieAuth:
      type: apiKey
      in: cookie
      name: n8n-auth
security:
  - ApiKeyAuth: []
  - BearerAuth: []
  - CookieAuth: []
