---
title: "Sync Headless Assets"
method: POST
path: "/v2/paywalls/{id}/assets"
tags: ["Paywalls V2"]
---

# Sync Headless Assets

`POST /v2/paywalls/{id}/assets`

Resolves a content-addressed asset manifest for a code-first paywall: returns the hosted URL for every asset and a short-lived presigned upload for the ones not yet stored. Runs as the `assets` step of `superwall push`/`publish` before the version push. Identical content is never uploaded twice. Requires paywalls:write scope.

## Path parameters

- `id` string, required — Paywall ID

## Request body

- object
  - `assets` object[], required — an array of at most 100 item(s)
    - `sha256` string, required — SHA-256 hex digest of the asset bytes
    - `bytes` integer, required — Raw size of the asset in bytes
    - `mime` string, required — a string at most 255 character(s) long
    - `file_name` string, required — Content-addressed file name: <sha256>.<ext>

## Response `200`

Success

- object
  - `object` 'paywall.asset_manifest', required — Object type, always `paywall.asset_manifest`
  - `id` string, required — ID of the paywall
  - `assets` object[], required
    - `sha256` string, required — SHA-256 the entry answers for
    - `url` string, required — Public URL the asset is (or will be) served from
    - `upload_url` string — Presigned PUT URL, present only when the asset is missing. The upload must send exactly the manifest Content-Type and `Cache-Control: public, max-age=31536000, immutable`.

## Other responses

- `400` — The request did not match the expected schema
- `401` — No API key was provided in the request
- `403` — The API key does not have permission to perform this action
- `404` — The requested resource was not found
- `422` — @superwall/api-schema/v2/errors/PaywallArchivedError
- `429` — Too many requests have been made in a short period
- `500` — An unexpected error occurred on the server

---

[API](https://skmtc.dev/superwall/apis/superwall-api-v2.md) · [All operations](https://skmtc.dev/superwall/apis/superwall-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/superwall/superwall-api-v2/revisions/e04f76c478af/schema)
