> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export decisions as a signed bundle

> Build a zip bundle for transfer to another installation.

Sub-decisions are pulled in automatically, so the bundle is always
self-contained — one that imports cleanly and then fails at first
evaluation is worse than none. Anything that cannot travel, such as
an external HTTP node, is recorded so the target refuses the bundle
rather than discovering it at runtime.

Version selection is `versions`, else `published_only`, else the
latest approved version. The publication pointer, membership and
audit history are never exported — they are target-instance state.

This is not how you make a rule live here; publish does that, and
keeps the audit chain intact.

**Required roles**: `author`, `approver` or `workspace_admin`



## OpenAPI

````yaml post /api/decisions/{workspace}/export
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/decisions/{workspace}/export:
    post:
      tags:
        - Decisions
      summary: Export decisions as a signed bundle
      description: |-
        Build a zip bundle for transfer to another installation.

        Sub-decisions are pulled in automatically, so the bundle is always
        self-contained — one that imports cleanly and then fails at first
        evaluation is worse than none. Anything that cannot travel, such as
        an external HTTP node, is recorded so the target refuses the bundle
        rather than discovering it at runtime.

        Version selection is `versions`, else `published_only`, else the
        latest approved version. The publication pointer, membership and
        audit history are never exported — they are target-instance state.

        This is not how you make a rule live here; publish does that, and
        keeps the audit chain intact.

        **Required roles**: `author`, `approver` or `workspace_admin`
      operationId: export_bundle_api_decisions__workspace__export_post
      parameters:
        - name: workspace
          in: path
          required: true
          schema:
            type: string
            maxLength: 64
            pattern: ^[a-z0-9][a-z0-9-]{0,63}$
            description: Workspace slug.
            title: Workspace
          description: Workspace slug.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportRequest'
      responses:
        '200':
          description: A signed bundle containing the selected decisions.
          content:
            application/json:
              schema: {}
            application/zip: {}
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    ExportRequest:
      properties:
        keys:
          items:
            type: string
          type: array
          title: Keys
          description: >-
            Decisions to export. Empty exports every decision in the workspace.
            Sub-decisions are always added automatically — a bundle that imports
            cleanly and then fails at first evaluation is worse than no bundle.
        published_only:
          type: boolean
          title: Published Only
          description: >-
            Export whichever version is currently live for each decision.
            Mutually exclusive with `versions`.
          default: false
        versions:
          additionalProperties:
            type: integer
          type: object
          title: Versions
          description: >-
            Explicit version per decision key. Mutually exclusive with
            `published_only`. Anything omitted falls back to the latest approved
            version.
        suggest_publish:
          type: boolean
          title: Suggest Publish
          description: >-
            Record in the manifest that the target should publish these
            decisions. Advice only — import never publishes, so applying it is
            an explicit second step on the target.
          default: false
      type: object
      title: ExportRequest
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````