enhancedocs
For agentsOpen Enhance ↗
Reference / canvas.capture

Enhance documentation

canvas.capture

Freeze an inspected recording moment into a durable screen on its source page, holding the observed canvas revision through attachment.

↓ Markdown

canvas.capture

mutation write

Use when the requested change exactly matches canvas.capture; 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},"waitMs":{"default":1500,"description":"Additional local polling after the server returns an active job; render creation retains its existing bounded HTTP deadline.","type":"integer","minimum":0,"maximum":5000},"baseVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"source":{"type":"object","properties":{"kind":{"type":"string","const":"recording"},"recordingId":{"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)$"},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","recordingId","atMs"],"additionalProperties":false},"previewJobId":{"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)$","description":"The successful canvas_render job whose pixels you inspected at this exact recording time and canvas version."},"placement":{"type":"object","properties":{"kind":{"type":"string","const":"below-source"}},"required":["kind"],"additionalProperties":false}},"required":["canvasRef","baseVersion","source","previewJobId","placement"],"additionalProperties":false}

Example

Show example input
{
 "canvasRef": "00000000-0000-4000-8000-000000000010",
 "baseVersion": 1,
 "source": {
  "kind": "recording",
  "recordingId": "00000000-0000-4000-8000-000000000010",
  "atMs": 500
 },
 "previewJobId": "00000000-0000-4000-8000-000000000010",
 "placement": {
  "kind": "below-source"
 },
 "waitMs": 1500
}

Result

Returns a typed canvas.capture 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 canvas resource to confirm the result.

Compatibility: 219dfc283ee61d5bf1305c451a464c8d2e9b5de80191b78b773f547a51867d61.