post:
  x-eov-operation-id: exportWorkflows
  x-eov-operation-handler: v1/handlers/n8n-packages/n8n-packages.handler
  tags:
    - N8nPackage
  summary: 'Beta: Export workflows as an n8n package'
  description: |
    **Beta — disabled by default.** Set `N8N_PUBLIC_API_PACKAGES_ENABLED=true` on the
    instance to enable this endpoint. While disabled, requests return `404`.

    Export one or more workflows as a gzipped tar archive (.n8np). The response is
    streamed as `application/gzip` with a `Content-Disposition` attachment header.
    Requires the n8n Packages feature to be licensed.
  requestBody:
    description: Workflows to include in the exported package.
    required: true
    content:
      application/json:
        schema:
          $ref: '../schemas/exportWorkflowsRequest.yml'
  responses:
    '200':
      description: A gzipped tar archive containing the exported workflows.
      content:
        application/gzip:
          schema:
            type: string
            format: binary
    '400':
      $ref: '../../../../shared/spec/responses/badRequest.yml'
    '401':
      $ref: '../../../../shared/spec/responses/unauthorized.yml'
    '403':
      $ref: '../../../../shared/spec/responses/forbidden.yml'
    '404':
      $ref: '../../../../shared/spec/responses/notFound.yml'
