Allocate the project's vault, or push-to-create it (owner / org member)
Accepts ONE of two mutually-exclusive addressing forms (repo-first-onramp D6). {project_id} (owner-only, gitvault.create): allocates AT MOST ONE vault for an EXISTING project and returns the control-plane-signed allocation record binding the principal, org, project, and the proposed creator key fingerprints. IDEMPOTENT on client_creation_id: replaying the same id returns the same record with deduplicated: true (200 instead of 201), so a crashed creator resumes. Allocation does NOT set the project's vault_policy - a freshly allocated vault leaves it null and deploys proceed ungated until an owner sets it via PATCH .../policy, the ONLY writer of vault_policy. A superseded allocation is refused ALLOCATION_SUPERSEDED; a foreign creation in progress is VAULT_CREATION_CONFLICT. {org_slug, repo_name} (push-to-create): when the project does not exist yet, authorizes via org membership (developer+, the same bar as POST /projects/v1 with an explicit org_id) instead of a project-scoped capability, then atomically claims the repo name, creates the project, and allocates its vault - all in one call. The name-claim is race-safe: a losing concurrent push gets a typed REPO_CREATION_CONFLICT naming the winner's project_id, with a next_actions entry to push again unchanged (never a transparent retarget, never an orphan project row). A slug in its release cooldown is refused SLUG_RELEASED naming the successor.
Request
- Base URL: https://api.run402.com
- URL: https://api.run402.com/vaults/v1
- Auth: one of:
- API key in header SIGN-IN-WITH-X
- HTTP bearer
Headers
SIWX auth header — base64-encoded JSON payload containing a signed CAIP-122 (EIP-4361) message. See https://docs.x402.org/extensions/sign-in-with-x.
Request body
Response
Idempotent replay of the same client_creation_id
Changes
No recorded changes to this operation across all 1 revision of this API.