> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superdoc.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# images.setZOrder

> Set the z-order (relativeHeight) for a floating image.

## Summary

Set the z-order (relativeHeight) for a floating image.

* Operation ID: `images.setZOrder`
* API member path: `editor.doc.images.setZOrder(...)`
* Mutates document: `yes`
* Idempotency: `conditional`
* Supports tracked mode: `yes`
* Supports dry run: `yes`
* Deterministic target resolution: `yes`

## Expected result

Returns an ImagesMutationResult.

## Input fields

| Field | Type | Required | Description |
| - | - | - | - |
| `imageId` | string | yes | |
| `zOrder` | object | yes | |
| `zOrder.relativeHeight` | integer | yes | |

### Example request

```json theme={null}
{
  "imageId": "example",
  "zOrder": {
    "relativeHeight": 1
  }
}
```

## Output fields

| Field | Type | Required | Description |
| - | - | - | - |
| `failure` | object | no | |
| `image` | object | no | |
| `success` | boolean | no | |

### Example response

```json theme={null}
{
  "image": {},
  "success": true
}
```

## Pre-apply throws

* `TARGET_NOT_FOUND`
* `AMBIGUOUS_TARGET`
* `INVALID_TARGET`
* `CAPABILITY_UNAVAILABLE`

## Non-applied failure codes

* `NO_OP`

## Raw schemas

> [accordion] Raw input schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "imageId": {
>       "type": "string"
>     },
>     "zOrder": {
>       "additionalProperties": false,
>       "properties": {
>         "relativeHeight": {
>           "maximum": 4294967295,
>           "minimum": 0,
>           "type": "integer"
>         }
>       },
>       "required": [
>         "relativeHeight"
>       ],
>       "type": "object"
>     }
>   },
>   "required": [
>     "imageId",
>     "zOrder"
>   ],
>   "type": "object"
> }
> ```

> [accordion] Raw output schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "failure": {
>       "type": "object"
>     },
>     "image": {
>       "type": "object"
>     },
>     "success": {
>       "type": "boolean"
>     }
>   },
>   "type": "object"
> }
> ```

> [accordion] Raw success schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "image": {
>       "type": "object"
>     },
>     "success": {
>       "const": true
>     }
>   },
>   "required": [
>     "success",
>     "image"
>   ],
>   "type": "object"
> }
> ```

> [accordion] Raw failure schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "failure": {
>       "additionalProperties": false,
>       "properties": {
>         "code": {
>           "type": "string"
>         },
>         "message": {
>           "type": "string"
>         }
>       },
>       "required": [
>         "code",
>         "message"
>       ],
>       "type": "object"
>     },
>     "success": {
>       "const": false
>     }
>   },
>   "required": [
>     "success",
>     "failure"
>   ],
>   "type": "object"
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.