{
  "openapi": "3.0.0",
  "info": {
    "title": "Workflow service",
    "version": "1.00.09",
    "license": {}
  },
  "paths": {
    "/workflow_instance/tenant/{tenantId}/community/{communityId}/create": {
      "post": {
        "summary": "Create workflow instance",
        "description": "Create a workflow instance.<br />\n- Only a **system**, **service** or **service_ext** key can be used to create workflow instance.\n- Key must be authorized for community.\n\n|              **Headers**                     |\n|----------------------------------------------|\n\n### licensekey (required)\nLicense key encrypted with ECDSA\n\n### requestid (required)\nJSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now\n\n### publickey (required)\nPublic key\n\n|            **Request Body**                  |\n|----------------------------------------------|\n\n### workflowId (required)\nWorkflow ID\n\n### metaData (optional)\nMetadata for the workflow instance\n\n\n|            **Returns**                    |\n|----------------------------------------------|\n\nReturns the created workflow instance and errors if any.<br />\nThis API throws an error if something goes wrong.\n",
        "tags": [
          "WorkflowInstance"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "authorization": []
          },
          {
            "license": []
          }
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "tenant-123"
            }
          },
          {
            "name": "communityId",
            "in": "path",
            "description": "Community ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "community-456"
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key  / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "JWT Access Token  / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "requestBody": {
          "description": "Request body contains below fields to create workflow instance.\n```\n{\n  \"workflowId\": \"xxxxxxxxxxxxx\",\n  \"metaData\": { \"firstName\": \"\", \"lastName\": \"\", \"dob\": \"\" } (optional),\n}\n```\n",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowInstanceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateWorkflowInstanceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, Validation errors."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/workflow_instance/initiate": {
      "post": {
        "summary": "Initiate workflow instance",
        "description": "Initiate a workflow instance.<br />\n\n|              **Headers**                     |\n|----------------------------------------------|\n\n### requestid (required)\nJSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now\n\n### publickey (required)\nPublic key\n\n|            **Request Body**                  |\n|----------------------------------------------|\n\n### wfInstanceId (required)\nWorkflow instance ID to initiate\n\n### deviceFingerprint (optional)\nDevice fingerprint for initiation\n\n|            **Returns**                    |\n|----------------------------------------------|\n\nReturns the initiated workflow instance and errors if any.<br />\nThis API throws an error if something goes wrong.\n",
        "tags": [
          "WorkflowInstance"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          }
        ],
        "parameters": [
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key  / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "requestBody": {
          "description": "Request body contains below fields to initiate workflow instance.\n```\n{\n  \"wfInstanceId\": \"xxxxxxxxxxxxx\",\n  \"deviceFingerprint\": \"abc123\"\n}\n```\n",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "object",
                    "required": [
                      "wfInstanceId"
                    ],
                    "properties": {
                      "wfInstanceId": {
                        "type": "string",
                        "description": "Workflow instance ID to initiate",
                        "example": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946"
                      },
                      "deviceFingerprint": {
                        "type": "string",
                        "description": "Device fingerprint for initiation",
                        "example": "32b7615d1f8708e1e25d43640259f"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiateWorkflowInstanceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, Validation errors."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/workflow_instance/submit_result": {
      "post": {
        "summary": "Create workflow instance result",
        "description": "Create a workflow instance result.<br />\n\n|              **Headers**                     |\n|----------------------------------------------|\n\n### requestid (required)\nJSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now\n\n### publickey (required)\nPublic key\n\n|            **Request Body**                  |\n|----------------------------------------------|\n\n### wfInstanceId (required)\nWorkflow instance ID\n\n### nodeId (required)\nNode ID for which result is being created\n\n### result (optional)\nResult data\n\n|            **Returns**                    |\n|----------------------------------------------|\n\nReturns the created workflow instance result and errors if any.<br />\nThis API throws an error if something goes wrong.\n",
        "tags": [
          "WorkflowInstanceResult"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          }
        ],
        "parameters": [
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key  / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "requestBody": {
          "description": "Request body contains below fields to create workflow instance result.\n```\n{\n  \"wfInstanceId\": \"xxxxxxxxxxxxx\",\n  \"nodeId\": \"node-1\",\n  \"nodeType\": \"form\",\n  \"requestData\": { \"field1\": \"value1\", \"selfie\": \"base64EncodedImage\" }\n}\n```\n",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowInstanceResultRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FetchWorkflowInstanceResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, Validation errors."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/workflow_instance/poll": {
      "post": {
        "summary": "Poll workflow instance result",
        "description": "Poll the result of a specific node from a workflow instance.<br />\n\n|              **Headers**                     |\n|----------------------------------------------|\n\n### requestid (required)\nJSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string), and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now\n\n### publickey (required)\nPublic key\n\n|              **Request Body**                |\n|----------------------------------------------|\n\n### wfInstanceId (required)\nWorkflow Instance ID for which result is being fetched\n\n### nodeId (required)\nNode ID whose result is being fetched\n\n### data (optional)\nAdditional input data (e.g. device info or empty object)\n\n|              **Returns**                     |\n|----------------------------------------------|\n\nReturns the workflow node result if available.<br />\nThis API throws an error if something goes wrong or if the node result is not yet available.\n",
        "tags": [
          "WorkflowInstanceResult"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          }
        ],
        "parameters": [
          {
            "name": "requestid",
            "in": "header",
            "required": true,
            "description": "JSON string encrypted with ECDSA / Try Authorize &#128274;",
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "required": true,
            "description": "Public Key / Try Authorize &#128274;",
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "requestBody": {
          "description": "Request body to fetch workflow instance result.\n```json\n{\n  \"data\": {\n    \"wfInstanceId\": \"5c79fc5c-8a97-4b8b-ab8c-3e196f266946\",\n    \"nodeId\": \"form_001\"\n  }\n}\n```\n",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "object",
                    "required": [
                      "wfInstanceId",
                      "nodeId"
                    ],
                    "properties": {
                      "wfInstanceId": {
                        "type": "string",
                        "description": "Workflow instance ID",
                        "example": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946"
                      },
                      "nodeId": {
                        "type": "string",
                        "description": "Node ID",
                        "example": "form_001"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success - Node result is available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FetchWorkflowInstanceResultResponse"
                }
              }
            }
          },
          "202": {
            "description": "Accepted - Node result not yet ready"
          },
          "400": {
            "description": "Bad Request - Validation errors"
          },
          "401": {
            "description": "Unauthorized - Invalid credentials"
          },
          "403": {
            "description": "Forbidden - Key unauthorized"
          },
          "404": {
            "description": "Not Found - Workflow or node not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/workflow_instance/poll_liveid": {
      "post": {
        "summary": "Poll liveid workflow instance result",
        "description": "Poll the result of a liveid_capture node from a workflow instance.<br />\n\n|              **Headers**                     |\n|----------------------------------------------|\n\n### requestid (required)\nJSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string), and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now\n\n### publickey (required)\nPublic key\n\n|              **Request Body**                |\n|----------------------------------------------|\n\n### wfInstanceId (required)\nWorkflow Instance ID for which result is being fetched\n\n### nodeId (required)\nNode ID whose result is being fetched\n\n|              **Returns**                     |\n|----------------------------------------------|\n\nReturns the workflow node result if available.<br />\nThis API throws an error if something goes wrong or if the node result is not yet available.\n",
        "tags": [
          "WorkflowInstanceResult"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          }
        ],
        "parameters": [
          {
            "name": "requestid",
            "in": "header",
            "required": true,
            "description": "JSON string encrypted with ECDSA / Try Authorize &#128274;",
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "required": true,
            "description": "Public Key / Try Authorize &#128274;",
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "requestBody": {
          "description": "Request body to fetch workflow instance result.\n```json\n{\n  \"data\": {\n    \"wfInstanceId\": \"5c79fc5c-8a97-4b8b-ab8c-3e196f266946\",\n    \"nodeId\": \"form_001\"\n  }\n}\n```\n",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "object",
                    "required": [
                      "wfInstanceId",
                      "nodeId"
                    ],
                    "properties": {
                      "wfInstanceId": {
                        "type": "string",
                        "description": "Workflow instance ID",
                        "example": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946"
                      },
                      "nodeId": {
                        "type": "string",
                        "description": "Node ID",
                        "example": "form_001"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success - Node result is available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FetchWorkflowInstanceResultResponse"
                }
              }
            }
          },
          "202": {
            "description": "Accepted - Node result not yet ready"
          },
          "400": {
            "description": "Bad Request - Validation errors"
          },
          "401": {
            "description": "Unauthorized - Invalid credentials"
          },
          "403": {
            "description": "Forbidden - Key unauthorized"
          },
          "404": {
            "description": "Not Found - Workflow or node not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/workflow_instance/{instanceId}/result_summary": {
      "get": {
        "summary": "Get workflow instance result summary",
        "description": "Returns the summary of a workflow instance if completed, or progress info if in progress.\n - Only a **system**, **service** or **service_ext** key can be used.\n - Key must be authorized for community.\n",
        "tags": [
          "WorkflowInstance"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "license": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "instanceId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Workflow Instance ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow instance summary or progress info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "wfInstanceId": {
                          "type": "string"
                        },
                        "metaData": {
                          "type": "object",
                          "properties": {
                            "firstName": {
                              "type": "string"
                            },
                            "lastName": {
                              "type": "string"
                            },
                            "dob": {
                              "type": "string"
                            }
                          }
                        },
                        "workflowId": {
                          "type": "string"
                        },
                        "tenantId": {
                          "type": "string"
                        },
                        "communityId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "startAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "summary": {
                          "type": "object",
                          "properties": {
                            "person_info": {
                              "type": "object",
                              "properties": {
                                "firstName": {
                                  "type": "string"
                                },
                                "lastName": {
                                  "type": "string"
                                },
                                "dob": {
                                  "type": "string"
                                }
                              }
                            },
                            "docsScanned": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid credentials"
          },
          "404": {
            "description": "Not Found - Workflow or node not found"
          }
        }
      }
    },
    "/workflow_instance/{instanceId}/results": {
      "get": {
        "summary": "Get all workflow instance node results",
        "description": "Returns an array of node results (nodeId, nodeType, resultData) for a given workflow instance.\n - System nodes are excluded from the response.\n - Only a **system**, **service**, **service_ext** or **app** key can be used.\n - Key must be authorized for community.\n",
        "tags": [
          "WorkflowInstance"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "license": []
          },
          {
            "authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "instanceId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Workflow Instance ID"
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "JWT Access Token / Try Authorize \ud83d\udd12",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of node results for the workflow instance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "nodeId": {
                            "type": "string",
                            "example": "form_1"
                          },
                          "nodeType": {
                            "type": "string",
                            "example": "form"
                          },
                          "resultData": {
                            "type": "object",
                            "description": "The data collected or produced by this node",
                            "example": {
                              "email": "kakar_manik@yahoo.com"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid credentials"
          },
          "404": {
            "description": "Not Found - Workflow instance not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/workflow_instance/create_by_access_code/{accessCode}": {
      "get": {
        "summary": "Create workflow instance by access code",
        "description": "Creates and returns a workflow instance using an access code.<br />\n- Requires ECDSA authentication headers\n- Workflow must have `direct_access_enabled` set to **true**\n- Optionally accepts a base64-encoded JSON string in the `metadata_b64` query parameter to prefill metadata in the workflow instance\n- Returns instance URL and ID for accessing the workflow\n\n|              **Headers**                     |\n|----------------------------------------------|\n\n### requestid (required)\nJSON string encrypted with ECDSA which should contain `\"appid\"` (string), `\"uuid\"` (string), and `\"ts\"` (number)\n\n### publickey (required)\nPublic key\n\n|              **Query Parameters**                     |\n|-------------------------------------------------------|\n\n### metadata_b64 (optional)\nBase64-encoded JSON object containing workflow metadata (not an array).\nExample decoded JSON:\n```json\n{\n  \"firstName\": \"John\",\n  \"lastName\": \"Doe\",\n  \"dob\": \"1990-01-01\"\n}\n```\n\n|              **Returns**                     |\n|----------------------------------------------|\n\nReturns the created workflow instance URL and ID.<br />\nThis API throws an error if workflow is not found or direct access is disabled.\n",
        "tags": [
          "WorkflowInstance"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          }
        ],
        "parameters": [
          {
            "name": "accessCode",
            "in": "path",
            "description": "Access code for the workflow",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "abc123"
          },
          {
            "name": "metadata_b64",
            "in": "query",
            "description": "Base64-encoded JSON metadata object (optional)",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": null
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "x-ext-id",
            "in": "header",
            "description": "ECDSA-encrypted extension UUID. When present, the server checks extension activation status and conditionally returns a session token.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully created workflow instance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "required": [
                        "instanceUrl",
                        "wfInstanceId"
                      ],
                      "properties": {
                        "instanceUrl": {
                          "type": "string",
                          "description": "URL to access the workflow instance",
                          "example": "https://adminconsole.example.com/workflow/wf_instance/wfi-123456"
                        },
                        "wfInstanceId": {
                          "type": "string",
                          "description": "ID of the created workflow instance",
                          "example": "wfi-123456"
                        },
                        "token": {
                          "type": "string",
                          "description": "Session token for extension polling (only present when x-ext-id is provided and extension is active)",
                          "example": "eyJhbGciOiJIUzI1NiIs..."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters, metadata, or access code"
          },
          "401": {
            "description": "Unauthorized - Invalid credentials or direct access not enabled"
          },
          "403": {
            "description": "Forbidden - Invalid ECDSA authentication"
          },
          "404": {
            "description": "Not Found - Workflow not found with provided access code"
          },
          "500": {
            "description": "Internal Server Error - Server processing error"
          }
        }
      }
    },
    "/workflow_instance/callback_by_access_code/{accessCode}": {
      "get": {
        "summary": "Create workflow instance by access code (callback)",
        "description": "Creates and returns a workflow instance using an access code (callback endpoint).<br />\n- Requires ECDSA authentication headers\n- Workflow must have `direct_access_enabled` set to **true**\n- Optionally accepts a base64-encoded JSON string in the `metadata_b64` query parameter to prefill metadata in the workflow instance\n- Returns instance URL and ID for accessing the workflow\n",
        "tags": [
          "WorkflowInstance"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          }
        ],
        "parameters": [
          {
            "name": "accessCode",
            "in": "path",
            "description": "Access code for the workflow",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "abc123"
          },
          {
            "name": "metadata_b64",
            "in": "query",
            "description": "Base64-encoded JSON metadata object (optional)",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully created workflow instance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "required": [
                        "instanceUrl",
                        "wfInstanceId"
                      ],
                      "properties": {
                        "instanceUrl": {
                          "type": "string",
                          "description": "URL to access the workflow instance",
                          "example": "https://example.com/workflow/wf_instance/wfi-123456"
                        },
                        "wfInstanceId": {
                          "type": "string",
                          "description": "ID of the created workflow instance",
                          "example": "wfi-123456"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/workflow_instance/recaptcha_config": {
      "get": {
        "summary": "Fetch reCAPTCHA configuration",
        "description": "Returns the reCAPTCHA configuration for the current tenant and community.\n- Requires Bearer JWT authentication.\n- Only authorized Community Admins can access this endpoint.\n",
        "tags": [
          "WorkflowInstance"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "authorization": []
          }
        ],
        "parameters": [
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA containing \"appid\", \"uuid\", and \"ts\" (number)",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "Bearer JWT token (required if using JWT auth)",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully fetched reCAPTCHA configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecaptchaConfigResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired token"
          },
          "403": {
            "description": "Forbidden - insufficient permissions"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/workflow_instance/send/notification": {
      "post": {
        "summary": "Send workflow instance notification (SMS or Email)",
        "description": "Sends a notification (SMS or Email) for a workflow instance to the specified recipient.\n- Requires Bearer JWT authentication.\n- Only authorized users with workflow creation/management permissions can access this endpoint.\n- If `type` is `sms`, both `smsTo` and `smsISDCode` are required.\n- If `type` is `email`, `emailTo` is required\n- `instanceUrl` is always required.\n- Either `captchaToken` or `license` must be provided (but not both).\n",
        "tags": [
          "WorkflowInstance"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "authorization": []
          }
        ],
        "parameters": [
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA containing \"appid\", \"uuid\", and \"ts\" (number)",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "Bearer JWT token (required if using JWT auth)",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "requestBody": {
          "description": "Request body for sending notification for a workflow instance.\nExample (sms):\n```json\n{\n  \"data\": {\n    \"type\": \"sms\",\n    \"smsTo\": \"XXXXXXXXXX\",\n    \"smsISDCode\": \"+XX\",\n    \"instanceUrl\": \"https://domain.com/workflow/wf_instance/xxxxx\",\n    \"license\": \"xxxxxxxxxxx\"\n  }\n}\n```\nExample (email):\n```json\n{\n  \"data\": {\n    \"type\": \"email\",\n    \"emailTo\": \"example@example.com\",\n    \"instanceUrl\": \"https://domain.com/workflow/wf_instance/xxxxx\",\n    \"captchaToken\": \"xxxxxxx\"\n  }\n}\n```\n- If `type` is `sms`, `smsTo` and `smsISDCode` are required.\n- If `type` is `email`, `emailTo` is required\n- `instanceUrl` is always required.\n- Either `captchaToken` or `license`(system or service level) must be provided (but not both).\n",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "object",
                    "required": [
                      "type",
                      "instanceUrl"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "sms",
                          "email"
                        ],
                        "description": "Notification type",
                        "example": "sms"
                      },
                      "smsTo": {
                        "type": "string",
                        "description": "Recipient phone number (required if type is SMS)",
                        "example": "XXXXXXXXXX"
                      },
                      "smsISDCode": {
                        "type": "string",
                        "description": "ISD code (required if type is SMS)",
                        "example": "+91"
                      },
                      "emailTo": {
                        "type": "string",
                        "description": "Recipient email address (required if type is email)",
                        "example": "example@example.com"
                      },
                      "instanceUrl": {
                        "type": "string",
                        "description": "Workflow instance URL",
                        "example": "https://domain.com/workflow/wf_instance/xxxxx"
                      },
                      "captchaToken": {
                        "type": "string",
                        "description": "Captcha token (required if license is not provided)"
                      },
                      "license": {
                        "type": "string",
                        "description": "License key (required if captchaToken is not provided)"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Notification sent successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendWorkflowInstanceSMSResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - missing or invalid parameters"
          },
          "401": {
            "description": "Unauthorized - invalid or expired token/license"
          },
          "403": {
            "description": "Forbidden - insufficient permissions"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/workflow_instance/tenant/{tenantId}/community/{communityId}/list": {
      "post": {
        "summary": "List workflow instances",
        "description": "Returns a paginated list of workflow instances for a given tenant and community.<br />\n- Requires either a valid JWT token with `workflow.instance.view` or `workflow.manage` permission or a valid community license.\n- Supported auth levels: **system**, **service**, **service_ext**\n- Pagination parameters pSize and pIndex are required\n- Supports optional filters: status, wfInstanceId\n\n|              **Headers**                     |\n|----------------------------------------------|\n\n### licensekey or JWT Token (required)\nLicense key encrypted with ECDSA or Bearer JWT token\n\n### requestid (required)\nJSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number) representing epoch timestamp in seconds\n\n### publickey (required)\nPublic key\n\n### authorization (optional)\nJWT Access Token (if using JWT authentication)\n\n|            **Request Body**                  |\n|----------------------------------------------|\n\n### pSize (required)\nPage size (min: 1, max: 100)\n\n### pIndex (required)\nPage index (0-based)\n\n### query (optional)\nObject containing optional filter parameters\n\n### query.status (optional)\nArray of workflow instance statuses to filter by (PENDING, STARTED, EXPIRED, COMPLETED, FAILED, SUCCESS, INPROGRESS, NOT_PERFORMED)\n\n### query.wfInstanceId (optional)\nFilter by workflow instance ID (supports partial search, case-insensitive)\n\n### query.workflowId (optional)\nFilter by workflow ID (exact match)\n\n### query.from (optional)\nFilter instances updated from this ISO 8601 date-time (e.g., 2026-02-10T00:00:00.000Z).\nMust be within last 90 days from now. Required if 'to' is provided.\n\n### query.to (optional)\nFilter instances updated until this ISO 8601 date-time (e.g., 2026-02-10T23:59:59.999Z).\nMust be greater than or equal to 'from'. Required if 'from' is provided.\n\n### query.customFilters (optional)\nArray of custom filter objects (max 5 filters allowed). Each filter has 'key' and 'value' properties.\n\n|            **Returns**                       |\n|----------------------------------------------|\n\nReturns a paginated list of workflow instances with wfInstanceId, workflowId, status, and updatedAt fields.<br />\nAlso includes page details (total, index, size).\n",
        "tags": [
          "WorkflowInstance"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "authorization": []
          },
          {
            "license": []
          }
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "tenant-123"
            }
          },
          {
            "name": "communityId",
            "in": "path",
            "description": "Community ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "community-456"
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize &#128274;",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "JWT Access Token / Try Authorize \ud83d\udd12",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "requestBody": {
          "description": "Request body contains pagination and filter parameters.\n```json\n{\n  \"data\": {\n    \"pSize\": 10,\n    \"pIndex\": 0,\n    \"query\": {\n      \"status\": [\"COMPLETED\", \"STARTED\"],\n      \"wfInstanceId\": \"wfi-5c79\",\n      \"workflowId\": \"wf-123456\",\n      \"from\": \"2026-01-01T00:00:00.000Z\",\n      \"to\": \"2026-01-31T23:59:59.999Z\",\n      \"customFilters\": [\n        {\n          \"key\": \"firstName\",\n          \"value\": \"John\"\n        },\n        {\n          \"key\": \"lastName\",\n          \"value\": \"Doe\"\n        }\n      ]\n    }\n  }\n}\n```\npSize and pIndex are required. The query object is optional.\nwfInstanceId supports partial search (case-insensitive).\nfrom and to are ISO 8601 date-time strings (same format as createdAt/updatedAt) for filtering by updatedAt.\nBoth from and to must be provided together. from must be within last 90 days. to must be >= from.\ncustomFilters is an array of key-value pairs (max 5 filters allowed).\n",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "object",
                    "required": [
                      "pSize",
                      "pIndex"
                    ],
                    "properties": {
                      "pSize": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100,
                        "description": "Number of items per page (required)",
                        "example": 10
                      },
                      "pIndex": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Page index, 0-based (required)",
                        "example": 0
                      },
                      "query": {
                        "type": "object",
                        "description": "Optional filter parameters",
                        "properties": {
                          "status": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "PENDING",
                                "STARTED",
                                "EXPIRED",
                                "COMPLETED",
                                "FAILED",
                                "SUCCESS",
                                "INPROGRESS",
                                "NOT_PERFORMED"
                              ]
                            },
                            "description": "Array of workflow instance statuses to filter by",
                            "example": [
                              "COMPLETED",
                              "STARTED"
                            ]
                          },
                          "wfInstanceId": {
                            "type": "string",
                            "description": "Filter by workflow instance ID (supports partial search, case-insensitive)",
                            "example": "wfi-5c79fc5c"
                          },
                          "workflowId": {
                            "type": "string",
                            "description": "Filter by workflow ID (exact match)",
                            "example": "wf-123456"
                          },
                          "from": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Filter instances updated from this ISO 8601 date-time (e.g., 2026-01-01T00:00:00.000Z). Same format as createdAt/updatedAt. Must be within last 90 days. Required if 'to' is provided.",
                            "example": "2026-01-01T00:00:00.000Z"
                          },
                          "to": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Filter instances updated until this ISO 8601 date-time (e.g., 2026-01-31T23:59:59.999Z). Same format as createdAt/updatedAt. Must be >= 'from'. Required if 'from' is provided.",
                            "example": "2026-01-31T23:59:59.999Z"
                          },
                          "customFilters": {
                            "type": "array",
                            "maxItems": 5,
                            "description": "Array of custom filter objects (max 5 filters allowed)",
                            "items": {
                              "type": "object",
                              "required": [
                                "key",
                                "value"
                              ],
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "Filter key",
                                  "example": "firstName"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "Filter value",
                                  "example": "John"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully retrieved workflow instances list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "wfInstanceId": {
                                "type": "string",
                                "description": "Workflow instance ID",
                                "example": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946"
                              },
                              "workflowId": {
                                "type": "string",
                                "description": "Workflow ID",
                                "example": "wf-123456"
                              },
                              "status": {
                                "type": "string",
                                "description": "Current status of the workflow instance",
                                "example": "COMPLETED"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Last updated timestamp",
                                "example": "2024-01-15T10:30:00.000Z"
                              }
                            }
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "description": "Total number of workflow instances matching the filters",
                              "example": 150
                            },
                            "index": {
                              "type": "integer",
                              "description": "Current page index",
                              "example": 0
                            },
                            "size": {
                              "type": "integer",
                              "description": "Number of items per page",
                              "example": 10
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters or validation errors"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - Insufficient permissions"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/workflow_instance/{wfInstanceId}/tenant/{tenantId}/community/{communityId}": {
      "get": {
        "summary": "Get workflow instance details with node list",
        "description": "Returns workflow instance details including workflow information and paginated list of nodes with their execution status.\n- Requires JWT token with `workflow.instance.view` or `workflow.manage` permission OR\n- License with authLevel: `system`, `service`, or `service_ext`\n- Supports pagination for node list\n",
        "tags": [
          "WorkflowInstance"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "authorization": []
          },
          {
            "license": []
          }
        ],
        "parameters": [
          {
            "name": "wfInstanceId",
            "in": "path",
            "description": "Workflow Instance ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946"
            }
          },
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "tenant-123"
            }
          },
          {
            "name": "communityId",
            "in": "path",
            "description": "Community ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "community-456"
            }
          },
          {
            "name": "pIndex",
            "in": "query",
            "description": "Page index for pagination (optional, default 0, min 0)",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "example": 0
            }
          },
          {
            "name": "pSize",
            "in": "query",
            "description": "Number of nodes per page (optional, default 10, min 1, max 100)",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10,
              "example": 10
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize &#128274;",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "JWT Access Token / Try Authorize \ud83d\udd12",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully fetched workflow instance details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "workflowId": {
                          "type": "string",
                          "description": "Workflow ID",
                          "example": "wf-123456"
                        },
                        "workflowName": {
                          "type": "string",
                          "description": "Workflow name",
                          "example": "Identity Verification Workflow"
                        },
                        "wfInstanceId": {
                          "type": "string",
                          "description": "Workflow instance ID",
                          "example": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Workflow instance creation timestamp",
                          "example": "2024-01-15T10:30:00.000Z"
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Workflow instance expiration timestamp",
                          "example": "2024-01-16T10:30:00.000Z"
                        },
                        "list": {
                          "type": "array",
                          "description": "List of workflow nodes with execution details (excludes system nodeType)",
                          "items": {
                            "type": "object",
                            "properties": {
                              "nodeId": {
                                "type": "string",
                                "description": "Node ID",
                                "example": "form_001"
                              },
                              "nodeType": {
                                "type": "string",
                                "description": "Node type",
                                "example": "form"
                              },
                              "status": {
                                "type": "string",
                                "description": "Node execution status",
                                "example": "COMPLETED"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Node creation timestamp",
                                "example": "2024-01-15T10:35:00.000Z"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Node last update timestamp",
                                "example": "2024-01-15T10:40:00.000Z"
                              }
                            }
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "index": {
                              "type": "integer",
                              "description": "Current page index (0-based)",
                              "example": 0
                            },
                            "size": {
                              "type": "integer",
                              "description": "Number of items per page",
                              "example": 10
                            },
                            "total": {
                              "type": "integer",
                              "description": "Total number of nodes (excluding system nodeType)",
                              "example": 25
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters or tenant/community mismatch"
          },
          "401": {
            "description": "Unauthorized - Invalid credentials or insufficient permissions"
          },
          "403": {
            "description": "Forbidden - Access denied"
          },
          "404": {
            "description": "Not Found - Workflow instance or workflow not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/workflow_instance/{wfInstanceId}/tenant/{tenantId}/community/{communityId}/node/{nodeId}": {
      "get": {
        "summary": "Get workflow instance result by node",
        "description": "Fetches the workflow instance result for a specific node.\n- Requires either a valid JWT with workflow.create, workflow.manage or workflow.instance.view permission, or system/service/service_ext license\n- Returns whatever data is present in the database for the specified node\n- System nodes (nodeType: 'system') are not allowed to be exposed and will return a 403 Forbidden error\n",
        "tags": [
          "WorkflowInstanceResult"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "authorization": []
          },
          {
            "license": []
          }
        ],
        "parameters": [
          {
            "name": "wfInstanceId",
            "in": "path",
            "description": "Workflow Instance ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946"
          },
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "tenant-123"
          },
          {
            "name": "communityId",
            "in": "path",
            "description": "Community ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "community-456"
          },
          {
            "name": "nodeId",
            "in": "path",
            "description": "Node ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "form_001"
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "Bearer JWT token (optional if using license) / Try Authorize \ud83d\udd12",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA (optional if using JWT) / Try Authorize &#128274;",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully fetched workflow instance result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "wfInstanceId": {
                          "type": "string",
                          "description": "Workflow instance ID"
                        },
                        "nodeId": {
                          "type": "string",
                          "description": "Node ID"
                        },
                        "nodeType": {
                          "type": "string",
                          "description": "Node type"
                        },
                        "workflowId": {
                          "type": "string",
                          "description": "Workflow ID"
                        },
                        "tenantId": {
                          "type": "string",
                          "description": "Tenant ID"
                        },
                        "communityId": {
                          "type": "string",
                          "description": "Community ID"
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the node result"
                        },
                        "resultData": {
                          "type": "object",
                          "description": "Result data for the node"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid credentials"
          },
          "403": {
            "description": "Forbidden - Cannot expose system node data or insufficient permissions"
          },
          "404": {
            "description": "Not Found - Workflow instance result not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/workflow_instance/{wfInstanceId}/tenant/{tenantId}/community/{communityId}/execute_node/{nodeId}": {
      "get": {
        "summary": "Execute a single orphan node",
        "description": "Executes a single orphan JavaScript node directly from the UI without full workflow traversal.\n\n**Authentication:** None required (no ECDSA, no API key).\n\n**Behavior:**\n- Executes only the specified nodeId\n- Node must be an orphan node (no active handlers / connections such as on_success, on_fail, on_error, on_next, on_check_resolution_fail)\n- No entry/exit traversal is performed\n\n**Validations:**\n- nodeId must be present and found in the workflow\n- tenantId / communityId must be valid and mapped to the given wfInstanceId\n- Node must be an orphan (no active handlers enabled or connected)\n",
        "tags": [
          "WorkflowInstanceResult"
        ],
        "parameters": [
          {
            "name": "wfInstanceId",
            "in": "path",
            "description": "Workflow Instance ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946"
          },
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "tenant-123"
          },
          {
            "name": "communityId",
            "in": "path",
            "description": "Community ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "community-456"
          },
          {
            "name": "nodeId",
            "in": "path",
            "description": "ID of the orphan node to execute",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "js_node_001"
          }
        ],
        "responses": {
          "200": {
            "description": "Node executed. Check the `success` field to distinguish outcomes:\n- `success: true` \u2014 node executed and returned a result.\n- `success: false` \u2014 node executed but returned no result (treated as failed).\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "nodeId": {
                      "type": "string",
                      "description": "ID of the executed node",
                      "example": "js_node_001"
                    },
                    "result": {
                      "type": "object",
                      "description": "Execution result data (present when success is true)"
                    },
                    "error": {
                      "type": "string",
                      "description": "Error message (present when success is false)",
                      "example": "Node execution returned no result"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error. Possible reasons:\n- tenantId or communityId does not match the workflow instance\n- Node is not an orphan (has active handlers or connections)\n- Node type is not executable (only JS nodes are supported)\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Node is not an orphan. It has active handlers or connections."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found. Possible reasons:\n- Workflow instance not found for the given wfInstanceId\n- Workflow configuration not found\n- nodeId not found in the workflow\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Workflow instance not found."
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Execution failed due to an internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Error while executing orphan node."
                    },
                    "details": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "description": "Error details",
                          "example": "Error executing JS step: unexpected token"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/tenant/{tenantId}/community/{communityId}/workflow": {
      "put": {
        "summary": "Create workflow",
        "description": "Create a workflow configuration.<br />\n- Only a **system**, **service**, or **service_ext** key can be used to create workflow.\n- Key must be authorized for the given tenant and community.\n\n|              **Headers**                     |\n|----------------------------------------------|\n\n### licensekey or JWT Token (required)\nLicense key encrypted with ECDSA or Bearer JWT token\n\n### requestid (required)\nJSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number)\nrepresenting epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now\n\n### publickey (required)\nPublic key\n",
        "tags": [
          "Workflow"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "license": []
          },
          {
            "authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "tenantId",
            "description": "ID of the tenant",
            "required": true,
            "schema": {
              "type": "string",
              "example": "tenantId"
            }
          },
          {
            "in": "path",
            "name": "communityId",
            "description": "ID of the community",
            "required": true,
            "schema": {
              "type": "string",
              "example": "communityId"
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA (appid, uuid, ts) / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "JWT Access Token  / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "requestBody": {
          "description": "Request body for creating a workflow.\n```\n{\n  \"version\": \"v1\",\n  \"name\": \"Sample Workflow\",\n  \"type\": \"IAL2\",\n  \"dvcId\": \"device-789\",\n  \"poiOn\": true,\n  \"isPublished\": false,\n  \"styleSheet\": \"json-string\",\n  \"nodes\": [\n    { \"id\": \"node-1\", \"name\": \"Start Node\" },\n    { \"id\": \"node-2\", \"name\": \"Approval Node\" }\n  ],\n  \"canvasData\": { },\n  \"header\": { type: 'html', html: '' },\n  \"footer\": { type: 'html', html: '' }\n}\n```\n",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateWorkflowResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, Validation errors."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/tenant/{tenantId}/community/{communityId}/workflow/{id}/manage_direct_access": {
      "post": {
        "summary": "Manage direct access settings for workflow",
        "description": "Enables a direct access code to be created for the workflow. This allows a workflow instance to be created automatically when the access code is invoked. Access code is long lived and does not require to be recreated. Normally, when direct access is not enabled, the endpoint to create workflow instance must be called explicitly to create a new instance.<br />\n- Only a **system**, **service**, or **service_ext** key can manage direct access.\n- Key must be authorized for the tenant and community.\n- Either **regenerate** or **enable** must be provided in the request body.\n",
        "tags": [
          "Workflow"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "license": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "tenantId",
            "description": "ID of the tenant",
            "required": true,
            "schema": {
              "type": "string",
              "example": "tenantId"
            }
          },
          {
            "in": "path",
            "name": "communityId",
            "description": "ID of the community",
            "required": true,
            "schema": {
              "type": "string",
              "example": "communityId"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Workflow ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "wf-123"
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "Encrypted JSON string with appid, uuid, and timestamp / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "requestBody": {
          "description": "Request body for managing direct access settings. This API expects the payload under a top-level `data` object.\n",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "object",
                    "description": "Direct access configuration payload",
                    "properties": {
                      "regenerate": {
                        "type": "boolean",
                        "description": "Generate a new access code if true",
                        "example": true
                      },
                      "enable": {
                        "type": "boolean",
                        "description": "Enable or disable direct access",
                        "example": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "accessCode": {
                          "type": "string",
                          "description": "Generated access code (only returned if regenerated / direct access enabled)",
                          "example": "Ab1_c2"
                        },
                        "directAccessEnabled": {
                          "type": "boolean",
                          "description": "Current direct access status",
                          "example": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - missing or invalid data"
          },
          "401": {
            "description": "Unauthorized - invalid credentials or license"
          },
          "403": {
            "description": "Forbidden - key unauthorized"
          },
          "404": {
            "description": "Not Found - Workflow or community not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/tenant/{tenantId}/community/{communityId}/workflow/{id}": {
      "patch": {
        "summary": "Update workflow configuration",
        "description": "Update an existing workflow configuration.<br />\n- Only a **system**, **service**, or **service_ext** key can update workflow.\n- Key must be authorized for the given tenant and community.\n\n|              **Headers**                     |\n|----------------------------------------------|\n\n### licensekey (required)\nLicense key encrypted with ECDSA\n\n### requestid (required)\nJSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number)\nrepresenting epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now\n\n### publickey (required)\nPublic key\n",
        "tags": [
          "Workflow"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "license": []
          },
          {
            "authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "tenantId",
            "description": "ID of the tenant",
            "required": true,
            "schema": {
              "type": "string",
              "example": "tenantId"
            }
          },
          {
            "in": "path",
            "name": "communityId",
            "description": "ID of the community",
            "required": true,
            "schema": {
              "type": "string",
              "example": "communityId"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Workflow ID",
            "required": true,
            "schema": {
              "type": "string",
              "example": "wf-123"
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA (appid, uuid, ts) / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "JWT Access Token  / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "requestBody": {
          "description": "Request body for updating a workflow.\nThe payload must be an object with a top-level `data` object containing the workflow configuration.\n",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "object",
                    "description": "Workflow configuration payload",
                    "properties": {
                      "version": {
                        "type": "string",
                        "description": "Workflow version",
                        "example": "v1"
                      },
                      "name": {
                        "type": "string",
                        "description": "Workflow name",
                        "example": "Sample Workflow"
                      },
                      "type": {
                        "type": "string",
                        "description": "Workflow type",
                        "example": "IAL2"
                      },
                      "dvcId": {
                        "type": "string",
                        "description": "Device ID",
                        "example": "device-789"
                      },
                      "poiOn": {
                        "type": "boolean",
                        "description": "POI enabled",
                        "example": true
                      },
                      "isPublished": {
                        "type": "boolean",
                        "description": "Is workflow published",
                        "example": false
                      },
                      "styleSheet": {
                        "type": "string",
                        "description": "Workflow stylesheet",
                        "example": "{}"
                      },
                      "nodes": {
                        "type": "array",
                        "description": "Workflow nodes",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "example": "node-1"
                            },
                            "name": {
                              "type": "string",
                              "example": "Start Node"
                            }
                          }
                        }
                      },
                      "canvasData": {
                        "type": "object",
                        "description": "Canvas data for the workflow",
                        "example": {}
                      },
                      "header": {
                        "type": "object",
                        "example": {
                          "type": "html",
                          "html": ""
                        }
                      },
                      "footer": {
                        "type": "object",
                        "example": {
                          "type": "html",
                          "html": ""
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Updated workflow configuration"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, Validation errors."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Workflow not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/tenant/{tenantId}/community/{communityId}/workflows": {
      "post": {
        "summary": "List workflows for a community",
        "description": "Fetch paginated list of workflows for a tenant's community.<br />\n- Only a <b>system</b>, <b>service</b>, or <b>service_ext</b> key can fetch workflows.<br />\n- Key must be authorized for the tenant and community.<br />\n- Results are sorted by <b>updatedAt</b> (last modified) in descending order.<br />\n- Supports pagination via <b>pIndex</b> (page index, 0-based) and <b>pSize</b> (page size, default 10, max 100).<br />\n- The <b>query</b> object can be used to filter workflows by any field (e.g. name, type, etc).<br />\n\n| Header         | Required | Description                                      |\n|---------------|----------|--------------------------------------------------|\n| licensekey     | Yes*     | License key encrypted with ECDSA                  |\n| authorization  | Yes*     | JWT Access Token (Bearer)                         |\n| requestid      | Yes      | JSON string encrypted with ECDSA (appid, uuid, ts)|\n| publickey      | Yes      | Public key                                       |\n\n*One of <code>licensekey</code> or <code>authorization</code> is required. If using JWT, provide it in the <code>authorization</code> header.<br />\n",
        "tags": [
          "Workflow"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "license": []
          },
          {
            "authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "tenantId",
            "description": "ID of the tenant",
            "required": true,
            "schema": {
              "type": "string",
              "example": "tenantId"
            }
          },
          {
            "in": "path",
            "name": "communityId",
            "description": "ID of the community",
            "required": true,
            "schema": {
              "type": "string",
              "example": "communityId"
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "Encrypted JSON string with appid, uuid, and timestamp / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "JWT Access Token  / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "example": {}
                      },
                      "pIndex": {
                        "type": "integer",
                        "example": 0
                      },
                      "pSize": {
                        "type": "integer",
                        "example": 10
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paginated workflows list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "description": "Array of workflow objects",
                          "items": {
                            "type": "object",
                            "properties": {
                              "workflowId": {
                                "type": "string",
                                "description": "Workflow ID",
                                "example": "wf-123"
                              },
                              "name": {
                                "type": "string",
                                "description": "Workflow name",
                                "example": "Sample Workflow"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Last modified timestamp",
                                "example": "2026-01-15T12:34:56.789Z"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Creation timestamp",
                                "example": "2025-12-01T09:00:00.000Z"
                              }
                            }
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "index": {
                              "type": "integer",
                              "description": "Current page index (0-based)",
                              "example": 0
                            },
                            "size": {
                              "type": "integer",
                              "description": "Page size",
                              "example": 10
                            },
                            "total": {
                              "type": "integer",
                              "description": "Total number of workflows",
                              "example": 125
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Validation errors"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - key unauthorized"
          },
          "404": {
            "description": "Not Found - Community or tenant not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/tenant/{tenantId}/community/{communityId}/workflow/{workflowId}": {
      "get": {
        "summary": "Get workflow by ID",
        "description": "Fetch workflow configuration by workflowId for a given tenant and community.\n- Requires ECDSA authenticated headers.\n- Key must be authorized for tenant and community.\n\n|              **Headers**                     |\n|----------------------------------------------|\n\n### licensekey (required)\nLicense key encrypted with ECDSA\n\n### requestid (required)\nJSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number)\n\n### publickey (required)\nPublic key\n",
        "tags": [
          "Workflow"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "license": []
          },
          {
            "authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "tenantId",
            "description": "ID of the tenant",
            "required": true,
            "schema": {
              "type": "string",
              "example": "tenantId"
            }
          },
          {
            "in": "path",
            "name": "communityId",
            "description": "ID of the community",
            "required": true,
            "schema": {
              "type": "string",
              "example": "communityId"
            }
          },
          {
            "in": "path",
            "name": "workflowId",
            "description": "workflowId of the workflow",
            "required": true,
            "schema": {
              "type": "string",
              "example": "workflowId"
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "Encrypted JSON string with appid, uuid, and timestamp / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "JWT Access Token  / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow configuration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "workflowId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "version": {
                          "type": "string"
                        },
                        "tenantId": {
                          "type": "string"
                        },
                        "communityId": {
                          "type": "string"
                        },
                        "poiOn": {
                          "type": "boolean"
                        },
                        "isPublished": {
                          "type": "boolean"
                        },
                        "nodes": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Validation errors"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - key unauthorized"
          },
          "404": {
            "description": "Not Found - Workflow not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "delete": {
        "summary": "Delete workflow by ID",
        "description": "Delete a workflow configuration.<br />\n- Only a **system**, **service**, or **service_ext** key can delete a workflow.\n- Key must be authorized for the tenant and community.\n",
        "tags": [
          "Workflow"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "authorization": []
          },
          {
            "license": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "tenantId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Tenant ID"
          },
          {
            "in": "path",
            "name": "communityId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Community ID"
          },
          {
            "in": "path",
            "name": "workflowId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Workflow ID"
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "Encrypted JSON string with appid, uuid and ts / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "JWT Access Token  / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content - workflow successfully deleted"
          },
          "400": {
            "description": "Bad Request - Validation errors"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - key unauthorized"
          },
          "404": {
            "description": "Not Found - Workflow not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/tenant/{tenantId}/community/{communityId}/workflow/dvcid/list": {
      "get": {
        "summary": "List of v2 DVC IDs for workflows",
        "description": "Returns a list of v2 DVC IDs used in workflows for the specified tenant and community.<br />\n- Only a **system**, **service**, or **service_ext** key can access this endpoint.<br />\n- Key must be authorized for the tenant and community.<br />\n- You must provide **either** a valid **licensekey** **or** a **JWT access token**.<br />\n- All requests must include **requestid** and **publickey** headers as described below.<br />\n\n| Header         | Required | Description                                      |\n|---------------|----------|--------------------------------------------------|\n| licensekey     | Yes*     | License key encrypted with ECDSA                  |\n| authorization  | Yes*     | JWT Access Token (Bearer)                         |\n| requestid      | Yes      | JSON string encrypted with ECDSA (appid, uuid, ts)|\n| publickey      | Yes      | Public key                                       |\n\n*One of <code>licensekey</code> or <code>authorization</code> is required. If using JWT, provide it in the <code>authorization</code> header.<br />\n",
        "tags": [
          "Workflow"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "license": []
          },
          {
            "authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "tenantId",
            "description": "ID of the tenant",
            "required": true,
            "schema": {
              "type": "string",
              "example": "tenantId"
            }
          },
          {
            "in": "path",
            "name": "communityId",
            "description": "ID of the community",
            "required": true,
            "schema": {
              "type": "string",
              "example": "communityId"
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize \ud83d\udd12",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "JWT Access Token (Bearer) / Try Authorize \ud83d\udd12",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA (appid, uuid, ts) / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "in": "query",
            "name": "pSize",
            "description": "Page size for pagination (optional, default 10, min 1, max 100)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 100,
              "example": 10
            }
          },
          {
            "in": "query",
            "name": "pIndex",
            "description": "Page index for pagination (optional, default 0)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "example": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success - List of DVC IDs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "description": "Array of DVC IDs",
                          "items": {
                            "type": "object",
                            "properties": {
                              "journeyType": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, Validation errors."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/tenant/{tenantId}/community/{communityId}/workflow/search": {
      "get": {
        "summary": "Search workflows by name",
        "description": "Search for workflows by name within a specific tenant and community.<br />\n- Only a **system**, **service**, or **service_ext** key can access this endpoint.<br />\n- Key must be authorized for the tenant and community.<br />\n- You must provide **either** a valid **licensekey** **or** a **JWT access token**.<br />\n- All requests must include **requestid** and **publickey** headers as described below.<br />\n- Supports pagination via **pIndex** (page index, 0-based) and **pSize** (page size, default 10, max 100).<br />\n\n**Search Behavior:**\n- If name length < 3 characters: Exact match (case-insensitive)\n- If name length >= 3 characters: Partial match (case-insensitive)\n\n| Header         | Required | Description                                      |\n|---------------|----------|--------------------------------------------------|\n| licensekey     | Yes*     | License key encrypted with ECDSA                  |\n| authorization  | Yes*     | JWT Access Token (Bearer)                         |\n| requestid      | Yes      | JSON string encrypted with ECDSA (appid, uuid, ts)|\n| publickey      | Yes      | Public key                                       |\n\n*One of <code>licensekey</code> or <code>authorization</code> is required. If using JWT, provide it in the <code>authorization</code> header.<br />\n",
        "tags": [
          "Workflow"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "license": []
          },
          {
            "authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "tenantId",
            "description": "ID of the tenant",
            "required": true,
            "schema": {
              "type": "string",
              "example": "tenantId"
            }
          },
          {
            "in": "path",
            "name": "communityId",
            "description": "ID of the community",
            "required": true,
            "schema": {
              "type": "string",
              "example": "communityId"
            }
          },
          {
            "in": "query",
            "name": "name",
            "description": "Workflow name to search for (required)",
            "required": true,
            "schema": {
              "type": "string",
              "example": "My Workflow"
            }
          },
          {
            "in": "query",
            "name": "pIndex",
            "description": "Page index for pagination (optional, default 0)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "example": 0
            }
          },
          {
            "in": "query",
            "name": "pSize",
            "description": "Page size for pagination (optional, default 10, min 1, max 100)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 100,
              "example": 10
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize \ud83d\udd12",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "JWT Access Token (Bearer) / Try Authorize \ud83d\udd12",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA (appid, uuid, ts) / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success - Paginated list of matching workflows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "description": "Array of workflows matching the search criteria",
                          "items": {
                            "type": "object",
                            "properties": {
                              "workflowId": {
                                "type": "string",
                                "description": "Workflow ID",
                                "example": "wf-123e4567-e89b-12d3-a456-426614174000"
                              },
                              "name": {
                                "type": "string",
                                "description": "Workflow name",
                                "example": "My Workflow"
                              }
                            }
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "index": {
                              "type": "integer",
                              "description": "Current page index (0-based)",
                              "example": 0
                            },
                            "size": {
                              "type": "integer",
                              "description": "Page size",
                              "example": 10
                            },
                            "total": {
                              "type": "integer",
                              "description": "Total number of workflows matching the search",
                              "example": 25
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Validation errors or missing search term"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - key unauthorized"
          },
          "404": {
            "description": "Not Found - Community or tenant not found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/.well-known": {
      "get": {
        "summary": "Get well known config.",
        "description": "Get well known config<br />\n\n\n|            **Returns**                    |\n|-------------------------------------------|\n\nReturns an object\n",
        "tags": [
          "Well Known config"
        ],
        "responses": {
          "200": {
            "description": "Success\n\n```\n{\n    \"public_key\": \"string\" //same as <service>/publickeys endpoint,\n}\n```\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WellKnownResponse"
                }
              }
            }
          }
        }
      }
    },
    "/servicekeys": {
      "get": {
        "summary": "Get service keys",
        "description": "This endpoint returns available service keys.\nThe license you are using must be of authLevel 'system'\n\n|              **Headers**                     |\n|----------------------------------------------|\n\n### licensekey (required)\nLicense key encrypted with ECDSA\n\n### requestid (required)\nJSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now\n\n### publickey (required)\nPublic key\n\n|              **Returns**                     |\n|----------------------------------------------|\n\nReturns array with service keys\n",
        "tags": [
          "Service Key"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "license": []
          }
        ],
        "parameters": [
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key  / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceKeysResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/servicekey/{keyId}": {
      "delete": {
        "summary": "Reset Service Key",
        "description": "This endpoint resets service key for given keyId. Deletes current one and recreates a new one.\nThe license you are using must be of authLevel 'system'\n\n|              **Parameters**                  |\n|----------------------------------------------|\n\n### keyId (required)\nThe keyId of service key to reset\n\n|              **Headers**                     |\n|----------------------------------------------|\n\n### licensekey (required)\nLicense key encrypted with ECDSA\n\n### requestid (required)\nJSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now\n\n### publickey (required)\nPublic key\n\n|              **Returns**                     |\n|----------------------------------------------|\n\nReturns re-created service key\n",
        "tags": [
          "Service Key"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "license": []
          }
        ],
        "parameters": [
          {
            "name": "keyId",
            "in": "path",
            "description": "keyId of service key to reset",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key  / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceKeysResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/sd": {
      "get": {
        "summary": "Get all service directories.",
        "description": "Get all service directories.\n\n|            **Returns**                    |\n|-------------------------------------------|\n\nReturns all service directories.\n",
        "tags": [
          "Service Directory"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetServiceComponentsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/publickeys": {
      "get": {
        "summary": "Get system's public key.",
        "description": "Get system's public key.\n\n|            **Returns**                    |\n|-------------------------------------------|\n\nReturns a public key object\n",
        "tags": [
          "Public Key"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicKeyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid ECDSA signature / ID found."
          }
        }
      }
    },
    "/jwt/verifyToken": {
      "post": {
        "summary": "Verify JWT token",
        "description": "Verifies a JWT token and checks if the user has an active login session. If the user does not exist, is disabled, or inactive, all login sessions are destroyed.\n",
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "authorization": []
          }
        ],
        "parameters": [
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA which should contain \"appid\" (string), \"uuid\" (string) and \"ts\" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key  / Try Authorize &#128274;",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "description": "Bearer JWT token.",
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "tags": [
          "JWT"
        ],
        "requestBody": {
          "description": "Encrypted request body containing the JWT token. For Swagger preview, unencrypted data is accepted.\n",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JwtVerifyTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Decoded token value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JwtVerifyTokenResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid / Expired Token."
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "summary": "Get healthz.",
        "description": "Get healthz<br />\n\n\n|            **Returns**                    |\n|-------------------------------------------|\n\nReturns a healthz object\n - ```version = <git-tag>.<commit-id>.<dob>``` <br />\n\n - ```git-tag```: When code is compiled from a git-tag, this must carry the tag name. This should match one of the git tags.\n - ```commit-id```: This is the git-commit-id. eg: When code is built from this, the hex code, in the end, is the commit it.\n - ```dob```: Date Of Build. This is epoc-time-in-se\tconds that tell the time when the build was created.\n - \u200bif the code is not built from a git-tag, then the ```version =\ufffc<commit-id>.<dob>```\n",
        "tags": [
          "Healthz"
        ],
        "responses": {
          "200": {
            "description": "Success\n\n```\n{\n    \"status\": \"all services operational\",\n    \"publicKey\": \"string\" //same as <service>/publickeys endpoint,\n    \"code\": \"200\",\n    \"version\": \"<version>\" //as defined above\n}\n```\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthzResponse"
                }
              }
            }
          }
        }
      }
    },
    "/environment": {
      "get": {
        "description": "Provide details regarding the environments.\n|            **Returns**                    |\n|-------------------------------------------|\n\nReturns an environment object\n",
        "tags": [
          "Environment"
        ],
        "security": [
          {
            "license": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/ecdsa_helper/{method}": {
      "post": {
        "summary": "Encrypt and decrypt the data string by public key and private key.",
        "description": "Encrypt and decrypt the data string by public key and private key.\n\n|              **Parameters**                  |\n|----------------------------------------------|\n\n### method (optional)\nThe method parameter is type of enum. Default value is encrypt. <br />\nThis parameter only accepts following values <br />\n   **encrypt**, **decrypt**\n\n\n|            **Request Body**                  |\n|----------------------------------------------|\n\n\n### dataStr (required)\nThe dataStr key is type of string.\n\n<br />\n### publicKey (required)\nThe publicKey is type of string.\n\n<br />\n### privateKey (required)\nThe privateKey is type of string.\n\n|            **Returns**                    |\n|-------------------------------------------|\n\nReturns the encrypted/decrypted string. <br />\nThis API throw an error if something goes wrong. A common source of error is public or private key is not valid.\n",
        "tags": [
          "ECDSA Helper"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EcdsaEncryptDecryptRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "method",
            "schema": {
              "type": "string",
              "enum": [
                "encrypt",
                "decrypt"
              ],
              "default": "encrypt"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EcdsaEncryptDecryptResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v0/tenant/{tenantId}/community/{communityId}/workflow/node/library": {
      "get": {
        "summary": "Get workflow node library",
        "description": "Returns the list of workflow node categories, elements, handler keys, and default header & footer templates.<br />\n<b>Authentication & Headers:</b><br />\n- Requires ECDSA authenticated headers and appropriate permissions.<br />\n- You must provide <b>either</b> a valid <b>licensekey</b> <b>or</b> a <b>JWT access token</b>.<br />\n- All requests must include <b>requestid</b> and <b>publickey</b> headers as described below.<br />\n\n| Header         | Required | Description                                      |\n|---------------|----------|--------------------------------------------------|\n| licensekey     | Yes*     | License key encrypted with ECDSA                  |\n| authorization  | Yes*     | JWT Access Token (Bearer), e.g. `Bearer <token>`  |\n| requestid      | Yes      | JSON string encrypted with ECDSA (appid, uuid, ts)|\n| publickey      | Yes      | Public key                                       |\n\n*One of <code>licensekey</code> or <code>authorization</code> is required. If using JWT, provide it in the <code>authorization</code> header.<br />\n<b>Permissions:</b> SYSTEM, SERVICE, or SERVICE_EXT required.<br />\n<b>Response fields:</b> All fields below are always returned.<br />\n",
        "tags": [
          "WorkflowNode"
        ],
        "security": [
          {
            "keyId": []
          },
          {
            "keySecret": []
          },
          {
            "license": []
          },
          {
            "authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "tenantId",
            "description": "ID of the tenant",
            "required": true,
            "schema": {
              "type": "string",
              "example": "tenantId"
            }
          },
          {
            "in": "path",
            "name": "communityId",
            "description": "ID of the community",
            "required": true,
            "schema": {
              "type": "string",
              "example": "communityId"
            }
          },
          {
            "name": "licensekey",
            "in": "header",
            "description": "License key encrypted with ECDSA / Try Authorize \ud83d\udd12",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "JWT Access Token (Bearer) / Try Authorize \ud83d\udd12",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "requestid",
            "in": "header",
            "description": "JSON string encrypted with ECDSA (appid, uuid, ts) / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          },
          {
            "name": "publickey",
            "in": "header",
            "description": "Public Key / Try Authorize \ud83d\udd12",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Do not enter anything, use 'Authorize' fields"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "categories": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/WorkflowNodeCategory"
                          }
                        },
                        "elements": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/WorkflowNodeElement"
                          }
                        },
                        "handlerKeys": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "templates": {
                          "type": "object",
                          "description": "Default templates for workflow header and footer",
                          "properties": {
                            "header": {
                              "type": "string",
                              "description": "Default header template"
                            },
                            "footer": {
                              "type": "string",
                              "description": "Default footer template"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PublicKeyResponse": {
        "type": "object",
        "properties": {
          "publicKey": {
            "type": "string"
          }
        },
        "example": {
          "publicKey": ""
        }
      },
      "HealthzResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "example": {
          "status": "all services operational",
          "publicKey": "//same as <service>/publickeys endpoint",
          "code": "200",
          "version": "xxxx.xxxx.xxxx"
        }
      },
      "WellKnownResponse": {
        "type": "object",
        "properties": {
          "public_key": {
            "type": "string"
          }
        },
        "example": {
          "public_key": "//same as <service>/publickeys endpoint"
        }
      },
      "EcdsaEncryptDecryptRequest": {
        "type": "object",
        "properties": {
          "dataStr": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          },
          "privateKey": {
            "type": "string"
          }
        },
        "example": {
          "dataStr": "Hey, This is example data string.",
          "publicKey": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx=",
          "privateKey": "xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
        }
      },
      "EcdsaEncryptDecryptResponse": {
        "type": "object",
        "properties": {
          "publicKey": {
            "type": "string"
          },
          "data": {
            "type": "array"
          }
        },
        "example": {
          "data": "xxxxxxxxxxxxxxxxxxxx",
          "publicKey": "xxxxxxxxxxxxxxxxxxxx"
        }
      },
      "ServiceKeysResponse": {
        "type": "array",
        "description": "Service keys array",
        "items": {
          "type": "object",
          "required": [
            "tag",
            "keyId",
            "keySecret",
            "type"
          ],
          "properties": {
            "tag": {
              "type": "string",
              "description": "service ecdsa"
            },
            "keyId": {
              "type": "string",
              "description": "ecdsa publicKey"
            },
            "keySecret": {
              "type": "string",
              "description": "ecdsa private key"
            },
            "type": {
              "type": "string",
              "description": "default = ecdsa | hawk"
            }
          },
          "example": {
            "tag": "xxxxx",
            "keyId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
            "keySecret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
            "type": "xxxxx"
          }
        }
      },
      "GetServiceComponentsResponse": {
        "type": "object",
        "properties": {
          "name1": {
            "type": "string"
          },
          "name2": {
            "type": "string"
          },
          "name3": {
            "type": "string"
          }
        },
        "example": {
          "name1": "https://xxx.xxxxxx.xxx/xxxxx",
          "name2": "https://xxx.xxxxxx.xxx/xxxxx",
          "name3": "https://xxx.xxxxxx.xxx/xxxxx"
        }
      },
      "Node": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Node identifier",
            "example": "node-1"
          },
          "name": {
            "type": "string",
            "description": "Node display name",
            "example": "Start Node"
          }
        }
      },
      "CreateWorkflowRequest": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "version",
              "name",
              "type",
              "dvcId",
              "styleSheet",
              "poiOn",
              "isPublished",
              "nodes"
            ],
            "properties": {
              "version": {
                "type": "string",
                "description": "Workflow version",
                "example": "v1"
              },
              "name": {
                "type": "string",
                "description": "Name of the workflow",
                "example": "Sample Workflow"
              },
              "styleSheet": {
                "type": "string",
                "description": "JSON string containing workflow styling configuration",
                "example": "json-string"
              },
              "type": {
                "type": "string",
                "description": "Workflow type (e.g., IAL2)",
                "example": "IAL2"
              },
              "dvcId": {
                "type": "string",
                "description": "Device ID used to create the workflow",
                "example": "device-789"
              },
              "poiOn": {
                "type": "boolean",
                "description": "Whether PII data should be retained",
                "example": true
              },
              "isPublished": {
                "type": "boolean",
                "description": "Whether the workflow is published",
                "example": false
              },
              "nodes": {
                "type": "array",
                "description": "Array of workflow nodes",
                "items": {
                  "$ref": "#/components/schemas/Node"
                }
              },
              "canvasData": {
                "type": "object",
                "description": "Canvas data for the workflow",
                "example": {}
              },
              "header": {
                "type": "object",
                "example": {
                  "type": "html",
                  "html": ""
                }
              },
              "footer": {
                "type": "object",
                "example": {
                  "type": "html",
                  "html": ""
                }
              }
            }
          }
        }
      },
      "CreateWorkflowResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "workflowId": {
                "type": "string",
                "description": "Workflow ID",
                "example": "xxxxxxxxxxxxx"
              }
            }
          }
        }
      },
      "CreateWorkflowInstanceRequest": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "workflowId"
            ],
            "properties": {
              "workflowId": {
                "type": "string",
                "description": "Workflow Id",
                "example": "xxxxxxxxxxxx"
              },
              "metaData": {
                "type": "object",
                "description": "Metadata for the workflow instance",
                "additionalProperties": {
                  "type": "string"
                },
                "example": {
                  "firstName": "John",
                  "lastName": "Doe",
                  "dob": "19900101"
                }
              }
            }
          }
        }
      },
      "CreateWorkflowInstanceResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "workflowId",
              "metaData"
            ],
            "properties": {
              "wfInstanceId": {
                "type": "string",
                "description": "Workflow instance Id",
                "example": "xxxxxxxxxxxx"
              },
              "wfInstanceUrl": {
                "type": "string",
                "description": "URL of the workflow instance",
                "example": "https://example.com/workflow/xxxxxxxxxxxx"
              }
            }
          }
        }
      },
      "InitiateWorkflowInstanceResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "wfInstanceId",
              "deviceFingerprint"
            ],
            "properties": {
              "wfInstanceId": {
                "type": "string",
                "description": "Workflow instance ID to initiate",
                "example": "xxxxxxxxxxxxx"
              },
              "nodes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Node ID",
                      "example": "abc123"
                    },
                    "name": {
                      "type": "string",
                      "description": "Node name",
                      "example": "form"
                    }
                  }
                },
                "example": [
                  {
                    "id": "abc123",
                    "name": "name"
                  }
                ]
              },
              "nextNodeId": {
                "type": "string",
                "description": "Next node ID to transition to",
                "example": "form_002"
              },
              "nextNodeType": {
                "type": "string",
                "description": "Type of the next node",
                "example": "form"
              }
            },
            "example": {
              "wfInstanceId": "xxxxxxxxxxxxx",
              "nodes": [
                "abc123"
              ],
              "nextNodeId": "form_002",
              "nextNodeType": "form"
            }
          }
        }
      },
      "CreateWorkflowInstanceResultRequest": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "wfInstanceId",
              "nodeId",
              "nodeType",
              "requestData"
            ],
            "properties": {
              "wfInstanceId": {
                "type": "string",
                "description": "Workflow instance ID",
                "example": "xxxxxxxxxxxxx"
              },
              "nodeId": {
                "type": "string",
                "description": "Node ID for which result is being created",
                "example": "node-1"
              },
              "nodeType": {
                "type": "string",
                "description": "Type of the node",
                "example": "form"
              },
              "requestData": {
                "type": "object",
                "description": "Data to be stored in the workflow instance result",
                "additionalProperties": {
                  "type": "string"
                },
                "example": {
                  "field1": "value1",
                  "field2": "value2"
                }
              }
            }
          }
        }
      },
      "CreateWorkflowInstanceResultResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "wfInstanceId",
              "nodeId",
              "result"
            ],
            "properties": {
              "wfInstanceId": {
                "type": "string",
                "description": "Workflow instance ID",
                "example": "xxxxxxxxxxxxx"
              },
              "nodeId": {
                "type": "string",
                "description": "Node ID for which result is created",
                "example": "node-1"
              },
              "result": {
                "type": "object",
                "description": "Result data stored in the workflow instance result",
                "additionalProperties": {
                  "type": "string"
                },
                "example": {
                  "field1": "value1",
                  "field2": "value2"
                }
              }
            }
          }
        }
      },
      "FetchWorkflowInstanceResultResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "wfInstanceId",
              "nextNodeId",
              "nextNodeType",
              "summary"
            ],
            "properties": {
              "wfInstanceId": {
                "type": "string",
                "description": "Workflow instance ID",
                "example": "5c79fc5c-8a97-4b8b-ab8c-3e196f266946"
              },
              "nextNodeId": {
                "type": "string",
                "description": "Node ID whose result is being fetched",
                "example": "form_001"
              },
              "nextNodeType": {
                "type": "string",
                "description": "Type of the next node",
                "example": "form"
              },
              "summary": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "example": [
                  "Biometric",
                  "Passport",
                  "Driver's license"
                ]
              }
            }
          }
        },
        "example": {
          "data": {
            "wfInstanceId": "5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
            "nextNodeId": "form_001",
            "nextNodeType": "form",
            "summary": [
              "Biometric",
              "Passport",
              "Driver's license"
            ]
          }
        }
      },
      "JwtVerifyTokenRequest": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "token": {
                "type": "string"
              }
            }
          }
        }
      },
      "JwtVerifyTokenResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          }
        },
        "example": {
          "data": "object",
          "publicKey": "string"
        }
      },
      "RecaptchaConfigResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "recaptcha_url": {
                "type": "string",
                "example": "xxxxxxx"
              },
              "secret_key_ui": {
                "type": "string",
                "example": "xxxxxxx"
              }
            }
          },
          "publicKey": {
            "type": "string"
          }
        },
        "example": {
          "data": {
            "recaptcha_url": "xxxxxxx",
            "secret_key_ui": "xxxxxxx"
          },
          "publicKey": "xxxxxxx"
        }
      },
      "SendWorkflowInstanceSMSResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "description": "Status of SMS send operation",
                "example": "sent"
              },
              "messageId": {
                "type": "string",
                "description": "Unique ID of the sent message",
                "example": "msg-7890"
              }
            }
          }
        },
        "example": {
          "data": {
            "status": "sent",
            "messageId": "msg-7890"
          }
        }
      },
      "WorkflowNodeCategory": {
        "type": "object",
        "required": [
          "id",
          "title",
          "styles",
          "elements"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Category identifier",
            "example": "category-1"
          },
          "title": {
            "type": "string",
            "description": "Category display title",
            "example": "Document Verification Nodes"
          },
          "styles": {
            "type": "object",
            "description": "Category style configuration",
            "example": {
              "bg_color": "#123456",
              "logo-image": "xxxxxxxxx"
            }
          },
          "elements": {
            "type": "array",
            "description": "List of node element ids in this category",
            "items": {
              "type": "string",
              "description": "Element id",
              "example": "element-1"
            }
          }
        }
      },
      "WorkflowNodeElement": {
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "styles",
          "node"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Element identifier",
            "example": "element-1"
          },
          "name": {
            "type": "string",
            "description": "Element name",
            "example": "Form Node"
          },
          "styles": {
            "type": "object",
            "description": "Node element style configuration",
            "example": {
              "bg_color": "#123456",
              "logo-image": "xxxxxxxxx"
            }
          },
          "node": {
            "type": "object",
            "description": "Node object definition for this element",
            "example": {
              "type": "form",
              "fields": []
            }
          },
          "description": {
            "type": "string",
            "description": "Element description",
            "example": "Performs verification on uploaded documents."
          }
        }
      }
    },
    "securitySchemes": {
      "keyId": {
        "type": "apiKey",
        "name": "keyId",
        "in": "header",
        "description": "ECDSA Public Key"
      },
      "keySecret": {
        "type": "apiKey",
        "name": "keySecret",
        "in": "header",
        "description": "ECDSA Private Key"
      },
      "license": {
        "type": "apiKey",
        "name": "license",
        "in": "header",
        "description": "License key from License Microservice"
      },
      "authorization": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT Authorization"
      }
    }
  },
  "tags": [
    {
      "name": "Well Known config"
    },
    {
      "name": "Service Key"
    },
    {
      "name": "Public Key"
    },
    {
      "name": "Healthz"
    },
    {
      "name": "Environment"
    },
    {
      "name": "ECDSA Helper"
    }
  ],
  "servers": [
    {
      "url": "https://pilot-root.1kosmos.net/workflowapi/"
    }
  ]
}