Commit several Sume Format files in one PUT: a change set

PUT a files list to a Sume Format's contents URL and it is one commit with one version bump. Files you do not name stay as they are. Existing paths need a sha.

5 min readSume
All posts

PUT /v1/formats/{handle}/{slug}/contents with a files list writes all the named files as one commit, with one version increase and one new package_sha. The list is a change set, not the package: a path that the Format holds and that the body does not name stays as it is, so editing two of twelve files never removes the other ten. Existing paths need their current per-file sha. Source: Editing a Format package, read 2026-10-06.

Which guard fires when?

Two levels of sha, two kinds of conflict.

Contents API guards, read 2026-10-06 from docs.sume.com.
GuardWhereConflict code
Per-file shaInside each files entryformat_content_sha_mismatch; missing gives format_content_sha_required
If-Match package shaRequest headerformat_package_sha_mismatch

What are the file rules?

Only .md, .json, .yaml, .yml and .txt files are accepted, with a 100 MiB limit and at most 1000 paths per batch. On a package conflict, error.details.package_sha holds the current value, so you can re-read and retry.

Sources

Related posts

More in Formats

All Formats posts

Written by Sume