{
  "openapi": "3.1.0",
  "info": {
    "title": "Lucidity Bot Customer API",
    "version": "0.1.0",
    "description": "Manage Workspaces and Businesses, review Leads, configure routing, and read analytics and reports. Success responses use { data, meta? }; errors use { error: { code, message, details? } }. This catalog includes generic envelopes where resource schemas are not yet documented. Consult the API guide before automating writes. MCP OAuth tokens are not Customer API credentials."
  },
  "servers": [
    {
      "url": "https://api.luciditybot.com"
    }
  ],
  "tags": [
    {
      "name": "Workspaces"
    },
    {
      "name": "Businesses"
    }
  ],
  "paths": {
    "/api/v2/client-portal": {
      "get": {
        "summary": "GET client-portal",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_client_portal",
        "description": "GET client-portal. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": []
      }
    },
    "/api/v2/client-portal/reports": {
      "get": {
        "summary": "GET client-portal/reports",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_client_portal_reports",
        "description": "GET client-portal/reports. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": []
      }
    },
    "/api/v2/client-portal/reports/{reportRunId}": {
      "get": {
        "summary": "GET client-portal/reports/:reportRunId",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_client_portal_reports_reportRunId",
        "description": "GET client-portal/reports/:reportRunId. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "reportRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "reportRunId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/client-portal/reports/{reportRunId}/pdf-generations": {
      "post": {
        "summary": "POST client-portal/reports/:reportRunId/pdf-generations",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted (queued operation)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_client_portal_reports_reportRunId_pdf_generations",
        "description": "POST client-portal/reports/:reportRunId/pdf-generations. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "reportRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "reportRunId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/client-portal/reports/{reportRunId}/pdf-generation": {
      "get": {
        "summary": "GET client-portal/reports/:reportRunId/pdf-generation",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_client_portal_reports_reportRunId_pdf_generation",
        "description": "GET client-portal/reports/:reportRunId/pdf-generation. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "reportRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "reportRunId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/client-portal/reports/{reportRunId}/pdf": {
      "get": {
        "summary": "GET client-portal/reports/:reportRunId/pdf",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_client_portal_reports_reportRunId_pdf",
        "description": "GET client-portal/reports/:reportRunId/pdf. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "reportRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "reportRunId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/workspaces/current": {
      "get": {
        "summary": "GET workspaces/current",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_workspaces_current",
        "description": "GET workspaces/current. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": []
      }
    },
    "/api/v2/workspaces/{workspaceId}/members": {
      "get": {
        "summary": "GET workspaces/:workspaceId/members",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_workspaces_workspaceId_members",
        "description": "GET workspaces/:workspaceId/members. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "workspaceId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      },
      "post": {
        "summary": "POST workspaces/:workspaceId/members",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_workspaces_workspaceId_members",
        "description": "POST workspaces/:workspaceId/members. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "workspaceId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/workspaces/{workspaceId}/billing-summary": {
      "get": {
        "summary": "GET workspaces/:workspaceId/billing-summary",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_workspaces_workspaceId_billing_summary",
        "description": "GET workspaces/:workspaceId/billing-summary. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "workspaceId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/workspaces/{workspaceId}/billing-checkout-sessions": {
      "post": {
        "summary": "POST workspaces/:workspaceId/billing-checkout-sessions",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Required optimistic pricing guard for the displayed Workspace quote.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "pricingVersion",
                  "pricingRevision",
                  "activeClientQuantity"
                ],
                "properties": {
                  "pricingVersion": {
                    "type": "string",
                    "enum": [
                      "workspace_flat_v1"
                    ]
                  },
                  "pricingRevision": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "activeClientQuantity": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "operationId": "post_workspaces_workspaceId_billing_checkout_sessions",
        "description": "POST workspaces/:workspaceId/billing-checkout-sessions. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "workspaceId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/workspaces/{workspaceId}/billing-portal-sessions": {
      "post": {
        "summary": "POST workspaces/:workspaceId/billing-portal-sessions",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_workspaces_workspaceId_billing_portal_sessions",
        "description": "POST workspaces/:workspaceId/billing-portal-sessions. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "workspaceId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/workspaces/{workspaceId}/google-connections": {
      "get": {
        "summary": "GET workspaces/:workspaceId/google-connections",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_workspaces_workspaceId_google_connections",
        "description": "GET workspaces/:workspaceId/google-connections. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "workspaceId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/workspaces/{workspaceId}/google-connections/{connectionId}": {
      "patch": {
        "summary": "PATCH workspaces/:workspaceId/google-connections/:connectionId",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "patch_workspaces_workspaceId_google_connections_connectionId",
        "description": "PATCH workspaces/:workspaceId/google-connections/:connectionId. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "workspaceId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "connectionId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/workspaces/{workspaceId}/google-oauth-authorizations": {
      "post": {
        "summary": "POST workspaces/:workspaceId/google-oauth-authorizations",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_workspaces_workspaceId_google_oauth_authorizations",
        "description": "POST workspaces/:workspaceId/google-oauth-authorizations. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "workspaceId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/workspaces/{workspaceId}/google-connections/{connectionId}/properties": {
      "get": {
        "summary": "GET workspaces/:workspaceId/google-connections/:connectionId/properties",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_workspaces_workspaceId_google_connections_connectionId_properties",
        "description": "GET workspaces/:workspaceId/google-connections/:connectionId/properties. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "workspaceId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "connectionId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/workspaces/{workspaceId}/google-connections/{connectionId}/property-grants": {
      "post": {
        "summary": "POST workspaces/:workspaceId/google-connections/:connectionId/property-grants",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_workspaces_workspaceId_google_connections_connectionId_property_grants",
        "description": "POST workspaces/:workspaceId/google-connections/:connectionId/property-grants. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "workspaceId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "connectionId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/workspaces/{workspaceId}/google-connections/{connectionId}/property-grants/{grantId}": {
      "delete": {
        "summary": "DELETE workspaces/:workspaceId/google-connections/:connectionId/property-grants/:grantId",
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "delete_workspaces_workspaceId_google_connections_connectionId_property_grants_grantId",
        "description": "DELETE workspaces/:workspaceId/google-connections/:connectionId/property-grants/:grantId. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "workspaceId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "connectionId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "grantId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses": {
      "get": {
        "summary": "GET businesses",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses",
        "description": "GET businesses. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": []
      },
      "post": {
        "summary": "POST businesses",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_businesses",
        "description": "POST businesses. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": []
      }
    },
    "/api/v2/businesses/{businessId}": {
      "patch": {
        "summary": "PATCH businesses/:businessId",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "patch_businesses_businessId",
        "description": "PATCH businesses/:businessId. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      },
      "delete": {
        "summary": "DELETE businesses/:businessId",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "delete_businesses_businessId",
        "description": "DELETE businesses/:businessId. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/contacts": {
      "get": {
        "summary": "GET businesses/:businessId/contacts",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_contacts",
        "description": "GET businesses/:businessId/contacts. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/overview": {
      "get": {
        "summary": "GET businesses/:businessId/overview",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_overview",
        "description": "GET businesses/:businessId/overview. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/onboarding": {
      "get": {
        "summary": "GET businesses/:businessId/onboarding",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_onboarding",
        "description": "GET businesses/:businessId/onboarding. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      },
      "patch": {
        "summary": "PATCH businesses/:businessId/onboarding",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "patch_businesses_businessId_onboarding",
        "description": "PATCH businesses/:businessId/onboarding. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/tracking": {
      "get": {
        "summary": "GET businesses/:businessId/tracking",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_tracking",
        "description": "GET businesses/:businessId/tracking. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/validation-summary": {
      "get": {
        "summary": "GET businesses/:businessId/validation-summary",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "description": "Counts cover the full queues. reviewLeads and blockedLeads contain bounded pages, with independent reviewPageInfo and blockedPageInfo cursors. Review leads are oldest-held first; Discarded leads (legacy blocked code) are newest-discarded first within 24 hours. discardedLast24Hours aliases blockedLast24Hours. discardReasons counts currently discarded inquiries received within days, by duplicate, spam_or_bot, bad_contact, other, and unspecified. This is separate from possible duplicate validation signals. Source quality sources and campaigns are independent bounded pages with sourcesPageInfo and campaignsPageInfo, ordered by weakest quality first. Their total counts cover all matching groups.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 90
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            }
          },
          {
            "name": "reviewCursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2000
            }
          },
          {
            "name": "blockedCursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2000
            }
          },
          {
            "name": "sourcesCursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2000
            }
          },
          {
            "name": "campaignsCursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2000
            }
          }
        ],
        "operationId": "get_businesses_businessId_validation_summary"
      }
    },
    "/api/v2/businesses/{businessId}/validation-config": {
      "get": {
        "summary": "GET businesses/:businessId/validation-config",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_validation_config",
        "description": "GET businesses/:businessId/validation-config. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      },
      "patch": {
        "summary": "PATCH businesses/:businessId/validation-config",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "patch_businesses_businessId_validation_config",
        "description": "PATCH businesses/:businessId/validation-config. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/leads": {
      "get": {
        "summary": "GET businesses/:businessId/leads",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by one lead status. discarded aliases the legacy blocked code. Omit or use all to include every status.",
            "schema": {
              "type": "string",
              "enum": [
                "received",
                "validating",
                "qualified",
                "review",
                "blocked",
                "forwarded",
                "failed",
                "archived",
                "discarded",
                "all"
              ],
              "default": "all"
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Case-insensitive search across lead identity and attribution fields.",
            "schema": {
              "type": "string",
              "maxLength": 240
            }
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "campaign",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "won",
                "lost",
                "all"
              ],
              "default": "all"
            }
          },
          {
            "name": "receivedFrom",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "receivedTo",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Set true to use cursor pagination and return list metadata. Unpaginated requests with more than 100 matching leads return 422.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque cursor returned in meta.pageInfo.nextCursor.",
            "schema": {
              "type": "string",
              "maxLength": 1000
            }
          },
          {
            "name": "includeMetadata",
            "in": "query",
            "description": "Include counts and filter options in paginated responses.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "customer",
                "source",
                "status",
                "outcome",
                "received"
              ],
              "default": "received"
            }
          },
          {
            "name": "sortDirection",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          }
        ],
        "operationId": "get_businesses_businessId_leads",
        "description": "GET businesses/:businessId/leads. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements."
      }
    },
    "/api/v2/businesses/{businessId}/leads/{leadId}": {
      "get": {
        "summary": "GET businesses/:businessId/leads/:leadId",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "description": "Lead detail includes ten delivery attempts and deliveriesPageInfo. Use deliveryCursor for older attempts. Bodies are omitted from history; hasEmailSnapshot indicates availability. Pass emailDeliveryId to retrieve one scoped deliveryEmailSnapshot.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "leadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "leadId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "deliveryCursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2000
            }
          },
          {
            "name": "emailDeliveryId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "operationId": "get_businesses_businessId_leads_leadId"
      },
      "patch": {
        "summary": "PATCH businesses/:businessId/leads/:leadId",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "patch_businesses_businessId_leads_leadId",
        "description": "PATCH businesses/:businessId/leads/:leadId. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "leadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "leadId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/leads/{leadId}/journey": {
      "get": {
        "summary": "GET businesses/:businessId/leads/:leadId/journey",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_leads_leadId_journey",
        "description": "GET businesses/:businessId/leads/:leadId/journey. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "leadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "leadId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/leads/{leadId}/status-transitions": {
      "post": {
        "summary": "POST businesses/:businessId/leads/:leadId/status-transitions",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "202": {
            "description": "Accepted (queued operation)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "description": "Discarded is the single intentional non-delivery state. Lead responses retain the legacy blocked code; the transition receipt echoes the requested status. Discarding stops delivery for this inquiry without deleting or blacklisting. Returning to review is audited and never queues delivery. Customer qualify/discard is review-only; Admin return to review is discard-only. Legacy blocked inputs remain accepted; unknown historical reasons remain null.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "qualified",
                      "discarded",
                      "review",
                      "blocked"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "For discarded: duplicate, spam_or_bot (Abuse), bad_contact, or other. Other requires note. Legacy blocked clients may lack a structured reason."
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "destinationId": {
                    "type": "string"
                  }
                },
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "status": {
                          "const": "discarded"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "reason"
                      ],
                      "properties": {
                        "reason": {
                          "enum": [
                            "duplicate",
                            "spam_or_bot",
                            "bad_contact",
                            "other"
                          ]
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "reason"
                      ],
                      "properties": {
                        "status": {
                          "enum": [
                            "discarded",
                            "blocked"
                          ]
                        },
                        "reason": {
                          "const": "other"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "note"
                      ],
                      "properties": {
                        "note": {
                          "type": "string",
                          "pattern": "\\S"
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "operationId": "post_businesses_businessId_leads_leadId_status_transitions",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "leadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "leadId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/leads/{leadId}/delivery-requests": {
      "post": {
        "summary": "POST businesses/:businessId/leads/:leadId/delivery-requests",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted (queued operation)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_businesses_businessId_leads_leadId_delivery_requests",
        "description": "POST businesses/:businessId/leads/:leadId/delivery-requests. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "leadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "leadId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/leads/{leadId}/validation-runs": {
      "post": {
        "summary": "POST businesses/:businessId/leads/:leadId/validation-runs",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "required": [
                        "validationRunId",
                        "outcome",
                        "deliveryRequested"
                      ],
                      "properties": {
                        "validationRunId": {
                          "type": "string"
                        },
                        "outcome": {
                          "type": "string",
                          "enum": [
                            "qualified",
                            "review",
                            "blocked",
                            "error"
                          ]
                        },
                        "deliveryRequested": {
                          "const": false
                        },
                        "lead": {
                          "$ref": "#/components/schemas/Lead"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "description": "Revalidates one scoped Lead. Holds delivery before checking, preserves prior runs and deliveries, and never requests redelivery. A Qualified result stays in Review until an explicit manual release. Archived leads and pending intake validation return 409. No request body is required.",
        "operationId": "post_businesses_businessId_leads_leadId_validation_runs",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "leadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "leadId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/intakes": {
      "get": {
        "summary": "GET businesses/:businessId/intakes",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_intakes",
        "description": "GET businesses/:businessId/intakes. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/intakes/{intakeId}": {
      "patch": {
        "summary": "PATCH businesses/:businessId/intakes/:intakeId",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "patch_businesses_businessId_intakes_intakeId",
        "description": "PATCH businesses/:businessId/intakes/:intakeId. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "intakeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "intakeId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/intakes/{intakeId}/provider-webhooks": {
      "patch": {
        "summary": "PATCH businesses/:businessId/intakes/:intakeId/provider-webhooks",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "patch_businesses_businessId_intakes_intakeId_provider_webhooks",
        "description": "PATCH businesses/:businessId/intakes/:intakeId/provider-webhooks. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "intakeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "intakeId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/intakes/{intakeId}/providers": {
      "get": {
        "summary": "GET businesses/:businessId/intakes/:intakeId/providers",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_intakes_intakeId_providers",
        "description": "GET businesses/:businessId/intakes/:intakeId/providers. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "intakeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "intakeId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/intakes/{intakeId}/providers/{providerId}": {
      "patch": {
        "summary": "PATCH businesses/:businessId/intakes/:intakeId/providers/:providerId",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "patch_businesses_businessId_intakes_intakeId_providers_providerId",
        "description": "PATCH businesses/:businessId/intakes/:intakeId/providers/:providerId. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "intakeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "intakeId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "providerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "providerId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/destinations": {
      "get": {
        "summary": "GET businesses/:businessId/destinations",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_destinations",
        "description": "GET businesses/:businessId/destinations. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      },
      "post": {
        "summary": "POST businesses/:businessId/destinations",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_businesses_businessId_destinations",
        "description": "POST businesses/:businessId/destinations. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/destinations/{destinationId}": {
      "patch": {
        "summary": "PATCH businesses/:businessId/destinations/:destinationId",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "patch_businesses_businessId_destinations_destinationId",
        "description": "PATCH businesses/:businessId/destinations/:destinationId. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "destinationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "destinationId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/form-capture-inventory": {
      "get": {
        "summary": "GET businesses/:businessId/form-capture-inventory",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_form_capture_inventory",
        "description": "GET businesses/:businessId/form-capture-inventory. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/form-capture-rules": {
      "post": {
        "summary": "POST businesses/:businessId/form-capture-rules",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_businesses_businessId_form_capture_rules",
        "description": "POST businesses/:businessId/form-capture-rules. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/form-capture-rules/{ruleId}": {
      "patch": {
        "summary": "PATCH businesses/:businessId/form-capture-rules/:ruleId",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "patch_businesses_businessId_form_capture_rules_ruleId",
        "description": "PATCH businesses/:businessId/form-capture-rules/:ruleId. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "ruleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ruleId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/analytics": {
      "get": {
        "summary": "GET businesses/:businessId/analytics",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_analytics",
        "description": "GET businesses/:businessId/analytics. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/analytics/recommendations": {
      "get": {
        "summary": "GET businesses/:businessId/analytics/recommendations",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_analytics_recommendations",
        "description": "GET businesses/:businessId/analytics/recommendations. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/analytics/qualified-leads-heatmap": {
      "get": {
        "summary": "GET businesses/:businessId/analytics/qualified-leads-heatmap",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_analytics_qualified_leads_heatmap",
        "description": "GET businesses/:businessId/analytics/qualified-leads-heatmap. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/ga4-property-link": {
      "get": {
        "summary": "GET businesses/:businessId/ga4-property-link",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_ga4_property_link",
        "description": "GET businesses/:businessId/ga4-property-link. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      },
      "post": {
        "summary": "POST businesses/:businessId/ga4-property-link",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_businesses_businessId_ga4_property_link",
        "description": "POST businesses/:businessId/ga4-property-link. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      },
      "delete": {
        "summary": "DELETE businesses/:businessId/ga4-property-link",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "delete_businesses_businessId_ga4_property_link",
        "description": "DELETE businesses/:businessId/ga4-property-link. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/ga4-property-link/sync-runs": {
      "post": {
        "summary": "POST businesses/:businessId/ga4-property-link/sync-runs",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted (queued operation)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_businesses_businessId_ga4_property_link_sync_runs",
        "description": "POST businesses/:businessId/ga4-property-link/sync-runs. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/ga4-property-grants": {
      "get": {
        "summary": "GET businesses/:businessId/ga4-property-grants",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_ga4_property_grants",
        "description": "GET businesses/:businessId/ga4-property-grants. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/report-runs": {
      "get": {
        "summary": "GET businesses/:businessId/report-runs",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_report_runs",
        "description": "GET businesses/:businessId/report-runs. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/report-runs/{reportRunId}": {
      "get": {
        "summary": "GET businesses/:businessId/report-runs/:reportRunId",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_report_runs_reportRunId",
        "description": "GET businesses/:businessId/report-runs/:reportRunId. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "reportRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "reportRunId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/report-runs/{reportRunId}/pdf-generations": {
      "post": {
        "summary": "POST businesses/:businessId/report-runs/:reportRunId/pdf-generations",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted (queued operation)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_businesses_businessId_report_runs_reportRunId_pdf_generations",
        "description": "POST businesses/:businessId/report-runs/:reportRunId/pdf-generations. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "reportRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "reportRunId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/report-runs/{reportRunId}/pdf-generation": {
      "get": {
        "summary": "GET businesses/:businessId/report-runs/:reportRunId/pdf-generation",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_report_runs_reportRunId_pdf_generation",
        "description": "GET businesses/:businessId/report-runs/:reportRunId/pdf-generation. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "reportRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "reportRunId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/report-runs/{reportRunId}/pdf": {
      "get": {
        "summary": "GET businesses/:businessId/report-runs/:reportRunId/pdf",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_report_runs_reportRunId_pdf",
        "description": "GET businesses/:businessId/report-runs/:reportRunId/pdf. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "reportRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "reportRunId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/report-recipients": {
      "get": {
        "summary": "GET businesses/:businessId/report-recipients",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_report_recipients",
        "description": "GET businesses/:businessId/report-recipients. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      },
      "post": {
        "summary": "POST businesses/:businessId/report-recipients",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "post_businesses_businessId_report_recipients",
        "description": "POST businesses/:businessId/report-recipients. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/report-recipients/{recipientId}": {
      "delete": {
        "summary": "DELETE businesses/:businessId/report-recipients/:recipientId",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "delete_businesses_businessId_report_recipients_recipientId",
        "description": "DELETE businesses/:businessId/report-recipients/:recipientId. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          },
          {
            "name": "recipientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "recipientId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    },
    "/api/v2/businesses/{businessId}/report-subscription": {
      "get": {
        "summary": "GET businesses/:businessId/report-subscription",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "get_businesses_businessId_report_subscription",
        "description": "GET businesses/:businessId/report-subscription. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      },
      "patch": {
        "summary": "PATCH businesses/:businessId/report-subscription",
        "tags": [
          "Businesses"
        ],
        "security": [
          {
            "bearerOrSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "patch_businesses_businessId_report_subscription",
        "description": "PATCH businesses/:businessId/report-subscription. Requires an API Access Token and current Membership access to the requested resource. See the Lucidity Bot API guide for workflow and validation requirements.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "businessId returned by Lucidity. Do not guess resource identifiers."
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerOrSession": {
        "type": "http",
        "scheme": "bearer",
        "description": "API access token, or a browser session with CSRF headers."
      },
      "browserSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "adonis-session",
        "description": "Authenticated browser session. Mutations also require the X-CSRF-TOKEN header."
      }
    },
    "schemas": {
      "Envelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "description": "The resource or collection payload."
          },
          "meta": {
            "type": "object",
            "description": "Pagination and counts when present."
          }
        }
      },
      "Lead": {
        "type": "object",
        "required": [
          "id",
          "businessId",
          "status",
          "source"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "businessId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "received",
              "validating",
              "qualified",
              "review",
              "blocked",
              "forwarded",
              "failed",
              "archived"
            ],
            "description": "blocked is the compatibility response code for Discarded, not necessarily abuse."
          },
          "discardReason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "duplicate",
              "spam_or_bot",
              "bad_contact",
              "other",
              null
            ],
            "description": "Current discard reason. Null means no supported reason was recorded or the lead is no longer discarded."
          },
          "discardNote": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional discard explanation, separate from general lead notes."
          },
          "source": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "interest": {
            "type": "string"
          },
          "reviewHistory": {
            "type": "array",
            "maxItems": 20,
            "description": "Latest scoped review actions; corrections preserve earlier events.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "action": {
                  "type": "string",
                  "enum": [
                    "qualified",
                    "blocked",
                    "unqualified"
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "actorUserId": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "validationRunId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reportedDeliveryId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reportedManualReviewEventId": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "deliveries": {
            "type": "array",
            "maxItems": 10,
            "description": "One page of historical deliveries, independent of the current quality hold.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "succeeded",
                    "failed"
                  ]
                },
                "authorization": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "additionalProperties": false,
                  "description": "Null for unrecorded legacy provenance. Private outbound snapshots and fingerprints are never included.",
                  "properties": {
                    "validationRunId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "manualReviewEventId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "qualificationRevision": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "details": {
            "type": "object",
            "additionalProperties": true
          },
          "attribution": {
            "type": "object",
            "additionalProperties": true
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "leadOutcome": {
            "type": "string",
            "enum": [
              "open",
              "won",
              "lost"
            ]
          },
          "leadOutcomeUpdatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "revenueAmountCents": {
            "type": [
              "integer",
              "null"
            ]
          },
          "revenueCurrency": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "LeadStatusCounts": {
        "type": "object",
        "description": "Counts after all list filters except status; every status is present.",
        "required": [
          "received",
          "validating",
          "qualified",
          "review",
          "blocked",
          "forwarded",
          "failed",
          "archived"
        ],
        "properties": {
          "received": {
            "type": "integer",
            "minimum": 0
          },
          "validating": {
            "type": "integer",
            "minimum": 0
          },
          "qualified": {
            "type": "integer",
            "minimum": 0
          },
          "review": {
            "type": "integer",
            "minimum": 0
          },
          "blocked": {
            "type": "integer",
            "minimum": 0
          },
          "forwarded": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "archived": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "LeadFilterOptions": {
        "type": "object",
        "required": [
          "sources"
        ],
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "LeadPageInfo": {
        "type": "object",
        "required": [
          "hasNextPage",
          "nextCursor"
        ],
        "properties": {
          "hasNextPage": {
            "type": "boolean"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LeadListMeta": {
        "type": "object",
        "required": [
          "total",
          "qualifiedCount",
          "filterOptions",
          "pageInfo",
          "statusCounts"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "qualifiedCount": {
            "type": "integer",
            "minimum": 0
          },
          "filterOptions": {
            "$ref": "#/components/schemas/LeadFilterOptions"
          },
          "pageInfo": {
            "$ref": "#/components/schemas/LeadPageInfo"
          },
          "statusCounts": {
            "$ref": "#/components/schemas/LeadStatusCounts"
          }
        }
      },
      "LeadListResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Lead"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/LeadListMeta"
          }
        }
      },
      "Problem": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Machine-readable error code."
              },
              "message": {
                "type": "string"
              },
              "details": {}
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Lucidity Bot API guide and authentication",
    "url": "https://docs.luciditybot.com/docs/api"
  }
}
