# Move Automation Action

Moves an automation action by stable ID in an inactive graph. subtree moves its following graph to an open branch; a populated decision requires subtree. Moving one regular action reconnects its old neighbours; goto references retain their IDs. Requires the current revision; dryRun previews without saving.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "automationId": {
      "type": "integer",
      "minimum": 1
    },
    "actionId": {
      "type": "integer",
      "minimum": 1
    },
    "revision": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "afterActionId": {
      "type": "integer",
      "minimum": 1
    },
    "branch": {
      "type": "string",
      "enum": [
        "next",
        "yes",
        "no"
      ]
    },
    "subtree": {
      "type": "boolean",
      "default": false
    },
    "dryRun": {
      "type": "boolean",
      "default": false
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "automationId",
    "actionId",
    "revision",
    "afterActionId",
    "branch"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "automationId",
    "name",
    "revision",
    "status",
    "editorUrl",
    "graph",
    "findings",
    "editable",
    "dryRun",
    "settings",
    "splitTests"
  ],
  "properties": {
    "automationId": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "revision": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "editorUrl": {
      "type": "string"
    },
    "graph": {
      "type": "object",
      "required": [
        "start",
        "goals",
        "states"
      ],
      "properties": {
        "start": {
          "type": "integer"
        },
        "goals": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "states": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "type",
              "next",
              "nextNo"
            ],
            "properties": {
              "id": {
                "type": "integer"
              },
              "type": {
                "type": "string"
              },
              "next": {
                "type": "integer"
              },
              "nextNo": {
                "type": "integer"
              }
            },
            "additionalProperties": true
          }
        }
      }
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "actionId",
          "code",
          "message",
          "warning",
          "variantId"
        ],
        "properties": {
          "actionId": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "warning": {
            "type": "boolean"
          },
          "variantId": {
            "type": "integer"
          }
        }
      }
    },
    "editable": {
      "type": "boolean"
    },
    "dryRun": {
      "type": "boolean"
    },
    "settings": {
      "type": [
        "object",
        "array"
      ]
    },
    "splitTests": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "actionId",
          "id"
        ],
        "properties": {
          "actionId": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "missing": {
            "type": "boolean"
          },
          "revision": {
            "type": [
              "string",
              "null"
            ]
          },
          "durationSeconds": {
            "type": "integer"
          },
          "started": {
            "type": "integer"
          },
          "finished": {
            "type": "integer"
          },
          "winnerIndex": {
            "type": "integer"
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "kind",
                "entityId",
                "weight",
                "goalTagId"
              ],
              "properties": {
                "kind": {
                  "type": "string"
                },
                "entityId": {
                  "type": "integer"
                },
                "weight": {
                  "type": "integer"
                },
                "goalTagId": {
                  "type": "integer"
                },
                "contactCount": {
                  "type": "integer"
                },
                "conversionCount": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    }
  }
}
```

