Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Insert a new image at the target position.- Operation ID:
create.image - API member path:
editor.doc.create.image(...) - Mutates document:
yes - Idempotency:
non-idempotent - Supports tracked mode:
no - Supports dry run:
yes - Deterministic target resolution:
yes
Expected result
Returns a CreateImageResult with the new image address.Input fields
| Field | Type | Required | Description | ||||
|---|---|---|---|---|---|---|---|
alt | string | no | |||||
at | object(kind=“documentStart”) \ | object(kind=“documentEnd”) \ | object(kind=“before”) \ | object(kind=“after”) \ | object(kind=“inParagraph”) | no | One of: object(kind=“documentStart”), object(kind=“documentEnd”), object(kind=“before”), object(kind=“after”), object(kind=“inParagraph”) |
size | object | no | |||||
size.height | number | no | |||||
size.width | number | no | |||||
src | string | yes | |||||
title | string | no |
Example request
Output fields
| Field | Type | Required | Description |
|---|---|---|---|
failure | object | no | |
image | object | no | |
success | boolean | no |
Example response
Pre-apply throws
TARGET_NOT_FOUNDINVALID_TARGETCAPABILITY_UNAVAILABLEINVALID_INPUT
Non-applied failure codes
INVALID_TARGETINVALID_INPUT
Raw schemas
Raw input schema
Raw input schema
Raw output schema
Raw output schema
Raw success schema
Raw success schema
Raw failure schema
Raw failure schema

