{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elocuenti-com/json-schema/elocuenti-com-stage-move-response-schema.json",
  "title": "StageMoveResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elocuenti-com-pipelines-api-openapi.yml#/components/schemas/StageMoveResponse",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/StageMove"
    },
    "request_id": {
      "type": "string",
      "description": "The identifier of this request. Give it to support if you need help.",
      "title": "Request Id"
    },
    "simulated": {
      "description": "`true` only with a sandbox key: the move was checked and nothing was changed.",
      "type": "boolean",
      "title": "Simulated"
    }
  },
  "required": [
    "data",
    "request_id"
  ],
  "$defs": {
    "StageMove": {
      "type": "object",
      "properties": {
        "conversation_id": {
          "type": "string",
          "description": "The conversation you moved.",
          "title": "Conversation Id"
        },
        "result": {
          "type": "string",
          "enum": [
            "moved",
            "enrolled",
            "unchanged"
          ],
          "description": "`moved`: it changed stage (or funnel). `enrolled`: it had no place in any funnel and now has one. `unchanged`: it was already in that stage, so nothing happened.",
          "title": "Result"
        },
        "pipeline_id": {
          "type": "string",
          "description": "The funnel the conversation is in now.",
          "title": "Pipeline Id"
        },
        "stage_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The stage the conversation is in now.",
          "title": "Stage Id"
        },
        "previous": {
          "anyOf": [
            {
              "$ref": "#/$defs/StagePosition"
            },
            {
              "type": "null"
            }
          ],
          "description": "Where it was before, or `null` if it had no place in any funnel. The same as the new place when `result` is `unchanged`."
        }
      },
      "required": [
        "conversation_id",
        "result",
        "pipeline_id",
        "stage_id",
        "previous"
      ],
      "description": "What happened to the conversation.",
      "title": "StageMove"
    },
    "StagePosition": {
      "type": "object",
      "properties": {
        "pipeline_id": {
          "type": "string",
          "description": "The funnel.",
          "title": "Pipeline Id"
        },
        "stage_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The stage, or `null` if the conversation was in a funnel without a stage.",
          "title": "Stage Id"
        }
      },
      "required": [
        "pipeline_id",
        "stage_id"
      ],
      "description": "A place in a funnel.",
      "title": "StagePosition"
    }
  }
}