Save entry content
save_entry_contentSave/update the content of a collection entry.
Merge semantics (RFC 7396 JSON Merge Patch):
Fields you send override the server's values.
Fields you omit are preserved from the existing entry.
To explicitly clear a field, send it as null.
Arrays are REPLACED wholesale: send the full array you want.
Content is a JSON object where keys MATCH the collection's field schema (call get_collection first to see exact field names and types).
Value shape by field type:
text: string
html: string (HTML)
number: number
checkbox (and the older boolean): true or false
date: a calendar date "YYYY-MM-DD" (e.g. "2026-09-09") when the field's config.time is false or absent; an ISO timestamp with a numeric UTC offset such as "2026-09-09T14:30:00-07:00" (never a Z suffix) when config.time is true. Check the field's config in get_collection. Anything else is refused.
image / media: object { src: string, alt?: string } or a URL string
icon: a library icon path such as "regular/rocket.svg" (styles regular, thin, light, bold, fill, duotone; every style but regular repeats itself in the file name, e.g. "duotone/rocket-duotone.svg"), or the https URL of an SVG or PNG uploaded to the project. To show it on a section bound to the collection, map the item's first icon slot with three keys: "icons[0].pqIcon": "<%=_icon.FIELD.pqIcon%>", "icons[0].src": "<%=_icon.FIELD.src%>", "icons[0].svgStr": "" (FIELD is the icon field's name). Library icons then take the template card's icon color; uploaded files draw as uploaded.
reference: string (target entry ID; must point at an existing entry)
related: string (the ID of another entry in the same collection); an array of IDs when list: true
LIST fields: when a field has list: true in the schema (check get_collection), send an ARRAY of the base type instead, e.g. a list reference takes ["entryId1", "entryId2"], a single-ID string is INVALID and will be rejected. Arrays are replaced wholesale on merge.
The built-in name and slug fields (type name and type slug in the schema) are NOT content: keys for them are refused. Rename an entry or change its address with update_entry.
Example: to update only the body, send { body: "New content" }. Name, slug, and other fields are preserved automatically.
You MUST provide lastVersion from get_entry latestRevision.version for optimistic concurrency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Entry content patch. Send only the fields you want to change; omitted fields are preserved from the existing entry. Send null to clear a field. Call get_collection to see the field schema. | |
| entryId | Yes | The entry ID | |
| projectId | Yes | The project ID | |
| lastVersion | Yes | The current revision version (from get_entry latestRevision.version). Required for conflict detection. |