---
title: "Negotiate missing CAS content"
method: POST
path: "/content/v1/plans"
tags: ["Content"]
---

# Negotiate missing CAS content

`POST /content/v1/plans`

## Request

- Base URL: `https://api.run402.com`
- URL: `https://api.run402.com/content/v1/plans`
- Auth: API key in header `apikey`

Negotiate which content SHAs are missing for the project. Returns presigned PUT URLs for missing content. Used internally by the SDK for site files, function source, migration SQL refs, and large-manifest pre-uploads. Storage is globally shared (one S3 object per SHA across the platform); presence is project-scoped via internal.plan_claims.

## Request body

- object
  - `content` object[], required
    - `sha256` string, required: Hex-encoded SHA-256, 64 chars lowercase.
    - `size` integer, required
    - `content_type` string

## Response `201`

Plan created (or refreshed). Returns plan_id, expires_at, missing[], entries[].

- ContentPlanResponse
  - `plan_id` string, required
  - `expires_at` string, date-time, required
  - `missing` object[], required
    - `sha256` string, required
    - `mode` 'single' | 'multipart', required
    - `parts` UploadPart[], required
      - `part_number` integer, required
      - `url` string, uri, required
      - `byte_start` integer, required
      - `byte_end` integer, required
    - `part_size_bytes` integer, required
    - `part_count` integer, required
    - `upload_id` string, uuid, required
    - `staging_key` string, required
    - `expires_at` string, date-time, required
  - `entries` object[], required
    - `sha256` string, required
    - `missing` boolean, required

## Other responses

- `401`: Missing apikey header
- `403`: Project is past_due/frozen/dormant — control-plane gated. Envelope carries `code: PROJECT_PAST_DUE` / `PROJECT_FROZEN` / `PROJECT_DORMANT`.
- `413`: QUOTA_EXCEEDED — plan would exceed project tier storage limit

---

[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)
