enhancedocs
For agentsOpen Enhance ↗
Reference / prototype.publishCanvas

Enhance documentation

prototype.publishCanvas

Publish a static build or resume an existing deployment with a revision-checked canvas attachment, returning bounded ingestion progress and a separate attachment receipt.

↓ Markdown

prototype.publishCanvas

mutation external

Use when the requested change exactly matches prototype.publishCanvas; 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":{"canvasRef":{"type":"string","minLength":1},"baseVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"waitMs":{"default":1500,"description":"Additional ingestion polling, capped at five seconds. This budget does not include packaging or network transfers.","type":"integer","minimum":0,"maximum":5000},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"directory"},"prototypeId":{"default":null,"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"}]},"nodeId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"entryPath":{"default":"index.html","type":"string","minLength":1},"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"],"additionalProperties":false},"directory":{"type":"string","minLength":1}},"required":["kind","nodeId","title","box","directory"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"deployment"},"deploymentId":{"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)$"}},"required":["kind","deploymentId"],"additionalProperties":false}]}},"required":["canvasRef","baseVersion","source"],"additionalProperties":false}

Example

Show example input
{
 "canvasRef": "00000000-0000-4000-8000-000000000010",
 "baseVersion": 1,
 "source": {
  "kind": "deployment",
  "deploymentId": "00000000-0000-4000-8000-000000000010"
 },
 "waitMs": 1500
}

Result

Returns a typed prototype.publishCanvas 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: fd5fe385aa8edee5f4fc83dbdaca4024e3d2ef352e4131176efbab3f86706590.