# sections.setSectionDirection

> Set section text flow direction (LTR/RTL).



- Member path: `doc.sections.setSectionDirection(…)`
- Mutates document: yes
- Idempotency: `conditional`
- Supports tracked mode: no
- Supports dry run: yes

## Expected result

Returns a SectionMutationResult receipt; reports NO_OP if text direction already matches.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "SectionAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "section"
        },
        "sectionId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "sectionId"
      ]
    }
  },
  "type": "object",
  "properties": {
    "target": {
      "$ref": "#/$defs/SectionAddress"
    },
    "direction": {
      "enum": [
        "ltr",
        "rtl"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "target",
    "direction"
  ]
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "SectionAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "section"
        },
        "sectionId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "sectionId"
      ]
    }
  },
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "success": {
          "const": true
        },
        "section": {
          "$ref": "#/$defs/SectionAddress"
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "section"
      ]
    },
    {
      "type": "object",
      "properties": {
        "success": {
          "const": false
        },
        "failure": {
          "type": "object",
          "properties": {
            "code": {
              "enum": [
                "NO_OP",
                "INVALID_TARGET",
                "CAPABILITY_UNAVAILABLE"
              ]
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "additionalProperties": false,
          "required": [
            "code",
            "message"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "failure"
      ]
    }
  ]
}
```

## Pre-apply throws

- `TARGET_NOT_FOUND`
- `INVALID_TARGET`
- `INVALID_INPUT`
- `CAPABILITY_UNAVAILABLE`
- `INTERNAL_ERROR`

## Non-applied receipt codes

- `NO_OP`
- `INVALID_TARGET`
- `CAPABILITY_UNAVAILABLE`

