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

# Project export API

> Starts an asynchronous export. The server checks project readiness,
discovers agent/tool dependencies, includes required dependency layers,
assembles the archive, and generates its manifest and lockfile.




## OpenAPI

````yaml agent-platform/api-specs/project-import-export.yaml post /v1/projects/{projectId}/export
openapi: 3.1.0
info:
  title: Project Import / Export API
  version: 1.0.0
  summary: >-
    Project-scoped APIs for importing and exporting platform project
    configuration.
  description: |
    Starts asynchronous project import and export operations and exposes their
    status. The operations use the same dependency discovery, validation,
    staging, activation, and rollback flow as the Studio Builder experience.

    Warnings are informational and do not block completion. Errors are blocking,
    are preserved on the operation, and must be propagated to the caller.
servers:
  - url: https://{host}
    description: Replace with your base URL of the platform.
security:
  - apiKey: []
tags:
  - name: Project Import
    description: Import project configuration into an existing project.
  - name: Project Export
    description: Export project configuration as a portable archive.
paths:
  /v1/projects/{projectId}/export:
    post:
      tags:
        - Project Export
      summary: Start a project export
      description: |
        Starts an asynchronous export. The server checks project readiness,
        discovers agent/tool dependencies, includes required dependency layers,
        assembles the archive, and generates its manifest and lockfile.
      operationId: createProjectExport
      parameters:
        - $ref: '#/components/parameters/ProjectId'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportRequest'
      responses:
        '202':
          description: Export accepted for asynchronous processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationAcceptedResponse'
              example:
                success: true
                operationId: exp_01JEXPORT123
                status: queued
                statusUrl: /v1/projects/proj_123/export/exp_01JEXPORT123
        '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'
components:
  parameters:
    ProjectId:
      name: projectId
      in: path
      required: true
      description: Project identifier. The project must belong to the authenticated tenant.
      schema:
        type: string
        minLength: 1
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: Client-generated key used to safely retry operation creation.
      schema:
        type: string
        minLength: 1
        maxLength: 128
  schemas:
    ExportRequest:
      type: object
      additionalProperties: false
      properties:
        format:
          type: string
          description: >-
            Output archive representation. zip is the recommended public
            download format; folder returns a folder-style file map; tar.gz
            returns a gzip-compressed tar archive.
          enum:
            - zip
            - folder
            - tar.gz
          default: zip
        layers:
          type: array
          description: >-
            Optional export layer selection. core is always included. The
            exporter adds recognized required dependency layers for SearchAI,
            workflow, and table tools, or returns an error if an explicit
            selection cannot satisfy dependencies.
          uniqueItems: true
          items:
            $ref: '#/components/schemas/LayerName'
        dslFormat:
          type: string
          description: >-
            Agent definition serialization format. source preserves authored
            DSL; yaml requests compiled YAML where compiler context is
            available.
          enum:
            - source
            - yaml
          default: source
        includeDeployments:
          type: boolean
          description: >-
            Include deployment records and deployment configuration in the
            export. Environment credentials are not included.
          default: false
        includeVersionHistory:
          type: boolean
          description: >-
            Include non-deleted agent and workflow version history when
            supported. Disabled by default to keep exports
            configuration-focused.
          default: false
        includeKnowledgeBaseDocuments:
          type: boolean
          description: >-
            Include extracted Knowledge Base document text in the search layer.
            Disabled by default because document content can be large.
          default: false
        environments:
          type: array
          description: >-
            Optional environment names used to scope environment-specific export
            data.
          uniqueItems: true
          items:
            type: string
        maxKnowledgeBaseDocumentBytes:
          type: integer
          description: >-
            Maximum extracted-text size for an individual exported Knowledge
            Base document, in bytes.
          minimum: 1
        maxTotalKnowledgeBaseDocumentBytes:
          type: integer
          description: >-
            Aggregate extracted-text size limit for all exported Knowledge Base
            documents, in bytes.
          minimum: 1
    OperationAcceptedResponse:
      type: object
      required:
        - success
        - operationId
        - status
        - statusUrl
      properties:
        success:
          type: boolean
          const: true
          description: Indicates that the operation request was accepted for processing.
        operationId:
          type: string
          description: Stable identifier for polling this operation.
        status:
          $ref: '#/components/schemas/OperationStatus'
        statusUrl:
          type: string
          format: uri-reference
          description: Relative URL that can be polled for the operation status.
    LayerName:
      type: string
      description: >-
        Project configuration layer. core=agents/tools/core metadata;
        connections=connectors; prompts=prompt bundles; guardrails=guardrail
        policies; workflows=workflows; evals=evaluation data; search=SearchAI
        configuration; channels=channel definitions; vocabulary=domain
        vocabulary; tables=Agent Tables definitions.
      enum:
        - core
        - connections
        - prompts
        - guardrails
        - workflows
        - evals
        - search
        - channels
        - vocabulary
        - tables
    OperationStatus:
      type: string
      description: >-
        Current asynchronous operation state. queued=accepted and waiting;
        validating=checking input and dependencies; staging=writing staged
        records; activating=making staged records active; packaging=assembling
        the export artifact; processing=worker is executing the operation;
        completed=finished successfully; failed=finished with an error;
        rolling_back=import is undoing partial activation; reverted=import
        completed with changes reverted.
      enum:
        - queued
        - validating
        - staging
        - activating
        - packaging
        - processing
        - completed
        - failed
        - rolling_back
        - reverted
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          $ref: '#/components/schemas/Diagnostic'
    Diagnostic:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Stable machine-readable diagnostic code.
        message:
          type: string
          description: Human-readable explanation of the diagnostic.
        stage:
          type: string
          description: >-
            Processing stage that produced the diagnostic, such as request,
            validation, staging, activation, or packaging.
        layer:
          $ref: '#/components/schemas/LayerName'
        path:
          type: string
          description: Archive file path associated with the diagnostic, when available.
        line:
          type: integer
          minimum: 1
          description: >-
            One-based source line associated with a syntax diagnostic, when
            available.
        details:
          type: object
          description: >-
            Additional structured diagnostic context. Contents depend on the
            diagnostic code.
          additionalProperties: true
  responses:
    BadRequest:
      description: Invalid request, archive, layer selection, or operation parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Authentication required or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Authenticated principal lacks the required project scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: >-
        Project or operation was not found in the authenticated tenant/project
        scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: Operation conflicts with current project state or another operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: |
        Project-bound Platform Key supplied in the x-api-key header. The key
        must include the operation's required scope: project_io.read for export
        operations or project_io.write for import operations. A pipeline that
        promotes changes normally requires both scopes.

````