enhancedocs
For agentsOpen Enhance ↗
Reference / prototype.publish

Enhance documentation

prototype.publish

Package, upload, ingest, and attach a static prototype directory.

↓ Markdown

prototype.publish

mutation external

Use when the requested change exactly matches prototype.publish; read the current state first when a version or identifier may have changed.

Before calling

  • Authenticate as the accountable Enhance person.
  • Use only resource identifiers returned by an earlier capability result or supplied by the person.
  • Reuse clientToken only when retrying this exact mutation input.

Input

Show complete JSON Schema
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"canvasId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"prototypeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Existing prototype id to redeploy, or null to create one."},"nodeId":{"type":"string","minLength":1},"targetMode":{"type":"string","enum":["node","prototype"]},"canvasPageId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"directory":{"type":"string","minLength":1,"description":"Absolute local directory containing the built prototype."},"entryPath":{"type":"string","minLength":1,"description":"HTML entry file path relative to directory, normally index.html."},"baseVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"box":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0}},"required":["x","y","width","height"],"description":"World-space position and size for the prototype node on the canvas."}},"required":["canvasId","prototypeId","nodeId","title","directory","entryPath","baseVersion","box"]}

Example

Show example input
{
 "canvasId": "00000000-0000-4000-8000-000000000010",
 "prototypeId": null,
 "nodeId": "prototype_ready",
 "title": "Ready prototype",
 "directory": "/absolute/build",
 "entryPath": "index.html",
 "baseVersion": 1,
 "box": {
  "x": 48,
  "y": 48,
  "width": 1440,
  "height": 900
 }
}

Result

Returns a typed prototype.publish result from the Enhance API without transport-specific prose.

Recovery

  • BAD_REQUEST: correct the named fields and call again.
  • UNAUTHORIZED: restore Enhance authentication, then retry once.
  • FORBIDDEN or NOT_FOUND: check the supplied resource and selection; do not substitute unrelated content. Ask for corrected access or scope if needed.
  • CONFLICT: read the current resource, merge the intended change, and retry with its version.
  • INTERNAL: run Enhance diagnostics, report the failure, and stop repeating the call.

Continue with

  • Read the affected prototype resource to confirm the result.

Compatibility: a5b83fdde17dac097a15d71915ff5b8d2ea6246bd48d4ea736b90a300368a121.