---
title: "Create a portable project archive export"
method: POST
path: "/projects/v1/{project_id}/archives"
tags: ["Project Archives"]
---

# Create a portable project archive export

`POST /projects/v1/{project_id}/archives`

## Request

- Base URL: `https://api.run402.com`
- URL: `https://api.run402.com/projects/v1/{project_id}/archives`
- Auth: one of:
  - API key in header `SIGN-IN-WITH-X`
  - HTTP bearer
  - HTTP bearer

Create an operation-backed export of the supported Run402 Core runtime slice of a Cloud project. Requires `project.archives.export` via SIWX wallet, control-plane session, or scoped grant key. Uses `cloud_write_pause_v1` consistency, excludes secret values/auth credentials/logs/billing/allowance/fleet/provider operations, and returns a ProjectArchive status resource. This is a vendor-lock-in portability artifact, not an entire Cloud project export and not a backup/SLA surface.

## Path parameters

- `project_id` string, required: Run402 project ID. Public IDs are not UUIDs.

## Headers

- `Idempotency-Key` string

## Request body

- ProjectArchiveCreateRequest
  - `scope` 'portable-runtime-v1'
  - `auth` 'stubs' | 'none': Auth subject export mode. `stubs` preserves disabled subject ids; credentials are never exported.
  - `consistency` 'pause-writes' | 'cloud_write_pause_v1'
  - `idempotency_key` string: Optional body idempotency key. The Idempotency-Key header wins when both are supplied.

## Response `200`

Existing archive export returned for an idempotency-key replay.

- ProjectArchive
  - `archive_id` string, required
  - `operation_id` string, required: Same value as archive_id in v1; archive generation is always operation-backed.
  - `project_id` string, required: Run402 project ID. Public IDs are not UUIDs.
  - `status` 'running' | 'ready' | 'failed' | 'expired', required
  - `format_version` 'run402-project-archive.v1', required
  - `scope` 'portable-runtime-v1', required
  - `auth_export` 'none' | 'stubs', required
  - `consistency_mode` 'cloud_write_pause_v1', required
  - `active_release_id` string, nullable, required
  - `consistency` object, required
  - `export_report` ArchiveExportReport, required
    - `schema_version` string
    - `export_scope` string
    - `auth_export` 'none' | 'stubs'
    - `consistency` string
    - `omitted_sensitive_resource_count` integer
    - `unsupported_resource_count` integer
    - `counts` object
    - `bytes` object
  - `portability_report` ArchivePortabilityReport, required
    - `schema_version` string
    - `summary` object
    - `entries` ArchiveDiagnostic[], required
      - `code` string, required
      - `severity` 'info' | 'warning' | 'blocking', required
      - `resource_type` string, required
      - `resource_id` string
      - `path` string
      - `message` string, required
      - `next_action` ArchiveNextAction, required
        - `type` 'run_command' | 'set_secret' | 'change_export_scope' | 'remove_unsupported_feature' | 'retry_later' | 'contact_support' | 'read_docs' | 'none', required
        - `command` string
        - `env_var` string
        - `docs_url` string, uri
        - `message` string
      - `retryable` boolean, required
      - `context` object: Safe structured context. Must not contain secret values or provider internals.
  - `error` object, nullable, required
  - `byte_count` integer, nullable, required
  - `sha256` string, nullable, required: Hex SHA-256 digest of the downloadable archive tar bytes.
  - `content_type` string, nullable, required
  - `download_url` string, nullable, required
  - `download_authorized_until` string, date-time, nullable, required: Short-lived download authorization timestamp. GET status refreshes it for ready archives.
  - `expires_at` string, date-time, required: Archive retention expiration timestamp, 24 hours after creation in v1.
  - `started_at` string, date-time, required
  - `completed_at` string, date-time, nullable, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `next_action` ArchiveNextAction, required
    - `type` 'run_command' | 'set_secret' | 'change_export_scope' | 'remove_unsupported_feature' | 'retry_later' | 'contact_support' | 'read_docs' | 'none', required
    - `command` string
    - `env_var` string
    - `docs_url` string, uri
    - `message` string

## Other responses

- `201`: Archive export created.
- `400`: Error envelope
- `403`: Error envelope
- `409`: Error envelope
- `503`: EXPORT_CONSISTENCY_UNAVAILABLE. No partial archive is made available.

---

[API](https://skmtc.dev/run402/apis/run402-api.md) · [All operations](https://skmtc.dev/run402/apis/run402-api/llms.txt) · [OpenAPI document](https://skmtc.dev/run402/apis/run402-api/revisions/893607557f50?raw)
