design.md
Update design.md
Save an edited design.md
PUT
Update design.md
Save an edited design.md. Start from the
Requires the
markdown returned by Get design.md, change what you want, and send the whole document back.
Only values that differ from the current document are saved:
- A frontmatter value you leave exactly as returned is not written, so it keeps working as it does now. Saving the document unchanged writes nothing.
- A changed
buttons.radius,cornerRadiusorfonts.headingis pinned, so layout defaults stop adjusting it. - A changed
layouttoken is written into the design direction ahead of your prose, so it wins over older wording. - A changed
colors.primaryalso becomes your brand primary color. - A key or section you remove is left unchanged. An empty
## Voiceor## Design directionsection clears it. An empty design direction returns to the defaults derived from your brand. - Other
##sections, and text before the first section, are kept as part of the design direction. - Edits to
## Reference emailare not saved and come back as a warning.
Request
The
version from your last read. When design.md changed since then, the save
fails with 409 and nothing is written. Recommended.true validates the document and returns the changes and warnings a save
would produce, without saving.company_profile:manage scope, including for dry runs. Personal API keys also need an owner or admin role in the workspace.
Response fields
What changed, in document terms:
logo, colors.<key>, fonts.body,
fonts.heading, buttons.style, buttons.radius, cornerRadius,
voice, designDirection, or layout.<token>.Notes that did not block the save, each with a
message and, when it maps to
one, a line: unknown keys that were ignored, edits to the read-only
Reference email section, and theme values a saved AI style overrides.Errors and retries
400withcode: DESIGN_MD_BAD_REQUEST: the document has errors, listed inissueswith line numbers. Typical causes are invalid YAML, an unquoted hex color (#starts a YAML comment), or an unknown layout value. Nothing is saved.409withcode: DESIGN_MD_CONFLICT: design.md changed after the read yourexpectedVersioncame from. Get it again, reapply your edits and save with the new version. Do not resend the stale document unchanged.422: the body is missingmarkdown, or it is longer than 100,000 characters.- A save either applies every change or none, so retrying a failed request is safe.