Skip to main content
PUT
Update design.md
Save an edited design.md. Start from 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, cornerRadius or fonts.heading is pinned, so layout defaults stop adjusting it.
  • A changed layout token is written into the design direction ahead of your prose, so it wins over older wording.
  • A changed colors.primary also becomes your brand primary color.
  • A key or section you remove is left unchanged. An empty ## Voice or ## Design direction section 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 email are not saved and come back as a warning.
If you have saved an email as your AI style, designed AI emails copy that email’s look, so new colors, fonts and button values reach them only after you clear the style. The response warns you when this applies.

Request

string
required
The full design.md document, up to 100,000 characters.
string
The version from your last read. When design.md changed since then, the save fails with 409 and nothing is written. Recommended.
boolean
true validates the document and returns the changes and warnings a save would produce, without saving.
Requires the company_profile:manage scope, including for dry runs. Personal API keys also need an owner or admin role in the workspace.

Response fields

boolean
true when this request wrote changes.
boolean
true when you asked for a dry run.
string[]
What changed, in document terms: logo, colors.<key>, fonts.body, fonts.heading, buttons.style, buttons.radius, cornerRadius, voice, designDirection, or layout.<token>.
object[]
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.
string
The document as it reads after the save, or as it would read for a dry run.
string
The current version. It only changes when something was saved.
object
The layout tokens in effect after the save.

Errors and retries

  • 400 with code: DESIGN_MD_BAD_REQUEST: the document has errors, listed in issues with line numbers. Typical causes are invalid YAML, an unquoted hex color (# starts a YAML comment), or an unknown layout value. Nothing is saved.
  • 409 with code: DESIGN_MD_CONFLICT: design.md changed after the read your expectedVersion came from. Get it again, reapply your edits and save with the new version. Do not resend the stale document unchanged.
  • 422: the body is missing markdown, or it is longer than 100,000 characters.
  • A save either applies every change or none, so retrying a failed request is safe.

Responses