{
  "openapi": "3.0.2",
  "info": {
    "title": "Blueprint Manifest API",
    "version": "4.7.0",
    "description": "Service to create and install Blueprint Manifest files"
  },
  "tags": [
    {
      "name": "Jobs",
      "description": "Manage Export and Import Jobs"
    },
    {
      "name": "Export",
      "description": "Export a Blueprint Manifest"
    },
    {
      "name": "Import",
      "description": "Install or update a Blueprint Manifest"
    },
    {
      "name": "Manifests",
      "description": "Manage installed Manifests"
    },
    {
      "name": "Blueprints",
      "description": "Manage Custom and Installed Blueprints"
    },
    {
      "name": "Installations",
      "description": "Manage installation jobs"
    },
    {
      "name": "Marketplace Listings",
      "description": "Manage marketplace listings for blueprints"
    },
    {
      "name": "Marketplace Listing Versions",
      "description": "Manage versions for marketplace listings"
    },
    {
      "name": "Patches",
      "description": "Manage blueprint patches for mass rollouts"
    },
    {
      "name": "Uniqueness Criteria",
      "description": "Configure per-org field sets used to match existing resources during install"
    }
  ],
  "security": [
    {
      "EpilotAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://blueprint-manifest.sls.epilot.io"
    }
  ],
  "paths": {
    "/v1/blueprint-manifest/jobs/{job_id}": {
      "get": {
        "operationId": "getJob",
        "summary": "getJob",
        "description": "Get the current status of a blueprint (export or import)",
        "deprecated": true,
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/JobID"
          }
        ],
        "responses": {
          "200": {
            "description": "Current status of the blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          }
        }
      }
    },
    "/v1/blueprint-manifest/jobs:createExport": {
      "post": {
        "operationId": "createExport",
        "summary": "createExport",
        "description": "Creates a new Export Job with a list of available resources to export from the passed root resource.\n\nMultiple root resources can be added by calling this multiple times with the same jobId\n",
        "deprecated": true,
        "tags": [
          "Export"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "resources": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "$ref": "#/components/schemas/ResourceNodeType"
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ]
                    },
                    "minItems": 1
                  },
                  "jobId": {
                    "$ref": "#/components/schemas/JobID"
                  },
                  "isExportingMultipleResources": {
                    "type": "boolean",
                    "description": "Temporary flag to indicate if multiple resources are being exported"
                  },
                  "pipelineId": {
                    "type": "string",
                    "description": "Pipeline ID selected when doing the sandbox sync"
                  },
                  "manifestId": {
                    "type": "string",
                    "description": "ID of the installed manifest to load the resource addresses from"
                  }
                },
                "required": [
                  "resources"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created Export Job ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "$ref": "#/components/schemas/JobID"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/blueprint-manifest/jobs/{job_id}:exportManifest": {
      "post": {
        "operationId": "exportManifest",
        "summary": "exportManifest",
        "description": "Triggers exporting a manifest file using selected resoruce ids for a job created with `createExportJob`",
        "deprecated": true,
        "tags": [
          "Export"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/JobID"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "selectedResourceIds": {
                    "description": "An array of resource IDs to export",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "resourceName": {
                    "type": "string",
                    "example": "journey_HouseConnectionJourney"
                  },
                  "metadata": {
                    "type": "object",
                    "properties": {
                      "markdown": {
                        "type": "object",
                        "properties": {
                          "manifest": {
                            "type": "string"
                          },
                          "preinstall": {
                            "type": "string"
                          },
                          "postinstall": {
                            "type": "string"
                          }
                        }
                      },
                      "docs_link": {
                        "type": "string"
                      },
                      "source_blueprint_name": {
                        "type": "string"
                      },
                      "source_blueprint_slug": {
                        "type": "string"
                      },
                      "source_blueprint_version": {
                        "type": "string"
                      }
                    }
                  },
                  "isExportingMultipleResources": {
                    "type": "boolean",
                    "description": "Temporary flag to indicate if multiple resources are being exported"
                  },
                  "generateAISummary": {
                    "type": "boolean",
                    "default": false
                  },
                  "language": {
                    "type": "string",
                    "enum": [
                      "en",
                      "de"
                    ]
                  }
                },
                "required": [
                  "resourceName",
                  "selectedResourceIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Export Job ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "$ref": "#/components/schemas/JobID"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/blueprint-manifest:uploadManifest": {
      "post": {
        "operationId": "uploadManifest",
        "summary": "uploadManifest",
        "description": "Create pre-signed S3 URL to upload a manifest file.\n",
        "tags": [
          "Import"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadFilePayload"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Pre-signed URL for POST / PUT upload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "s3ref": {
                      "$ref": "#/components/schemas/S3Reference"
                    },
                    "upload_url": {
                      "type": "string",
                      "format": "url",
                      "example": "https://epilot-dev-blueprints.s3.eu-central-1.amazonaws.com/templates/document.pdf"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/blueprint-manifest/jobs:createPlan": {
      "post": {
        "operationId": "createPlan",
        "summary": "createPlan",
        "description": "Creates a new import job from an uploaded manifest file and returns the plan.\n\nCreates an updated plan for an installed manifest when `manifest_id` is passed\n",
        "deprecated": true,
        "tags": [
          "Import"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "s3ref": {
                        "allOf": [
                          {
                            "description": "s3ref of manifest file uploaded via `uploadManifest`"
                          },
                          {
                            "$ref": "#/components/schemas/S3Reference"
                          }
                        ]
                      },
                      "manifest_id": {
                        "allOf": [
                          {
                            "description": "Update an existing manifest (optional)"
                          },
                          {
                            "$ref": "#/components/schemas/ManifestID"
                          }
                        ]
                      },
                      "job_id": {
                        "allOf": [
                          {
                            "description": "Continue a previous job"
                          },
                          {
                            "$ref": "#/components/schemas/JobID"
                          }
                        ]
                      },
                      "source": {
                        "allOf": [
                          {
                            "description": "Source of the manifest"
                          },
                          {
                            "$ref": "#/components/schemas/ManifestSource"
                          }
                        ]
                      },
                      "resourcesToIgnore": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "List of resources to ignore changes for"
                      },
                      "resourceReplacements": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ResourceReplacement"
                        },
                        "description": "List of resource replacements to apply during import"
                      },
                      "deployedFrom": {
                        "type": "object",
                        "properties": {
                          "sourceOrganizationId": {
                            "type": "string"
                          },
                          "sourceManifestId": {
                            "type": "string"
                          },
                          "sourceOrganizationType": {
                            "type": "string",
                            "enum": [
                              "sandbox",
                              "production"
                            ]
                          }
                        },
                        "required": [
                          "sourceOrganizationId",
                          "sourceManifestId",
                          "sourceOrganizationType"
                        ]
                      }
                    },
                    "required": [
                      "s3ref"
                    ]
                  },
                  {
                    "type": "object",
                    "deprecated": true,
                    "properties": {
                      "manifestFilePath": {
                        "deprecated": true,
                        "description": "Manifest s3 key uploaded via `uploadManifest`",
                        "type": "string"
                      },
                      "manifest_id": {
                        "allOf": [
                          {
                            "description": "Update an existing manifest (optional)"
                          },
                          {
                            "$ref": "#/components/schemas/ManifestID"
                          }
                        ]
                      },
                      "job_id": {
                        "allOf": [
                          {
                            "description": "Continue a previous job"
                          },
                          {
                            "$ref": "#/components/schemas/JobID"
                          }
                        ]
                      },
                      "source": {
                        "allOf": [
                          {
                            "description": "Source of the manifest"
                          },
                          {
                            "$ref": "#/components/schemas/ManifestSource"
                          }
                        ]
                      },
                      "resourcesToIgnore": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "List of resources to ignore changes for"
                      },
                      "resourceReplacements": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ResourceReplacement"
                        },
                        "description": "List of resource replacements to apply during import"
                      },
                      "deployedFrom": {
                        "type": "object",
                        "properties": {
                          "sourceOrganizationId": {
                            "type": "string"
                          },
                          "sourceManifestId": {
                            "type": "string"
                          },
                          "sourceOrganizationType": {
                            "type": "string",
                            "enum": [
                              "sandbox",
                              "production"
                            ]
                          }
                        },
                        "required": [
                          "sourceOrganizationId",
                          "sourceManifestId",
                          "sourceOrganizationType"
                        ]
                      }
                    },
                    "required": [
                      "manifestFilePath"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created Import Job ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "example": "4854bb2a-94f9-424d-a968-3fb17fb0bf89"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/blueprint-manifest/jobs/{job_id}:applyPlan": {
      "post": {
        "operationId": "applyPlan",
        "summary": "applyPlan",
        "description": "Apply a plan returned by `createPlan`.",
        "deprecated": true,
        "tags": [
          "Import"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/JobID"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "resourcesToIgnore": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "List of resources to ignore changes for"
                  },
                  "resourceReplacements": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ResourceReplacement"
                    },
                    "description": "List of resource replacements to apply during import"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Applied Import Job ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "$ref": "#/components/schemas/JobID"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/blueprint-manifest/manifests": {
      "get": {
        "operationId": "listInstalledManifests",
        "summary": "listInstalledManifests",
        "description": "List Blueprint Manifests installed to the organization",
        "deprecated": true,
        "tags": [
          "Manifests"
        ],
        "responses": {
          "200": {
            "description": "Installed Blueprint Manifests in the organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "example": 1
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ManifestItem"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/blueprint-manifest/manifests/{manifest_id}": {
      "get": {
        "operationId": "getManifest",
        "summary": "getManifest",
        "description": "Get installed Manifest by ID",
        "deprecated": true,
        "tags": [
          "Manifests"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "manifest_id",
            "schema": {
              "$ref": "#/components/schemas/ManifestID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Installed Blueprint Manifest in the Organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Manifest"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateManifest",
        "summary": "updateManifest",
        "description": "Update an installed manifest\n",
        "deprecated": true,
        "tags": [
          "Manifests"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "manifest_id",
            "schema": {
              "$ref": "#/components/schemas/ManifestID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutManifestPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated Manifest",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Manifest"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteManifest",
        "summary": "deleteManifest",
        "description": "Remove installed manifest from the org\n\nNote that this does not delete the installed resources of the Manifest!\n",
        "deprecated": true,
        "tags": [
          "Manifests"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "manifest_id",
            "schema": {
              "$ref": "#/components/schemas/ManifestID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted Manifest",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Manifest"
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints": {
      "get": {
        "operationId": "listBlueprints",
        "summary": "listBlueprints",
        "description": "List Custom and Installed Blueprints",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "name": "archived",
            "in": "query",
            "description": "Filter blueprints by archived status. If true, returns only archived blueprints. If false or not provided, returns only non-archived blueprints.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blueprints",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "example": 1
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Blueprint"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createBlueprint",
        "summary": "createBlueprint",
        "description": "Create a Blueprint",
        "tags": [
          "Blueprints"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Blueprint"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created Blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blueprint"
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints:marketplace": {
      "get": {
        "operationId": "listInstalledMarketplaceBlueprints",
        "summary": "listInstalledMarketplaceBlueprints",
        "description": "List installed Marketplace Blueprints for the organization.\nWhen multiple blueprints have the same slug, returns only the most recently created one.\n",
        "tags": [
          "Blueprints"
        ],
        "responses": {
          "200": {
            "description": "Installed Marketplace Blueprints",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "example": 1
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InstalledMarketplaceBlueprintItem"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints:pre-install": {
      "post": {
        "operationId": "preInstallBlueprint",
        "summary": "preInstallBlueprint",
        "description": "Pre-install a Blueprint based on a blueprint file",
        "tags": [
          "Blueprints"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "blueprint_file": {
                    "type": "string",
                    "description": "URL to the blueprint zip file"
                  },
                  "source_blueprint_type": {
                    "type": "string",
                    "enum": [
                      "marketplace"
                    ]
                  },
                  "slug": {
                    "type": "string",
                    "description": "Slug to enforce in this blueprint. Used in marketplace blueprints to keep it consistent with webflow."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Blueprint preview data for UI display",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlueprintPreview"
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints:preview/{preview_id}": {
      "get": {
        "operationId": "getBlueprintPreview",
        "summary": "getBlueprintPreview",
        "description": "Get Blueprint Preview by ID",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "preview_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blueprint Preview",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlueprintPreview"
                }
              }
            }
          },
          "404": {
            "description": "Blueprint Preview not found"
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprint:install": {
      "post": {
        "operationId": "installBlueprint",
        "summary": "installBlueprint",
        "description": "Kick off a new blueprint installation job. Returns 202 Accepted with Location header pointing to the job resource\n",
        "tags": [
          "Blueprints"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source_org_id": {
                    "type": "string"
                  },
                  "source_blueprint_id": {
                    "$ref": "#/components/schemas/BlueprintID"
                  },
                  "source_blueprint_file": {
                    "type": "string",
                    "description": "URL to the blueprint zip file"
                  },
                  "destination_org_id": {
                    "type": "string"
                  },
                  "destination_blueprint_id": {
                    "$ref": "#/components/schemas/BlueprintID"
                  },
                  "source_auth_token": {
                    "type": "string",
                    "description": "Auth token with access to the source org. Required for cross-org auto-verification when the caller's bearer token belongs to the destination org."
                  },
                  "destination_auth_token": {
                    "type": "string",
                    "description": "Auth token with access to the destination org. Defaults to the caller's bearer token."
                  },
                  "options": {
                    "$ref": "#/components/schemas/BlueprintInstallationJobOptions"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "simple",
                      "advanced"
                    ],
                    "description": "Installation mode"
                  },
                  "source_blueprint_type": {
                    "type": "string",
                    "enum": [
                      "marketplace"
                    ]
                  },
                  "slug": {
                    "type": "string",
                    "description": "Slug to enforce in this blueprint. Used in marketplace blueprints to keep it consistent with webflow."
                  },
                  "auto_enable_features": {
                    "type": "boolean",
                    "description": "If true, automatically enable required features in the destination org before installing"
                  }
                },
                "required": [
                  "mode"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Blueprint installation job started",
            "headers": {
              "Location": {
                "description": "URL to poll the job",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job_id": {
                      "$ref": "#/components/schemas/BlueprintJobID"
                    },
                    "destination_blueprint_id": {
                      "$ref": "#/components/schemas/BlueprintID"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}": {
      "get": {
        "operationId": "getBlueprint",
        "summary": "getBlueprint",
        "description": "Get Blueprint by ID",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blueprint"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateBlueprint",
        "summary": "updateBlueprint",
        "description": "Update a Blueprint",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Blueprint"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated Blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blueprint"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteBlueprint",
        "summary": "deleteBlueprint",
        "description": "Delete a Blueprint",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted Blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blueprint"
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}/validate": {
      "post": {
        "operationId": "validateBlueprint",
        "summary": "validateBlueprint",
        "description": "Start a blueprint validation job. Validates Terraform for the blueprint (all types).\nReturns 202 Accepted with job_id. Poll GET /jobs/{job_id} for status, valid, and errors.\n",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Validation job started",
            "headers": {
              "Location": {
                "description": "URL to poll the job",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job_id": {
                      "$ref": "#/components/schemas/BlueprintJobID"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Blueprint not found"
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}:verify": {
      "post": {
        "operationId": "verifyBlueprint",
        "summary": "verifyBlueprint",
        "description": "Start a blueprint verification job. Compares resource configurations between a source org\nand a destination org to verify that a sync/install was successful.\nReturns 202 Accepted with job_id. Poll GET /jobs/{job_id} for status, summary, and resource_results.\n",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "source_org_id",
                  "source_blueprint_id",
                  "destination_org_id",
                  "destination_blueprint_id"
                ],
                "properties": {
                  "source_org_id": {
                    "type": "string",
                    "description": "Organization ID of the source org"
                  },
                  "source_blueprint_id": {
                    "$ref": "#/components/schemas/BlueprintID"
                  },
                  "destination_org_id": {
                    "type": "string",
                    "description": "Organization ID of the destination org"
                  },
                  "destination_blueprint_id": {
                    "$ref": "#/components/schemas/BlueprintID"
                  },
                  "source_auth_token": {
                    "type": "string",
                    "description": "Auth token with access to the source org (e.g. pipeline token). If not provided, the caller's bearer token is used for both orgs."
                  },
                  "destination_auth_token": {
                    "type": "string",
                    "description": "Auth token with access to the destination org. Required for cross-org verification when the caller token only has access to the source org. If not provided, the caller's bearer token is used for both orgs."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Verification job started",
            "headers": {
              "Location": {
                "description": "URL to poll the job",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job_id": {
                      "$ref": "#/components/schemas/BlueprintJobID"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Blueprint not found"
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}/patches:detect": {
      "post": {
        "operationId": "detectPatchChanges",
        "summary": "detectPatchChanges",
        "description": "Detect changes between the current state of a blueprint's resources and its tfstate baseline.\nReturns field-level diffs for resources that have been modified since the blueprint was last installed/exported.\n",
        "tags": [
          "Patches"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source_org_id": {
                    "type": "string",
                    "description": "Organization ID of the source org where changes were made"
                  },
                  "dest_org_id": {
                    "type": "string",
                    "description": "Organization ID of a destination org (used to load tfstate baseline)"
                  },
                  "dest_blueprint_id": {
                    "type": "string",
                    "description": "Blueprint ID in the destination org (used to locate tfstate in S3)"
                  },
                  "rollout_id": {
                    "type": "string",
                    "description": "ID of the mass rollout"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Detected changes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectChangesResult"
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}/patches": {
      "post": {
        "operationId": "createPatch",
        "summary": "createPatch",
        "description": "Create a new patch for a blueprint.",
        "tags": [
          "Patches"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "blueprint_id",
                  "rollout_id",
                  "source_org_id",
                  "name",
                  "resources"
                ],
                "properties": {
                  "blueprint_id": {
                    "$ref": "#/components/schemas/BlueprintID"
                  },
                  "rollout_id": {
                    "type": "string"
                  },
                  "source_org_id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "resources": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PatchResourceDiff"
                    }
                  },
                  "changelog": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Patch created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlueprintPatch"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listPatches",
        "summary": "listPatches",
        "description": "List all patches for a blueprint.",
        "tags": [
          "Patches"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of patches",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BlueprintPatch"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}/patches/{patch_id}": {
      "get": {
        "operationId": "getPatch",
        "summary": "getPatch",
        "description": "Get a patch by ID, including per-org execution results.",
        "tags": [
          "Patches"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          },
          {
            "in": "path",
            "required": true,
            "name": "patch_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Patch details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlueprintPatchWithResults"
                }
              }
            }
          },
          "404": {
            "description": "Patch not found"
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}/patches/{patch_id}:apply": {
      "post": {
        "operationId": "applyPatch",
        "summary": "applyPatch",
        "description": "Apply a patch to a single destination org.",
        "tags": [
          "Patches"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          },
          {
            "in": "path",
            "required": true,
            "name": "patch_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "org_id",
                  "org_name",
                  "dest_blueprint_id"
                ],
                "properties": {
                  "org_id": {
                    "type": "string"
                  },
                  "org_name": {
                    "type": "string"
                  },
                  "dest_blueprint_id": {
                    "type": "string"
                  },
                  "dest_org_id": {
                    "type": "string"
                  },
                  "destination_auth_token": {
                    "type": "string",
                    "description": "Auth token with access to the destination org (e.g. pipeline token)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Patch execution result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgPatchExecution"
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}/patches/{patch_id}/orgs/{org_id}:retry": {
      "post": {
        "operationId": "retryPatchOrg",
        "summary": "retryPatchOrg",
        "description": "Retry a failed patch execution for a specific org.",
        "tags": [
          "Patches"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          },
          {
            "in": "path",
            "required": true,
            "name": "patch_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "required": true,
            "name": "org_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "org_name": {
                    "type": "string"
                  },
                  "dest_blueprint_id": {
                    "type": "string"
                  },
                  "destination_auth_token": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Retry execution result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgPatchExecution"
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}:export": {
      "post": {
        "operationId": "exportBlueprint",
        "summary": "exportBlueprint",
        "description": "Kick off a new blueprint export job. Returns 202 Accepted with Location header pointing to the job resource.\n",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "destination_org_id": {
                    "type": "string"
                  },
                  "destination_blueprint_id": {
                    "type": "string"
                  },
                  "validate": {
                    "type": "boolean",
                    "description": "When true, run terraform validate before creating the export zip. If validation fails, the job will be marked as FAILED with errors."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Blueprint export job started",
            "headers": {
              "Location": {
                "description": "URL to poll the job",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job_id": {
                      "$ref": "#/components/schemas/BlueprintJobID"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/marketplace/slugs": {
      "get": {
        "operationId": "listMarketplaceSlugs",
        "summary": "listMarketplaceSlugs",
        "description": "List all available marketplace blueprint slugs from Webflow CMS.\nReturns cached results when available.\n",
        "tags": [
          "Blueprints"
        ],
        "responses": {
          "200": {
            "description": "List of marketplace slugs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "slug": {
                            "type": "string",
                            "description": "The installation slug identifier for the blueprint (used for publishing).",
                            "example": "wallbox_b2c"
                          },
                          "marketplace_slug": {
                            "type": "string",
                            "description": "The marketplace page slug for the Webflow CMS item (used for display).",
                            "example": "wallbox-b2c"
                          },
                          "version": {
                            "type": "string",
                            "example": "v1.0.0"
                          },
                          "name": {
                            "type": "string",
                            "example": "Wallbox B2C"
                          },
                          "installation_link": {
                            "type": "string",
                            "example": "https://portal.epilot.cloud/app/blueprints/install/marketplace/wallbox_b2c?s3Ref=https://example.com/blueprint.zip"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints:publish": {
      "post": {
        "operationId": "publishBlueprint",
        "summary": "publishBlueprint",
        "description": "Publish a blueprint to the marketplace. Exports the blueprint, uploads it to file-api with public access, and updates the Webflow CMS listing.\n",
        "tags": [
          "Blueprints"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "blueprint_id",
                  "slug"
                ],
                "properties": {
                  "blueprint_id": {
                    "$ref": "#/components/schemas/BlueprintID"
                  },
                  "slug": {
                    "type": "string",
                    "description": "The marketplace installation slug for the Webflow CMS item"
                  },
                  "version": {
                    "type": "string",
                    "description": "The version string to set on the marketplace CMS item (e.g. \"1.0.0\")"
                  },
                  "name": {
                    "type": "string",
                    "description": "The display name for the blueprint on the marketplace CMS item"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Blueprint publish job started",
            "headers": {
              "Location": {
                "description": "URL to poll the job",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job_id": {
                      "$ref": "#/components/schemas/BlueprintJobID"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}:format-description": {
      "post": {
        "operationId": "formatBlueprintDescription",
        "summary": "formatBlueprintDescription",
        "description": "Format a blueprint description as markdown using AI.\n",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Plain text to format as markdown"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully formatted description",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "markdown": {
                      "type": "string",
                      "description": "AI-formatted markdown content"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints:suggest-resources": {
      "post": {
        "operationId": "suggestBlueprintResources",
        "summary": "suggestBlueprintResources",
        "description": "Suggest resources to add to a blueprint based on a natural-language prompt.\n\nWalks anchor resource types in priority order (journey > workflow_definition >\nautomation_flow > schema > entity-backed types) and returns matches per\nanchor using each upstream API's text search. Suggestions are marked\n`is_root: true` so callers can pass `add_dependencies=true` to\nbulkAddBlueprintResources and have transitive dependencies resolved\nserver-side — which means a single matched journey can stand in for its\nfull product/schema/template bundle.\n\nNo side effects on the blueprint — the caller persists the chosen resources\nvia the existing create/bulk-add endpoints.\n",
        "tags": [
          "Blueprints"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SuggestBlueprintResourcesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Suggested resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuggestBlueprintResourcesResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources": {
      "post": {
        "operationId": "addBlueprintResource",
        "summary": "addBlueprintResource",
        "description": "Add a resource to a Blueprint",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          },
          {
            "in": "query",
            "name": "add_dependencies",
            "schema": {
              "type": "boolean",
              "default": false,
              "description": "Whether to add this resource dependencies to the blueprint automatically"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlueprintResource"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Added Blueprint Resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BlueprintResource"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources:syncDependencies": {
      "post": {
        "operationId": "syncDependencies",
        "summary": "syncDependencies",
        "description": "Sync dependencies of all root resources in a Blueprint",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Dependencies sync job started",
            "headers": {
              "Location": {
                "description": "URL to poll the job",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job_id": {
                      "$ref": "#/components/schemas/BlueprintJobID"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources/bulk": {
      "post": {
        "operationId": "bulkAddBlueprintResources",
        "summary": "bulkAddBlueprintResources",
        "description": "Bulk Add resources in a Blueprint",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          },
          {
            "in": "query",
            "name": "add_dependencies",
            "schema": {
              "type": "boolean",
              "default": false,
              "description": "Whether to add this resource dependencies to the blueprint automatically"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BlueprintResource"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk updated Blueprint Resources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BlueprintResource"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "bulkUpdateBlueprintResources",
        "summary": "bulkUpdateBlueprintResources",
        "description": "Bulk update resources in a Blueprint",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BlueprintResource"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk updated Blueprint Resources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BlueprintResource"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "bulkDeleteBlueprintResources",
        "summary": "bulkDeleteBlueprintResources",
        "description": "Bulk delete resources in a Blueprint",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BlueprintResourceID"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk deleted Blueprint Resources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BlueprintResource"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources/{resource_id}": {
      "put": {
        "operationId": "updateBlueprintResource",
        "summary": "updateBlueprintResource",
        "description": "Update a resource in a Blueprint",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          },
          {
            "in": "path",
            "required": true,
            "name": "resource_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintResourceID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlueprintResource"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated Blueprint Resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BlueprintResource"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteBlueprintResource",
        "summary": "deleteBlueprintResource",
        "description": "Delete a resource from a Blueprint",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          },
          {
            "in": "path",
            "required": true,
            "name": "resource_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintResourceID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted Blueprint Resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BlueprintResource"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/jobs": {
      "get": {
        "operationId": "listBlueprintJobs",
        "summary": "List Blueprint Jobs",
        "description": "List all blueprint jobs",
        "tags": [
          "Jobs"
        ],
        "responses": {
          "200": {
            "description": "Blueprint jobs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "example": 1
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BlueprintJob"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/jobs/{job_id}": {
      "get": {
        "operationId": "getBlueprintJob",
        "summary": "Get Job",
        "description": "Poll current state of a job.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "job_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintJobID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Job status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlueprintJob"
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/jobs/{job_id}:continue": {
      "post": {
        "operationId": "continueInstallationJob",
        "summary": "Continue Installation Job",
        "description": "Continue an installation job if it is waiting for user action.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "job_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintJobID"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlueprintInstallationJobOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Blueprint installation job continued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlueprintInstallationJob"
                }
              }
            }
          }
        }
      }
    },
    "/v2/blueprint-manifest/jobs/{job_id}:cancel": {
      "post": {
        "operationId": "cancelBlueprintJob",
        "summary": "Cancel Blueprint Job",
        "description": "Cancel a blueprint job if it is still running.",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "job_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintJobID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blueprint job cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlueprintJob"
                }
              }
            }
          }
        }
      }
    },
    "/v1/blueprints/{blueprint_id}/marketplace-listing": {
      "post": {
        "operationId": "createMarketplaceListing",
        "summary": "createMarketplaceListing",
        "description": "Create a marketplace listing for a blueprint. Returns 409 if one already exists.",
        "tags": [
          "Marketplace Listings"
        ],
        "parameters": [
          {
            "name": "blueprint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Marketplace listing created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketplaceListing"
                }
              }
            }
          },
          "409": {
            "description": "Listing already exists for this blueprint"
          }
        }
      },
      "get": {
        "operationId": "getMarketplaceListing",
        "summary": "getMarketplaceListing",
        "description": "Get marketplace listing for a blueprint including all versions",
        "tags": [
          "Marketplace Listings"
        ],
        "parameters": [
          {
            "name": "blueprint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Marketplace listing with versions",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/MarketplaceListing"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "versions": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MarketplaceListingVersion"
                          }
                        },
                        "has_publishable_draft": {
                          "type": "boolean"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Listing not found"
          }
        }
      }
    },
    "/v1/marketplace-listings": {
      "get": {
        "operationId": "listMarketplaceListings",
        "summary": "listMarketplaceListings",
        "description": "List all marketplace listings for the authenticated organization",
        "tags": [
          "Marketplace Listings"
        ],
        "security": [
          {
            "EpilotAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of marketplace listings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "listings": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MarketplaceListing"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/marketplace-listings/{listing_id}": {
      "get": {
        "operationId": "getMarketplaceListingById",
        "summary": "getMarketplaceListingById",
        "description": "Get marketplace listing by listing ID including all versions",
        "tags": [
          "Marketplace Listings"
        ],
        "parameters": [
          {
            "name": "listing_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Marketplace listing with versions",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/MarketplaceListing"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "versions": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MarketplaceListingVersion"
                          }
                        },
                        "has_publishable_draft": {
                          "type": "boolean"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Listing not found"
          }
        }
      },
      "patch": {
        "operationId": "updateMarketplaceListing",
        "summary": "updateMarketplaceListing",
        "description": "Update listing-level fields",
        "tags": [
          "Marketplace Listings"
        ],
        "parameters": [
          {
            "name": "listing_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarketplaceListingUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated marketplace listing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketplaceListing"
                }
              }
            }
          },
          "404": {
            "description": "Listing not found"
          }
        }
      },
      "delete": {
        "operationId": "deleteMarketplaceListing",
        "summary": "deleteMarketplaceListing",
        "description": "Delete listing and all versions",
        "tags": [
          "Marketplace Listings"
        ],
        "parameters": [
          {
            "name": "listing_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Listing deleted"
          },
          "404": {
            "description": "Listing not found"
          }
        }
      }
    },
    "/v1/marketplace-listings/{listing_id}/versions": {
      "post": {
        "operationId": "createMarketplaceListingVersion",
        "summary": "createMarketplaceListingVersion",
        "description": "Create a draft version; auto-snapshots resources, requiredFeatures, recommendedApps from current blueprint",
        "tags": [
          "Marketplace Listing Versions"
        ],
        "parameters": [
          {
            "name": "listing_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Draft version created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketplaceListingVersion"
                }
              }
            }
          },
          "404": {
            "description": "Listing not found"
          }
        }
      },
      "get": {
        "operationId": "listMarketplaceListingVersions",
        "summary": "listMarketplaceListingVersions",
        "description": "List all versions for a listing, newest first",
        "tags": [
          "Marketplace Listing Versions"
        ],
        "parameters": [
          {
            "name": "listing_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of versions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "versions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MarketplaceListingVersion"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/marketplace-listings/{listing_id}/versions/{version_id}": {
      "patch": {
        "operationId": "updateMarketplaceListingVersion",
        "summary": "updateMarketplaceListingVersion",
        "description": "Update updateNote, requiredFeatures, or recommendedApps on a draft version",
        "tags": [
          "Marketplace Listing Versions"
        ],
        "parameters": [
          {
            "name": "listing_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "update_note": {
                    "type": "string",
                    "nullable": true
                  },
                  "required_features": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "recommended_apps": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketplaceListingVersion"
                }
              }
            }
          },
          "400": {
            "description": "Cannot update non-draft version"
          },
          "404": {
            "description": "Version not found"
          }
        }
      }
    },
    "/v1/marketplace-listings/{listing_id}/versions/{version_id}/publish": {
      "post": {
        "operationId": "publishMarketplaceListingVersion",
        "summary": "publishMarketplaceListingVersion",
        "description": "Publish a draft version; archives the previous live version",
        "tags": [
          "Marketplace Listing Versions"
        ],
        "parameters": [
          {
            "name": "listing_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "version_name"
                ],
                "properties": {
                  "version_name": {
                    "type": "string"
                  },
                  "update_note": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Published version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketplaceListingVersion"
                }
              }
            }
          },
          "400": {
            "description": "Version not publishable or version_name already taken"
          },
          "404": {
            "description": "Version not found"
          }
        }
      }
    },
    "/v3/blueprint-manifest/blueprint:install": {
      "post": {
        "operationId": "installBlueprintV3",
        "summary": "Install Blueprint V3",
        "description": "Install a blueprint using the V3 engine (direct API calls, no Terraform).\nCreates resources in topological order with global ID replacement.\nSupports checkpoint-based resume on failure.\n",
        "tags": [
          "Blueprints"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "oneOf": [
                  {
                    "required": [
                      "source_org_id",
                      "source_blueprint_id",
                      "destination_org_id"
                    ]
                  },
                  {
                    "required": [
                      "source_blueprint_file",
                      "destination_org_id"
                    ]
                  }
                ],
                "properties": {
                  "source_org_id": {
                    "type": "string"
                  },
                  "source_blueprint_id": {
                    "$ref": "#/components/schemas/BlueprintID"
                  },
                  "source_blueprint_file": {
                    "type": "string",
                    "description": "S3 key to the blueprint zip file"
                  },
                  "destination_org_id": {
                    "type": "string"
                  },
                  "destination_blueprint_id": {
                    "$ref": "#/components/schemas/BlueprintID"
                  },
                  "destination_auth_token": {
                    "type": "string",
                    "description": "Auth token for the destination org. Required for cross-org installs where the caller's token belongs to the source org. Defaults to the caller's bearer token."
                  },
                  "options": {
                    "$ref": "#/components/schemas/BlueprintInstallationJobOptions"
                  },
                  "slug": {
                    "type": "string",
                    "description": "Slug for marketplace blueprint consistency"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "V3 install job started",
            "headers": {
              "Location": {
                "description": "URL to poll the job",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job_id": {
                      "$ref": "#/components/schemas/BlueprintJobID"
                    },
                    "destination_blueprint_id": {
                      "$ref": "#/components/schemas/BlueprintID"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing required source or destination fields",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/blueprint-manifest/blueprints/{blueprint_id}/deployments/{job_id}:restore": {
      "post": {
        "operationId": "restoreBlueprintDeploymentV3",
        "summary": "Restore a specific deployment by job_id",
        "description": "Roll a deployment back to its pre-install state. Two phases:\n\n  1. Upsert — re-applies the captured payloads via snapshot-api's\n     `:restore` (server-side; runs config-engine.apply with captured\n     target ids pre-seeded). Skipped for pure-create deployments\n     whose snapshot was empty.\n  2. Delete sweep — for lineage rows of this blueprint instance not\n     present in the snapshot's captured set, deletes the live\n     resource via the type's adapter. Co-ownership / drift /\n     no-delete-capability skip the entry with the corresponding\n     reason.\n\nResolves `(blueprint_id, job_id)` to the entry in\n`Blueprint.deployments[]` and reads its `snapshot_id` and\n`destination_blueprint_id` — the caller never needs to handle\nsnapshot ids directly.\n\nAsync — returns 202 with a job id. Poll the job to track progress.\nThe per-instance lock (`installation_status === 'IN_PROGRESS'`)\nrejects concurrent installs or restores with 409.\n",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "blueprint_id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          },
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/BlueprintJobID"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Restore job started",
            "headers": {
              "Location": {
                "description": "URL to poll the job",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job_id": {
                      "$ref": "#/components/schemas/BlueprintJobID"
                    },
                    "blueprint_instance_id": {
                      "$ref": "#/components/schemas/BlueprintID"
                    },
                    "snapshot_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Deployment has no snapshot, or the snapshot is not in a `completed` state."
          },
          "404": {
            "description": "Blueprint not found, or no deployment with the given job_id on this blueprint."
          },
          "409": {
            "description": "Another install or restore is in flight for this blueprint instance."
          }
        }
      }
    },
    "/v3/blueprint-manifest/blueprints/{blueprint_id}/deployments/{job_id}/restore-preview": {
      "get": {
        "operationId": "getRestorePreview",
        "summary": "Predicted outcome of reverting a deployment",
        "description": "Computes what would happen if the user triggered a restore on this\ndeployment, without performing any writes. The forecast uses the\nsnapshot's captured resources (when present) plus the current lineage\nstate plus per-adapter gates (co-ownership, no-delete-capability,\nheuristic-match, drift when wired).\n\nIdempotent and side-effect free. Safe to call repeatedly. The result\nmay shift between calls if operators edit destination resources or\nanother blueprint adopts a shared resource in the meantime.\n",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "blueprint_id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          },
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "description": "The install job whose deployment is being previewed.",
            "schema": {
              "$ref": "#/components/schemas/BlueprintJobID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Predicted outcome. `failed`-action items are absent here — the\npreview can't forecast errors.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestoreOutcome"
                }
              }
            }
          },
          "404": {
            "description": "Blueprint or deployment not found."
          }
        }
      }
    },
    "/v3/blueprint-manifest/blueprints/{blueprint_id}/lineage": {
      "get": {
        "operationId": "getBlueprintLineageV3",
        "summary": "Get Blueprint Lineage V3",
        "description": "Returns the lineage registry entries for a blueprint's resources in the current org.\nShows the mapping between source lineage IDs and target resource IDs.\n",
        "tags": [
          "Blueprints"
        ],
        "parameters": [
          {
            "in": "path",
            "required": true,
            "name": "blueprint_id",
            "schema": {
              "$ref": "#/components/schemas/BlueprintID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lineage entries for the blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "entries": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LineageEntry"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/blueprint-manifest/uniqueness-criteria": {
      "get": {
        "operationId": "listUniquenessCriteria",
        "summary": "listUniquenessCriteria",
        "description": "List all custom uniqueness criteria configured for the caller's organization.\nThese overrides are applied during install (V2 and V3) when matching incoming\nresources against existing ones in the destination org, replacing the default\nper-resource-type field set with the caller's chosen fields (AND-combined).\n",
        "tags": [
          "Uniqueness Criteria"
        ],
        "responses": {
          "200": {
            "description": "All configured criteria for the org",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UniquenessCriteria"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/blueprint-manifest/uniqueness-criteria/{resource_type}": {
      "parameters": [
        {
          "in": "path",
          "required": true,
          "name": "resource_type",
          "schema": {
            "$ref": "#/components/schemas/UniquenessCriteriaResourceType"
          }
        }
      ],
      "get": {
        "operationId": "getUniquenessCriteria",
        "summary": "getUniquenessCriteria",
        "description": "Get the configured uniqueness criteria for a specific resource type, if any.",
        "tags": [
          "Uniqueness Criteria"
        ],
        "responses": {
          "200": {
            "description": "Configured criteria for the resource type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UniquenessCriteria"
                }
              }
            }
          },
          "404": {
            "description": "No custom criteria configured (defaults will be used)"
          }
        }
      },
      "put": {
        "operationId": "putUniquenessCriteria",
        "summary": "putUniquenessCriteria",
        "description": "Set or replace the uniqueness criteria for a resource type. The provided fields\nmust be valid attributes on the resource's schema (the UI typically loads the\nschema to populate options). All listed fields are AND-combined during matching.\n",
        "tags": [
          "Uniqueness Criteria"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored criteria",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UniquenessCriteria"
                }
              }
            }
          },
          "400": {
            "description": "Invalid resource type or field list"
          }
        }
      },
      "delete": {
        "operationId": "deleteUniquenessCriteria",
        "summary": "deleteUniquenessCriteria",
        "description": "Remove the custom criteria for a resource type, reverting to the default fields.",
        "tags": [
          "Uniqueness Criteria"
        ],
        "responses": {
          "204": {
            "description": "Criteria deleted (defaults will be used)"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "UniquenessCriteriaResourceType": {
        "type": "string",
        "description": "Resource type for which custom uniqueness criteria can be configured.",
        "enum": [
          "emailtemplate",
          "product",
          "price",
          "tax",
          "coupon",
          "product_recommendation",
          "file",
          "document_template",
          "schema",
          "taxonomy",
          "notification_template",
          "family",
          "permission",
          "journey"
        ]
      },
      "UniquenessCriteria": {
        "type": "object",
        "required": [
          "org_id",
          "resource_type",
          "fields",
          "updated_at"
        ],
        "properties": {
          "org_id": {
            "type": "string"
          },
          "resource_type": {
            "$ref": "#/components/schemas/UniquenessCriteriaResourceType"
          },
          "fields": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_by": {
            "type": "string"
          }
        }
      },
      "LineageEntry": {
        "type": "object",
        "properties": {
          "lineage_id": {
            "type": "string",
            "description": "Immutable resource identity across orgs"
          },
          "target_id": {
            "type": "string",
            "description": "Resource ID in the destination org"
          },
          "resource_type": {
            "$ref": "#/components/schemas/ResourceNodeType"
          },
          "blueprint_instance_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fidelity": {
            "type": "string",
            "enum": [
              "full",
              "partial"
            ]
          },
          "last_synced_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PatchFieldDiff": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "op": {
            "type": "string",
            "enum": [
              "changed",
              "added",
              "removed"
            ]
          },
          "baseline_value": {},
          "current_value": {}
        }
      },
      "PatchResourceDiff": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "source_id": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PatchFieldDiff"
            }
          }
        }
      },
      "DetectChangesResult": {
        "type": "object",
        "properties": {
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PatchResourceDiff"
            }
          }
        }
      },
      "BlueprintPatch": {
        "type": "object",
        "properties": {
          "patch_id": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "blueprint_id": {
            "$ref": "#/components/schemas/BlueprintID"
          },
          "rollout_id": {
            "type": "string"
          },
          "source_org_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "ready",
              "applying",
              "applied",
              "partial"
            ]
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PatchResourceDiff"
            }
          },
          "changelog": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "applied_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrgPatchExecution": {
        "type": "object",
        "properties": {
          "patch_id": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "org_id": {
            "type": "string"
          },
          "org_name": {
            "type": "string"
          },
          "dest_blueprint_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_progress",
              "success",
              "failed"
            ]
          },
          "error": {
            "type": "string"
          },
          "applied_at": {
            "type": "string",
            "format": "date-time"
          },
          "retries": {
            "type": "integer"
          },
          "changes_applied": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PatchFieldDiff"
            }
          }
        }
      },
      "BlueprintPatchWithResults": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BlueprintPatch"
          },
          {
            "type": "object",
            "properties": {
              "org_results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/OrgPatchExecution"
                }
              }
            }
          }
        ]
      },
      "BlueprintID": {
        "type": "string",
        "description": "ID of a blueprint",
        "example": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"
      },
      "BlueprintResourceID": {
        "type": "string",
        "description": "ID of a blueprint resource",
        "example": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"
      },
      "CommonBlueprintFields": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/BlueprintID"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "object",
            "properties": {
              "preinstall": {
                "type": "string",
                "description": "Markdown content shown before starting to install the blueprint",
                "example": "This is the content of the preinstall.md file which contains the blueprint description.\n"
              },
              "postinstall": {
                "type": "string",
                "description": "Markdown content to be displayed when showing the plan to install blueprint",
                "example": "This is the content of the postinstall.md file\n"
              }
            }
          },
          "version": {
            "type": "string"
          },
          "deployments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_org_id": {
                  "type": "string"
                },
                "source_blueprint_id": {
                  "type": "string"
                },
                "destination_org_id": {
                  "type": "string"
                },
                "destination_blueprint_id": {
                  "type": "string"
                },
                "job_id": {
                  "type": "string",
                  "description": "Blueprint installation job that created or updated this deployment record"
                },
                "triggered_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "note": {
                  "type": "string",
                  "description": "User-provided note about this synchronization"
                },
                "status": {
                  "type": "string",
                  "description": "Outcome of this deployment",
                  "enum": [
                    "IN_PROGRESS",
                    "SUCCESS",
                    "PARTIAL_SUCCESS",
                    "FAILED"
                  ]
                },
                "restore_details": {
                  "type": "object",
                  "description": "Restore lifecycle metadata for this deployment.",
                  "properties": {
                    "has_revertible_changes": {
                      "type": "boolean",
                      "description": "Whether this sync changed destination resources in a way that can\nbe reverted. `false` means the sync completed without create,\nupdate, internal-update, or delete impacts, so there is no revert\naction to offer.\n"
                    },
                    "resource_impact_summary": {
                      "type": "object",
                      "description": "Counts of resource impact values from the V3 apply result.",
                      "properties": {
                        "create": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "update": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "internal_update": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "delete": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "no_op": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "ignored": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "last_restore_job_id": {
                      "type": "string",
                      "description": "BlueprintInstallationJob id of the most recent restore that ran\nagainst this deployment. Used by the FE to keep the restore-status\nbadge visible across page reloads. Frontends poll this job to\nrender the latest restore outcome.\n"
                    },
                    "last_restore_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp of the most recent restore that ran against this\ndeployment. Stamped when the restore sweep finishes. Used by the\nFE to show when a sync was reverted.\n"
                    },
                    "last_restored_by": {
                      "type": "object",
                      "description": "Identity of the caller who triggered the most recent restore.\nStamped when the restore sweep finishes. Used by the FE to show\nwho reverted a sync.\n",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Display name (email or token name) of the restorer."
                        },
                        "user_id": {
                          "type": "string",
                          "description": "User id of the restorer, when triggered by a user."
                        }
                      }
                    },
                    "status": {
                      "type": "string",
                      "description": "Computed server-side from `(job_id, restore_details.last_restore_job_id, installation_status)`.\n`available` when the deployment is restorable but has no prior\nrestore (including pure-create deployments without `snapshot_id`,\nreverted via sweep-only);\n`in_progress` while an install or restore is running on this\nblueprint instance;\n`restored` / `partially_restored` / `restore_failed` reflect the\nterminal status of the job referenced by `last_restore_job_id`;\n`unavailable` means there is no revert action, for example\nmalformed deployment rows missing `job_id` or no-change syncs.\n",
                      "enum": [
                        "available",
                        "in_progress",
                        "restored",
                        "partially_restored",
                        "restore_failed",
                        "unavailable"
                      ]
                    }
                  }
                },
                "has_revertible_changes": {
                  "type": "boolean",
                  "deprecated": true,
                  "description": "Deprecated. Use `restore_details.has_revertible_changes`.\n"
                },
                "last_restore_job_id": {
                  "type": "string",
                  "deprecated": true,
                  "description": "Deprecated. Use `restore_details.last_restore_job_id`.\n"
                },
                "restore_status": {
                  "type": "string",
                  "deprecated": true,
                  "description": "Deprecated. Use `restore_details.status`.\n",
                  "enum": [
                    "available",
                    "in_progress",
                    "restored",
                    "partially_restored",
                    "restore_failed",
                    "unavailable"
                  ]
                }
              }
            }
          },
          "is_verified": {
            "type": "boolean",
            "description": "Whether the blueprint is verified by epilot"
          },
          "latest_verification": {
            "$ref": "#/components/schemas/LatestBlueprintVerification"
          },
          "ignored_resource_addresses": {
            "type": "array",
            "description": "Resource addresses excluded during the latest install/update and ignored by verification.",
            "items": {
              "type": "string"
            }
          },
          "installation_status": {
            "type": "string",
            "enum": [
              "IN_PROGRESS",
              "CANCELED",
              "PARTIAL",
              "SUCCESS",
              "FAILED"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "$ref": "#/components/schemas/CallerIdentity"
          },
          "updated_by": {
            "$ref": "#/components/schemas/CallerIdentity"
          },
          "installation_job_ids": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlueprintJobID"
            }
          },
          "source_blueprint_id": {
            "description": "ID of the blueprint that brought this blueprint to the destination org (deployed or installed)",
            "allOf": [
              {
                "$ref": "#/components/schemas/BlueprintID"
              }
            ]
          },
          "archived": {
            "type": "boolean",
            "description": "Whether the blueprint is archived (soft-deleted). Archived blueprints are hidden from the main list.",
            "default": false
          },
          "docs_url": {
            "type": "string",
            "description": "URL to the blueprint documentation"
          },
          "recommended_apps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of recommended app IDs for the blueprint"
          },
          "required_features": {
            "type": "object",
            "description": "Feature constraints for blueprint installation",
            "properties": {
              "enabled": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Features that must be enabled in the target org"
              },
              "disabled": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Features that must be disabled in the target org"
              }
            }
          },
          "zip_file_name": {
            "type": "string",
            "description": "Custom name for the exported zip file"
          }
        },
        "required": [
          "title"
        ]
      },
      "SuggestBlueprintResourcesRequest": {
        "type": "object",
        "required": [
          "prompt"
        ],
        "properties": {
          "prompt": {
            "type": "string",
            "description": "Natural-language description of what to include.",
            "example": "everything for the hausanschluss use case"
          },
          "blueprint_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BlueprintID"
              }
            ],
            "description": "When provided, suggestions are scoped as additions to this existing\nblueprint — resources already in it are excluded from the response.\n"
          }
        }
      },
      "SuggestBlueprintResourcesResponse": {
        "type": "object",
        "required": [
          "resources"
        ],
        "properties": {
          "resources": {
            "type": "array",
            "description": "Suggested resources to add. All marked is_root so the caller can request transitive dependency resolution.",
            "items": {
              "$ref": "#/components/schemas/BlueprintResource"
            }
          },
          "suggested_blueprint_name": {
            "type": "string",
            "description": "Short title derived from the prompt. Useful when the caller is\ncreating a new blueprint as a result of the suggestion — saves the\nuser from naming it themselves.\n",
            "example": "Hausanschluss"
          },
          "explanation": {
            "type": "string",
            "description": "Short human-readable summary of what was matched and why."
          },
          "add_dependencies_recommended": {
            "type": "boolean",
            "description": "Hint to the caller: persist via bulkAddBlueprintResources with\n?add_dependencies=true so anchor resources (journeys, workflows)\npull their transitive dependencies.\n"
          }
        }
      },
      "BlueprintResource": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/BlueprintResourceID"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/ResourceNodeType"
          },
          "address": {
            "type": "string"
          },
          "is_root": {
            "type": "boolean",
            "description": "When a resource is marked as root, we'll be able to keep track of it's dependencies"
          },
          "is_ready": {
            "type": "boolean",
            "description": "when editing a blueprint, this indicates if the resource is ready to be exported and when installing a blueprint, this indicates if the resource is ready to be used"
          },
          "is_hidden": {
            "type": "boolean",
            "description": "When a resource is marked as hidden, it's used to hide it from the UI"
          },
          "is_disabled": {
            "type": "boolean",
            "default": false,
            "description": "When a resource is marked as disabled, it will be skipped during export"
          },
          "hard_dependencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceNodeType"
            }
          },
          "parent_resource_ids": {
            "type": "array",
            "description": "Used to automatically remove resources with hard dependencies and to block deletion of resources with hard dependencies",
            "items": {
              "$ref": "#/components/schemas/BlueprintResourceID"
            }
          },
          "depends_on_addresses": {
            "type": "array",
            "description": "Terraform addresses this resource references (for dependency-aware ignore)",
            "items": {
              "type": "string"
            }
          },
          "impact_on_install": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "create",
                "update",
                "internal-update",
                "no-op",
                "delete",
                "ignored"
              ]
            }
          },
          "impact_on_install_reason": {
            "type": "array",
            "description": "Fields causing the updates / internal updates on a resource install",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "type"
        ]
      },
      "BlueprintPreview": {
        "type": "object",
        "description": "Preview data for a blueprint before installation. Stored temporarily with TTL.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique preview ID"
          },
          "org_id": {
            "type": "string",
            "description": "Organization ID"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "object",
            "properties": {
              "preinstall": {
                "type": "string"
              }
            }
          },
          "version": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "source_type": {
            "type": "string",
            "enum": [
              "marketplace",
              "file"
            ]
          },
          "blueprint_file_s3_key": {
            "type": "string",
            "description": "S3 key of the blueprint zip file"
          },
          "is_verified": {
            "type": "boolean"
          },
          "docs_url": {
            "type": "string"
          },
          "recommended_apps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "required_features": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "disabled": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "$ref": "#/components/schemas/CallerIdentity"
          },
          "is_updating": {
            "type": "boolean",
            "description": "Whether the blueprint is updating to the latest version in the marketplace"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlueprintResource"
            }
          }
        },
        "required": [
          "id",
          "org_id",
          "title",
          "source_type",
          "blueprint_file_s3_key",
          "is_verified",
          "created_at",
          "created_by",
          "resources",
          "is_updating"
        ]
      },
      "CustomBlueprint": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonBlueprintFields"
          },
          {
            "type": "object",
            "properties": {
              "resources": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BlueprintResource"
                }
              },
              "source_type": {
                "type": "string",
                "enum": [
                  "custom"
                ]
              }
            }
          }
        ],
        "required": [
          "source_type"
        ]
      },
      "FileBlueprint": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonBlueprintFields"
          },
          {
            "type": "object",
            "properties": {
              "source_type": {
                "type": "string",
                "enum": [
                  "file"
                ]
              },
              "resources": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BlueprintResource"
                }
              }
            }
          }
        ],
        "required": [
          "source_type"
        ]
      },
      "MarketplaceBlueprint": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonBlueprintFields"
          },
          {
            "type": "object",
            "properties": {
              "docs_url": {
                "type": "string",
                "description": "URL to the blueprint documentation"
              },
              "source_type": {
                "type": "string",
                "enum": [
                  "marketplace"
                ]
              },
              "resources": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BlueprintResource"
                }
              },
              "recommended_apps": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of recommended app IDs for the blueprint"
              },
              "has_update_available": {
                "type": "boolean",
                "description": "Whether a newer version is available in the marketplace."
              },
              "latest_marketplace_version": {
                "type": "string",
                "description": "The latest version available in the marketplace.",
                "example": "v2.0.0"
              },
              "installation_link": {
                "type": "string",
                "description": "URL to install/update the blueprint from the marketplace."
              }
            }
          }
        ],
        "required": [
          "source_type"
        ]
      },
      "InstalledMarketplaceBlueprintItem": {
        "type": "object",
        "description": "Summary of an installed marketplace blueprint for version tracking",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/BlueprintID"
          },
          "slug": {
            "type": "string",
            "description": "URL slug of the blueprint from the epilot marketplace",
            "example": "solar-b2b"
          },
          "version": {
            "type": "string",
            "description": "Version of the installed blueprint",
            "example": "v1.0.0"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "$ref": "#/components/schemas/CallerIdentity"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_by": {
            "$ref": "#/components/schemas/CallerIdentity"
          },
          "has_update_available": {
            "type": "boolean",
            "description": "Whether a newer version is available in the marketplace",
            "example": true
          },
          "latest_marketplace_version": {
            "type": "string",
            "description": "The latest version available in the marketplace",
            "example": "v2.0.0"
          },
          "installation_link": {
            "type": "string",
            "description": "URL to install/update the blueprint from the marketplace"
          }
        },
        "required": [
          "id",
          "slug"
        ]
      },
      "DeployedBlueprint": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonBlueprintFields"
          },
          {
            "type": "object",
            "properties": {
              "source_type": {
                "type": "string",
                "enum": [
                  "deploy"
                ]
              },
              "resources": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BlueprintResource"
                }
              }
            }
          }
        ],
        "required": [
          "source_type"
        ]
      },
      "AppBlueprint": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonBlueprintFields"
          },
          {
            "type": "object",
            "properties": {
              "source_type": {
                "type": "string",
                "enum": [
                  "app"
                ]
              },
              "resources": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BlueprintResource"
                }
              }
            }
          }
        ],
        "required": [
          "source_type"
        ]
      },
      "Blueprint": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CustomBlueprint"
          },
          {
            "$ref": "#/components/schemas/FileBlueprint"
          },
          {
            "$ref": "#/components/schemas/MarketplaceBlueprint"
          },
          {
            "$ref": "#/components/schemas/DeployedBlueprint"
          },
          {
            "$ref": "#/components/schemas/AppBlueprint"
          }
        ]
      },
      "BlueprintJobID": {
        "type": "string",
        "description": "ID of a job",
        "example": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"
      },
      "CommonBlueprintJobFields": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/BlueprintJobID"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlueprintJobEvent"
            }
          },
          "triggered_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "$ref": "#/components/schemas/CallerIdentity"
          }
        }
      },
      "BlueprintExportJob": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonBlueprintJobFields"
          },
          {
            "type": "object",
            "properties": {
              "job_type": {
                "type": "string",
                "enum": [
                  "export"
                ]
              },
              "blueprint_id": {
                "$ref": "#/components/schemas/BlueprintID"
              },
              "status": {
                "type": "string",
                "enum": [
                  "IN_PROGRESS",
                  "SUCCESS",
                  "FAILED",
                  "CANCELED"
                ]
              },
              "download_file": {
                "$ref": "#/components/schemas/S3Reference"
              }
            }
          }
        ]
      },
      "BlueprintInstallationJob": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonBlueprintJobFields"
          },
          {
            "type": "object",
            "properties": {
              "job_type": {
                "type": "string",
                "enum": [
                  "install"
                ]
              },
              "source_blueprint_id": {
                "$ref": "#/components/schemas/BlueprintID"
              },
              "source_blueprint_type": {
                "type": "string",
                "enum": [
                  "custom",
                  "file",
                  "marketplace",
                  "deploy",
                  "app"
                ]
              },
              "source_org_id": {
                "type": "string"
              },
              "source_blueprint_file": {
                "type": "string"
              },
              "destination_blueprint_id": {
                "$ref": "#/components/schemas/BlueprintID"
              },
              "destination_org_id": {
                "type": "string"
              },
              "slug": {
                "type": "string",
                "description": "Blueprint slug for marketplace blueprints"
              },
              "sync_engine": {
                "type": "string",
                "enum": [
                  "terraform",
                  "v3"
                ],
                "description": "Engine used for this install job"
              },
              "resource_progress": {
                "type": "array",
                "description": "Per-resource live status. Populated only for V3 installs.",
                "items": {
                  "$ref": "#/components/schemas/V3ResourceProgressEntry"
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "IN_PROGRESS",
                  "WAITING_USER_ACTION",
                  "CANCELED",
                  "SUCCESS",
                  "PARTIAL_SUCCESS",
                  "FAILED"
                ]
              }
            }
          }
        ]
      },
      "BlueprintRestoreJob": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonBlueprintJobFields"
          },
          {
            "type": "object",
            "properties": {
              "job_type": {
                "type": "string",
                "enum": [
                  "restore"
                ]
              },
              "destination_blueprint_id": {
                "$ref": "#/components/schemas/BlueprintID"
              },
              "destination_org_id": {
                "type": "string"
              },
              "install_job_id": {
                "type": "string",
                "nullable": true,
                "description": "The install job whose deployment is being reverted. Maps back\nto the entry in `Blueprint.deployments[]`.\n"
              },
              "snapshot_id": {
                "type": "string",
                "nullable": true,
                "description": "The snapshot driving Phase 1 of the restore. Null for sweep-only\nrestores (pure-create deployments with no captured manifest).\n"
              },
              "sync_engine": {
                "type": "string",
                "enum": [
                  "v3"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "IN_PROGRESS",
                  "SUCCESS",
                  "PARTIAL_SUCCESS",
                  "FAILED"
                ]
              },
              "restore_result": {
                "nullable": true,
                "description": "Absent while the job is still IN_PROGRESS.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/RestoreOutcome"
                  }
                ]
              }
            }
          }
        ]
      },
      "V3ResourceProgressEntry": {
        "type": "object",
        "required": [
          "lineage_id",
          "type",
          "address",
          "status"
        ],
        "properties": {
          "lineage_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_progress",
              "done",
              "failed",
              "skipped"
            ]
          },
          "target_id": {
            "type": "string"
          },
          "error_message": {
            "type": "string"
          }
        }
      },
      "RestoreOutcomeItem": {
        "type": "object",
        "required": [
          "lineage_id",
          "type",
          "action"
        ],
        "properties": {
          "lineage_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "target_id": {
            "type": "string",
            "nullable": true
          },
          "action": {
            "type": "string",
            "description": "On `restore-preview`: the action the restore would take.\nOn `restore_result`: the action that was applied.\n`failed` only appears on `restore_result`.\n",
            "enum": [
              "restore",
              "delete",
              "skip",
              "failed"
            ]
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "description": "Only set when `action == skip`.",
            "enum": [
              "modified",
              "co_owned",
              "delete_unsupported",
              "heuristic_match"
            ]
          },
          "last_synced_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Only set when `reason == modified`. From the lineage row's last install write."
          },
          "current_updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Only set when `reason == modified`. From the destination resource's current state."
          },
          "error_message": {
            "type": "string",
            "nullable": true,
            "description": "Only set when `action == failed`."
          }
        }
      },
      "RestoreOutcome": {
        "type": "object",
        "properties": {
          "snapshot_id": {
            "type": "string",
            "nullable": true,
            "description": "The snapshot driving Phase 1 of the restore. Null/absent for\nsweep-only restores (pure-create deployments with no captured\nmanifest).\n"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RestoreOutcomeItem"
            }
          }
        }
      },
      "BlueprintJob": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/BlueprintExportJob"
          },
          {
            "$ref": "#/components/schemas/BlueprintInstallationJob"
          },
          {
            "$ref": "#/components/schemas/BlueprintRestoreJob"
          },
          {
            "$ref": "#/components/schemas/BlueprintDependenciesSyncJob"
          },
          {
            "$ref": "#/components/schemas/BlueprintValidateJob"
          },
          {
            "$ref": "#/components/schemas/BlueprintVerificationJob"
          }
        ],
        "discriminator": {
          "propertyName": "job_type",
          "mapping": {
            "export": "#/components/schemas/BlueprintExportJob",
            "install": "#/components/schemas/BlueprintInstallationJob",
            "restore": "#/components/schemas/BlueprintRestoreJob",
            "dependencies_sync": "#/components/schemas/BlueprintDependenciesSyncJob",
            "validate": "#/components/schemas/BlueprintValidateJob",
            "verification": "#/components/schemas/BlueprintVerificationJob"
          }
        }
      },
      "BlueprintDependenciesSyncJob": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonBlueprintJobFields"
          },
          {
            "type": "object",
            "properties": {
              "job_type": {
                "type": "string",
                "enum": [
                  "dependencies_sync"
                ]
              },
              "blueprint_id": {
                "$ref": "#/components/schemas/BlueprintID"
              },
              "status": {
                "type": "string",
                "enum": [
                  "IN_PROGRESS",
                  "SUCCESS",
                  "FAILED",
                  "CANCELED"
                ]
              }
            }
          }
        ]
      },
      "BlueprintValidateJob": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonBlueprintJobFields"
          },
          {
            "type": "object",
            "properties": {
              "job_type": {
                "type": "string",
                "enum": [
                  "validate"
                ]
              },
              "blueprint_id": {
                "$ref": "#/components/schemas/BlueprintID"
              },
              "status": {
                "type": "string",
                "enum": [
                  "IN_PROGRESS",
                  "SUCCESS",
                  "FAILED"
                ]
              },
              "valid": {
                "type": "boolean",
                "description": "Present when status is SUCCESS or FAILED."
              },
              "errors": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FormattedError"
                },
                "description": "Present when valid is false."
              }
            }
          }
        ]
      },
      "BlueprintVerificationJob": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonBlueprintJobFields"
          },
          {
            "type": "object",
            "properties": {
              "job_type": {
                "type": "string",
                "enum": [
                  "verification"
                ]
              },
              "source_org_id": {
                "type": "string"
              },
              "source_blueprint_id": {
                "$ref": "#/components/schemas/BlueprintID"
              },
              "destination_org_id": {
                "type": "string"
              },
              "destination_blueprint_id": {
                "$ref": "#/components/schemas/BlueprintID"
              },
              "status": {
                "type": "string",
                "enum": [
                  "IN_PROGRESS",
                  "SUCCESS",
                  "PARTIAL_SUCCESS",
                  "FAILED"
                ]
              },
              "summary": {
                "$ref": "#/components/schemas/VerificationSummary"
              },
              "resource_results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResourceVerificationResult"
                }
              },
              "resource_results_s3_key": {
                "type": "string",
                "description": "S3 key for detailed results when too large for inline storage."
              }
            }
          }
        ]
      },
      "LatestBlueprintVerification": {
        "type": "object",
        "properties": {
          "job_id": {
            "$ref": "#/components/schemas/BlueprintJobID"
          },
          "status": {
            "type": "string",
            "enum": [
              "IN_PROGRESS",
              "SUCCESS",
              "PARTIAL_SUCCESS",
              "FAILED"
            ]
          },
          "triggered_at": {
            "type": "string",
            "format": "date-time"
          },
          "source_org_id": {
            "type": "string"
          },
          "source_blueprint_id": {
            "$ref": "#/components/schemas/BlueprintID"
          },
          "destination_org_id": {
            "type": "string"
          },
          "destination_blueprint_id": {
            "$ref": "#/components/schemas/BlueprintID"
          },
          "summary": {
            "$ref": "#/components/schemas/VerificationSummary"
          }
        }
      },
      "VerificationSummary": {
        "type": "object",
        "properties": {
          "total_resources": {
            "type": "integer"
          },
          "matched": {
            "type": "integer"
          },
          "mismatched": {
            "type": "integer"
          },
          "missing_in_destination": {
            "type": "integer"
          },
          "fetch_errors": {
            "type": "integer"
          }
        }
      },
      "ResourceVerificationResult": {
        "type": "object",
        "properties": {
          "resource_type": {
            "$ref": "#/components/schemas/ResourceNodeType"
          },
          "resource_name": {
            "type": "string"
          },
          "source_resource_id": {
            "type": "string"
          },
          "destination_resource_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "matched",
              "mismatched",
              "missing_in_destination",
              "fetch_error"
            ]
          },
          "field_diffs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldDiff"
            }
          },
          "error": {
            "type": "string"
          }
        }
      },
      "FieldDiff": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "JSON path to the differing field (e.g. \"steps[2].name\")"
          },
          "source_value": {},
          "destination_value": {},
          "diff_type": {
            "type": "string",
            "enum": [
              "value_changed",
              "field_missing_in_destination",
              "field_missing_in_source",
              "type_mismatch"
            ]
          }
        }
      },
      "BlueprintJobEvent": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FormattedError"
            }
          },
          "level": {
            "type": "string",
            "enum": [
              "info",
              "warning",
              "error"
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "installed_blueprint_id": {
                "$ref": "#/components/schemas/BlueprintID"
              },
              "export_job_id": {
                "$ref": "#/components/schemas/BlueprintJobID"
              },
              "resources": {
                "type": "number"
              }
            }
          }
        }
      },
      "BlueprintInstallationJobOptions": {
        "type": "object",
        "properties": {
          "resources_to_ignore": {
            "description": "List of resource addresses to ignore changes for. When a resource is marked as create, it will be ignored and not created.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ManifestID": {
        "type": "string",
        "description": "ID of an imported / installed manifest",
        "example": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"
      },
      "JobID": {
        "type": "string",
        "description": "ID of an import or export job (state machine)",
        "example": "4854bb2a-94f9-424d-a968-3fb17fb0bf89"
      },
      "ManifestSource": {
        "type": "string",
        "enum": [
          "file",
          "marketplace",
          "sandbox"
        ]
      },
      "Manifest": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "import_job_id": {
                "$ref": "#/components/schemas/JobID"
              },
              "previous_jobs_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of job IDs that were used to install the manifest"
              },
              "previous_jobs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Job"
                },
                "description": "List of jobs that were used to install the manifest"
              }
            }
          },
          {
            "$ref": "#/components/schemas/CommonManifestFields"
          },
          {
            "$ref": "#/components/schemas/CommonMarkdownFields"
          },
          {
            "$ref": "#/components/schemas/CommonImportFields"
          },
          {
            "$ref": "#/components/schemas/ManifestTimestampFields"
          }
        ]
      },
      "ManifestItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonManifestFields"
          },
          {
            "$ref": "#/components/schemas/ManifestTimestampFields"
          }
        ]
      },
      "JobStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "STARTED",
          "WAITING_USER_ACTION",
          "CANCELED",
          "IN_PROGRESS",
          "SUCCESS",
          "PARTIAL_SUCCESS",
          "FAILED"
        ]
      },
      "ResourceNodeType": {
        "type": "string",
        "description": "Type of the resource",
        "enum": [
          "designbuilder",
          "journey",
          "product",
          "price",
          "product_recommendation",
          "coupon",
          "tax",
          "automation_flow",
          "entity_mapping",
          "file",
          "emailtemplate",
          "schema",
          "schema_attribute",
          "schema_capability",
          "schema_group",
          "schema_group_headline",
          "workflow_definition",
          "closing_reason",
          "taxonomy_classification",
          "webhook",
          "integration",
          "dashboard",
          "custom_variable",
          "usergroup",
          "saved_view",
          "app",
          "role",
          "portal_config",
          "target",
          "kanban",
          "validation_rule",
          "flow_template",
          "taxonomy",
          "notification_template",
          "environment_variable",
          "datasource",
          "family",
          "permission"
        ]
      },
      "PlanChanges": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "create",
            "update",
            "internal-update",
            "no-op",
            "delete",
            "ignored"
          ]
        }
      },
      "CommonResourceNode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the resource"
          },
          "type": {
            "$ref": "#/components/schemas/ResourceNodeType"
          },
          "name": {
            "type": "string",
            "description": "Name of the resource"
          },
          "source_id": {
            "type": "string",
            "description": "Source ID of the resource"
          },
          "is_virtual": {
            "type": "boolean",
            "description": "Whether the resource is virtual"
          }
        },
        "required": [
          "id",
          "type"
        ]
      },
      "RootResourceNode": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonResourceNode"
          },
          {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "description": "Terraform address of the resource"
              },
              "dependencies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/VirtualResourceNodeGroup"
                },
                "description": "Dependencies of the resource",
                "nullable": true
              },
              "changes": {
                "$ref": "#/components/schemas/PlanChanges"
              },
              "changes_reason": {
                "type": "array",
                "description": "Fields causing the updates / internal updates on a resource install",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        ]
      },
      "VirtualResourceNodeGroup": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonResourceNode"
          },
          {
            "type": "object",
            "properties": {
              "dependencies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResourceNode"
                }
              },
              "is_virtual": {
                "type": "boolean",
                "enum": [
                  true
                ]
              }
            }
          }
        ]
      },
      "ResourceNode": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonResourceNode"
          },
          {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "description": "Terraform address of the resource"
              },
              "dependencies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResourceNode"
                },
                "description": "Dependencies of the resource",
                "nullable": true
              },
              "parents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "$ref": "#/components/schemas/ResourceNodeType"
                    }
                  }
                }
              },
              "source_id": {
                "description": "Original ID of the exported resource",
                "type": "string"
              },
              "changes": {
                "$ref": "#/components/schemas/PlanChanges"
              },
              "changes_reason": {
                "type": "array",
                "description": "Fields causing the updates / internal updates on a resource install",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        ]
      },
      "Job": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "job_id": {
                "$ref": "#/components/schemas/JobID"
              },
              "job_status": {
                "$ref": "#/components/schemas/JobStatus"
              },
              "manifest_file_path": {
                "type": "string",
                "description": "The S3 key of the manifest file"
              },
              "message": {
                "type": "string"
              },
              "timestamp": {
                "type": "string",
                "format": "date-time"
              },
              "plan_file_content": {
                "type": "string",
                "description": "An URL to download the plan file"
              },
              "resources_to_export": {
                "description": "An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import",
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/RootResourceNode"
                    }
                  },
                  {
                    "$ref": "#/components/schemas/RootResourceNode"
                  }
                ]
              },
              "large_resources_to_export_url": {
                "type": "string",
                "description": "An URL to download the resources to export when the resources are too large to be included in the response"
              },
              "resources_to_import": {
                "description": "An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import",
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/RootResourceNode"
                    }
                  },
                  {
                    "$ref": "#/components/schemas/RootResourceNode"
                  }
                ]
              },
              "large_resources_to_import_url": {
                "type": "string",
                "description": "An URL to download the resources to import when the resources are too large to be included in the response"
              },
              "resource_replacements": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResourceReplacement"
                }
              },
              "is_verified": {
                "type": "boolean",
                "description": "Whether the manifest comes from a trusted source and is signed by epilot"
              },
              "errors": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FormattedError"
                }
              }
            }
          },
          {
            "$ref": "#/components/schemas/CommonImportFields"
          },
          {
            "$ref": "#/components/schemas/CommonMarkdownFields"
          },
          {
            "$ref": "#/components/schemas/CommonManifestFields"
          }
        ]
      },
      "UploadFilePayload": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "example": "example.manifest.zip"
          }
        },
        "required": [
          "filename"
        ]
      },
      "S3Reference": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "example": "blueprint-manifest-prod-blueprintsv2bucket-sybpsryropzw"
          },
          "key": {
            "type": "string",
            "example": "templates/main.tf"
          }
        },
        "required": [
          "bucket",
          "key"
        ]
      },
      "CommonManifestFields": {
        "type": "object",
        "properties": {
          "manifest_id": {
            "$ref": "#/components/schemas/ManifestID"
          },
          "source_type": {
            "$ref": "#/components/schemas/ManifestSource"
          },
          "source_blueprint_name": {
            "type": "string",
            "example": "Solar B2B"
          },
          "source_blueprint_slug": {
            "type": "string",
            "description": "URL slug of a blueprint from the epilot marketplace",
            "example": "solar-b2b"
          },
          "source_blueprint_version": {
            "type": "string",
            "description": "Version of the blueprint (semver)",
            "example": "1.0.0"
          },
          "pre_install_requirements": {
            "$ref": "#/components/schemas/PreInstallRequirements"
          },
          "source_blueprint_file": {
            "type": "string",
            "deprecated": true,
            "description": "A URL to download the source blueprint file used to import the blueprint",
            "example": "https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/manifest.zip"
          },
          "docs_link": {
            "type": "string",
            "description": "Link to the blueprint documentation",
            "example": "https://help.epilot.cloud"
          },
          "source_blueprint_file_ref": {
            "$ref": "#/components/schemas/S3Reference"
          },
          "install_status": {
            "$ref": "#/components/schemas/BlueprintInstallStatus"
          },
          "install_status_description": {
            "type": "string",
            "example": "This blueprint installation resulted in a partial deployment; some resources were created successfully, but  failed to complete the full resource setup."
          },
          "is_verified": {
            "type": "boolean",
            "description": "Whether the manifest comes from a trusted source and is signed by epilot"
          },
          "created_by": {
            "$ref": "#/components/schemas/CallerIdentity"
          },
          "updated_by": {
            "$ref": "#/components/schemas/CallerIdentity"
          },
          "manifest_version": {
            "type": "string",
            "description": "Version of the manifest (semver)",
            "example": "1.0.0"
          },
          "selected_resources_url": {
            "type": "string",
            "description": "All the resources that were selected to be exported, used to pre-select the resources when updating a sandbox manifest",
            "example": "https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/selected_resources.json"
          },
          "ready_imported_resources_url": {
            "type": "string",
            "description": "All the resources that were marked as ready by the user",
            "example": "https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/ready_imported_resources.json"
          },
          "deployed_from": {
            "type": "object",
            "properties": {
              "source_organization_id": {
                "type": "string",
                "description": "ID of the organization that deployed the manifest"
              },
              "source_manifest_id": {
                "type": "string",
                "description": "ID of the manifest that was deployed"
              },
              "source_organization_type": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "production"
                ]
              },
              "last_triggered_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the deployment was last triggered"
              }
            },
            "description": "Information about the manifest that was deployed from, used to update existing deployments instead of always creating new ones"
          },
          "deployed_to": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "destination_organization_id": {
                  "type": "string",
                  "description": "ID of the organization that the manifest was deployed to"
                },
                "destination_manifest_id": {
                  "type": "string",
                  "description": "ID of the manifest that was deployed to"
                },
                "destination_organization_type": {
                  "type": "string",
                  "enum": [
                    "sandbox",
                    "production"
                  ]
                },
                "last_triggered_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the deployment was last triggered"
                }
              }
            },
            "description": "Information about the manifest that was deployed to, used to update existing deployments instead of always creating new ones"
          }
        }
      },
      "ManifestTimestampFields": {
        "type": "object",
        "properties": {
          "created_at": {
            "description": "When the manifest was first installed (applied)",
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "description": "When the manifest was last updated (applied)",
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CommonImportFields": {
        "type": "object",
        "properties": {
          "source_type": {
            "$ref": "#/components/schemas/ManifestSource"
          },
          "imported_resources": {
            "description": "An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RootResourceNode"
                }
              },
              {
                "$ref": "#/components/schemas/RootResourceNode"
              }
            ]
          },
          "large_imported_resources_url": {
            "type": "string",
            "format": "uri",
            "description": "An URL to download the imported resources when the resources are too large to be included in the response",
            "example": "https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/large.json"
          }
        }
      },
      "CommonMarkdownFields": {
        "type": "object",
        "properties": {
          "markdown": {
            "type": "object",
            "description": "Markdown content part of a manifest file",
            "properties": {
              "manifest": {
                "type": "string",
                "description": "Markdown content shown before installing the manifest",
                "example": "This is the content of the manifest.md file which contains the manifest descripton.\n"
              },
              "preinstall": {
                "type": "string",
                "deprecated": true,
                "description": "Markdown content to be displayed when showing the plan to install blueprint",
                "example": "This is the content of the preinstall.md file\n"
              },
              "postinstall": {
                "type": "string",
                "description": "Markdown content to be displayed when showing the plan to install blueprint",
                "example": "This is the content of the postinstall.md file\n"
              }
            }
          }
        }
      },
      "PreInstallRequirements": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "List of feature settings that must be enabled before installing the blueprint",
        "example": [
          "journey_automation",
          "ticket-entities",
          "advanced_permissions"
        ]
      },
      "BlueprintInstallStatus": {
        "type": "string",
        "enum": [
          "SUCCESS",
          "PARTIAL",
          "FAILED"
        ]
      },
      "FormattedErrorCodes": {
        "type": "string",
        "enum": [
          "dependency_extraction",
          "resource_not_found",
          "resource_fetch_api_error",
          "resource_fetch_unknown_error",
          "terraform_cli_process_error",
          "terraform_import_block_process_error",
          "terraform_init_error",
          "terraform_validate_error",
          "terraform_plan_error",
          "terraform_apply_error",
          "terraform_show_error",
          "generic_error",
          "bad_request",
          "forbidden",
          "conflict",
          "not_found",
          "undeclared_resource",
          "invalid_readonly_attribute",
          "invalid_attribute_value",
          "unsupported_attribute",
          "self_referential_block",
          "circular_dependency",
          "state_mismatch",
          "import_nonexistent_object",
          "provider_install_error",
          "stale_blueprint"
        ]
      },
      "FormattedErrorData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "FormattedError": {
        "type": "object",
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object"
              }
            ]
          },
          "code": {
            "$ref": "#/components/schemas/FormattedErrorCodes"
          },
          "data": {
            "type": "object",
            "properties": {
              "formattedResource": {
                "$ref": "#/components/schemas/FormattedErrorData"
              },
              "resource": {
                "type": "string"
              },
              "resourceDependency": {
                "type": "string"
              },
              "resources": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "addresses": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "originalError": {
                "type": "string"
              }
            }
          }
        }
      },
      "CallerIdentity": {
        "type": "object",
        "properties": {
          "name": {
            "description": "a human readable name of the caller (e.g. user name, token name or email address)",
            "example": "manifest@epilot.cloud"
          },
          "org_id": {
            "description": "epilot organization id",
            "type": "string",
            "example": "911690"
          },
          "user_id": {
            "description": "epilot user id, when called by a user",
            "type": "string",
            "example": "11001045"
          },
          "token_id": {
            "description": "token id, when called by API token",
            "type": "string",
            "example": "api_5ZugdRXasLfWBypHi93Fk"
          }
        },
        "required": [
          "org_id"
        ]
      },
      "SelectedResources": {
        "type": "object",
        "properties": {
          "exported_root_resources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "type": {
                  "$ref": "#/components/schemas/ResourceNodeType"
                },
                "address": {
                  "type": "string",
                  "description": "Terraform address of the resource"
                }
              },
              "required": [
                "id",
                "type"
              ]
            }
          },
          "selected_resources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pipeline_id": {
            "type": "string",
            "description": "Pipeline ID selected when doing the sandbox sync"
          }
        },
        "required": [
          "exported_root_resources",
          "selected_resources"
        ]
      },
      "ResourceReplacement": {
        "type": "object",
        "properties": {
          "originalAddress": {
            "type": "string",
            "description": "Original resource ID to be replaced"
          },
          "replacementId": {
            "type": "string",
            "description": "ID of the resource that will replace the original"
          },
          "replacementName": {
            "type": "string",
            "description": "Name of the resource that will replace the original"
          }
        },
        "required": [
          "originalAddress",
          "replacementId"
        ]
      },
      "PutManifestPayload": {
        "type": "object",
        "properties": {
          "source_blueprint_name": {
            "type": "string",
            "description": "Name of the source blueprint"
          },
          "markdown": {
            "type": "string",
            "description": "Markdown content of the manifest"
          },
          "ready_resources": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of ids of resources selected to be ready by the user"
          },
          "deployed_to": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "destination_organization_id": {
                  "type": "string",
                  "description": "ID of the organization that the manifest was deployed to"
                },
                "destination_manifest_id": {
                  "type": "string",
                  "description": "ID of the manifest that was deployed to"
                },
                "destination_organization_type": {
                  "type": "string",
                  "enum": [
                    "sandbox",
                    "production"
                  ]
                },
                "last_triggered_at": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "MarketplaceListing": {
        "type": "object",
        "required": [
          "id",
          "blueprint_id",
          "name",
          "slug",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "blueprint_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "logo": {
            "type": "string",
            "nullable": true
          },
          "documentation_url": {
            "type": "string",
            "nullable": true
          },
          "pricing_type": {
            "type": "string",
            "enum": [
              "free",
              "paid",
              "freemium",
              "contact_us"
            ],
            "nullable": true
          },
          "support_email": {
            "type": "string",
            "nullable": true
          },
          "portal_description": {
            "type": "string",
            "nullable": true
          },
          "teaser_name": {
            "type": "string",
            "nullable": true
          },
          "teaser_short_description": {
            "type": "string",
            "nullable": true
          },
          "teaser_thumbnail": {
            "type": "string",
            "nullable": true
          },
          "details_page_title": {
            "type": "string",
            "nullable": true
          },
          "details_page_description": {
            "type": "string",
            "nullable": true
          },
          "details_page_hero_image": {
            "type": "string",
            "nullable": true
          },
          "details_page_carousel": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "resources_section_description": {
            "type": "string",
            "nullable": true
          },
          "resources_section_benefits_title": {
            "type": "string",
            "nullable": true
          },
          "resources_section_benefits_list": {
            "type": "string",
            "nullable": true
          },
          "resources_section_process_details": {
            "type": "string",
            "nullable": true
          },
          "partner": {
            "type": "string",
            "nullable": true
          },
          "partner_subtext": {
            "type": "string",
            "nullable": true
          },
          "partner_logo": {
            "type": "string",
            "nullable": true
          },
          "partner_website_link": {
            "type": "string",
            "nullable": true
          },
          "last_updated_on": {
            "type": "string",
            "nullable": true
          },
          "requires_customer_portal": {
            "type": "boolean",
            "nullable": true
          },
          "process_details_section_title": {
            "type": "string",
            "nullable": true
          },
          "is_new_blueprint": {
            "type": "boolean",
            "nullable": true
          },
          "available_in": {
            "type": "string",
            "nullable": true
          },
          "testimonials": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "installation_link": {
            "type": "string",
            "nullable": true
          },
          "installation_slug": {
            "type": "string",
            "nullable": true
          },
          "demo_form_link": {
            "type": "string",
            "nullable": true
          },
          "order": {
            "type": "number",
            "nullable": true
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "main_category": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "live",
              "archived"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MarketplaceListingUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "logo": {
            "type": "string",
            "nullable": true
          },
          "documentation_url": {
            "type": "string",
            "nullable": true
          },
          "pricing_type": {
            "type": "string",
            "enum": [
              "free",
              "paid",
              "freemium",
              "contact_us"
            ],
            "nullable": true
          },
          "support_email": {
            "type": "string",
            "nullable": true
          },
          "portal_description": {
            "type": "string",
            "nullable": true
          },
          "teaser_name": {
            "type": "string",
            "nullable": true
          },
          "teaser_short_description": {
            "type": "string",
            "nullable": true
          },
          "teaser_thumbnail": {
            "type": "string",
            "nullable": true
          },
          "details_page_title": {
            "type": "string",
            "nullable": true
          },
          "details_page_description": {
            "type": "string",
            "nullable": true
          },
          "details_page_hero_image": {
            "type": "string",
            "nullable": true
          },
          "details_page_carousel": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "resources_section_description": {
            "type": "string",
            "nullable": true
          },
          "resources_section_benefits_title": {
            "type": "string",
            "nullable": true
          },
          "resources_section_benefits_list": {
            "type": "string",
            "nullable": true
          },
          "resources_section_process_details": {
            "type": "string",
            "nullable": true
          },
          "partner": {
            "type": "string",
            "nullable": true
          },
          "partner_subtext": {
            "type": "string",
            "nullable": true
          },
          "partner_logo": {
            "type": "string",
            "nullable": true
          },
          "partner_website_link": {
            "type": "string",
            "nullable": true
          },
          "last_updated_on": {
            "type": "string",
            "nullable": true
          },
          "requires_customer_portal": {
            "type": "boolean",
            "nullable": true
          },
          "process_details_section_title": {
            "type": "string",
            "nullable": true
          },
          "is_new_blueprint": {
            "type": "boolean",
            "nullable": true
          },
          "available_in": {
            "type": "string",
            "nullable": true
          },
          "testimonials": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "installation_link": {
            "type": "string",
            "nullable": true
          },
          "installation_slug": {
            "type": "string",
            "nullable": true
          },
          "demo_form_link": {
            "type": "string",
            "nullable": true
          },
          "order": {
            "type": "number",
            "nullable": true
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "main_category": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        }
      },
      "MarketplaceListingVersion": {
        "type": "object",
        "required": [
          "id",
          "listing_id",
          "status",
          "draft_label",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "listing_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "archived"
            ]
          },
          "version_name": {
            "type": "string",
            "nullable": true
          },
          "draft_label": {
            "type": "string"
          },
          "update_note": {
            "type": "string",
            "nullable": true
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "nullable": true
          },
          "required_features": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "recommended_apps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      }
    },
    "parameters": {
      "JobID": {
        "name": "job_id",
        "in": "path",
        "required": true,
        "description": "ID of an import or export job",
        "schema": {
          "$ref": "#/components/schemas/JobID"
        }
      }
    },
    "securitySchemes": {
      "EpilotAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization header with epilot OAuth2 bearer token",
        "bearerFormat": "JWT"
      }
    }
  }
}
