{
  "generated_at": "2026-06-12T22:05:57.093Z",
  "system": {
    "id": "topolo-messaging",
    "name": "Topolo Messaging",
    "slug": "topolo-messaging",
    "kind": "application",
    "summary": "First-party WhatsApp Business messaging application for multi-number brand workspaces, shared inboxes, campaigns, automations, provider webhooks, and cross-application integration boundaries.",
    "aliases": [],
    "lifecycle": "active",
    "last_verified": "2026-05-14",
    "owners": [
      "platform-experience",
      "messaging-platform"
    ],
    "repo_paths": [],
    "external_repo_paths": [
      "Apps/business/TopoloMessaging"
    ],
    "service_ids": [
      "srv_avvCARb8AleC"
    ],
    "visibility": "public",
    "api_contract": {
      "type": "curated",
      "source": "PlatformApplications/TopoloMessaging/functions/api/messaging/[[path]].ts",
      "notes": "Topolo Messaging is a Worker-with-assets application using shared Topolo UI Kit shell, launcher, Auth, command-palette, loading, and BugFix surfaces. Browser login and callback-code redemption are owned by the shared Topolo Auth client after the app resolves the Auth-owned service slug topolo-messaging at runtime, with embedded password-login success completed through Messaging app navigation after shared Auth token persistence. Messaging owns a D1 schema for workspaces, WhatsApp numbers, inboxes, contacts, conversations, messages, campaign drafts, automation definitions, outbound jobs, and webhook events. The app exposes /api/messaging/* for signed workspace operations, /api/auth/* as the same-origin Auth gateway, and /api/messaging/whatsapp/webhook for Meta webhook verification and signed event ingestion. Provider dispatch is queued through Cloudflare Queues; live WhatsApp Cloud API credentials must be provisioned as Worker secrets before outbound jobs move from provider_unconfigured to provider-sent states. Auth API-key scopes for the resolved Messaging service id mirror all seven Messaging permissions and are synced to production D1."
    },
    "primary_hosts": [
      "https://messages.topolo.app",
      "https://messages.stg.topolo.us"
    ],
    "doc_paths": [
      "applications/messaging",
      "internal/apps/topolo-messaging"
    ],
    "security_assurance": {
      "risk_tier": "high",
      "auth_boundary": "Topolo Auth service access with Messaging-owned inbox, campaign, number, and automation authorization; embedded password-login success is completed by Messaging app navigation after shared Auth token persistence.",
      "tenant_isolation": "organization_scoped",
      "external_inputs": [
        "browser",
        "api",
        "callback",
        "webhook",
        "queue",
        "scheduled_task"
      ],
      "sensitive_data": [
        "identity",
        "org_data",
        "customer_content",
        "telemetry"
      ],
      "last_security_review": "2026-04-30",
      "security_review_status": "reviewed",
      "pentest_status": "passed",
      "evidence_doc": "internal/apps/topolo-messaging"
    },
    "data_privacy": {
      "classification": "restricted",
      "sensitive_data_classes": [
        "communications",
        "customer_content",
        "identity",
        "organization",
        "telemetry"
      ],
      "storage_locations": [
        "d1",
        "external_provider"
      ],
      "encryption_at_rest": "application_layer_required",
      "encryption_in_transit": "https_only",
      "key_management": "versioned_platform_key_required",
      "retention_policy": "partial",
      "deletion_export_status": "planned",
      "logging_redaction_status": "needs_review",
      "privacy_review_status": "reviewed",
      "enterprise_ready": false,
      "evidence_doc": "internal/apps/topolo-messaging"
    },
    "dependencies": [
      "topolo-auth",
      "topolo-bugfix",
      "applications-packages"
    ],
    "bugfix_policy": {
      "tier": "autonomous",
      "preferred_agent": "either",
      "require_validator": false
    },
    "public_hub_url": "/systems/topolo-messaging",
    "internal_hub_url": null,
    "application_api_url": "/reference/apps/topolo-messaging",
    "generated_openapi_url": null,
    "machine_urls": {
      "system": "/machine/systems/topolo-messaging.json",
      "application": "/machine/applications/topolo-messaging.json"
    }
  },
  "docs": {
    "public": [
      {
        "id": "applications/messaging",
        "title": "Topolo Messaging",
        "summary": "Public overview of the Topolo Messaging WhatsApp Business application for inboxes, campaigns, automations, and multi-number brand workspaces.",
        "audience": "public",
        "tags": [
          "messaging",
          "whatsapp",
          "campaigns",
          "automations"
        ],
        "url": "/applications/messaging",
        "last_verified": "2026-05-13"
      }
    ],
    "internal": [],
    "runbooks": []
  },
  "authority": {
    "owners": [
      "platform-experience",
      "messaging-platform"
    ],
    "repo_paths": [],
    "service_ids": [
      "srv_avvCARb8AleC"
    ],
    "dependencies": [
      "topolo-auth",
      "topolo-bugfix",
      "applications-packages"
    ],
    "aliases": []
  },
  "interfaces": {
    "contract_type": "curated",
    "contract_source": "PlatformApplications/TopoloMessaging/functions/api/messaging/[[path]].ts",
    "contract_source_exists": false,
    "openapi": null,
    "readme": null
  },
  "auth": {
    "depends_on_topolo_auth": true,
    "api_key_scopes": [
      {
        "id": "aks_messaging_automations_manage",
        "name": "automations.manage",
        "description": "Create and manage WhatsApp automation definitions",
        "resourcePattern": "workspace/{workspace_id}/automation/{automation_id}",
        "kind": "api_key_scope"
      },
      {
        "id": "aks_messaging_campaigns_manage",
        "name": "campaigns.manage",
        "description": "Create and manage WhatsApp campaign drafts and send plans",
        "resourcePattern": "workspace/{workspace_id}/campaign/{campaign_id}",
        "kind": "api_key_scope"
      },
      {
        "id": "aks_messaging_context_read",
        "name": "context.read",
        "description": "Look up Auth-owned user and organization context from Messaging",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_messaging_inbox_read",
        "name": "inbox.read",
        "description": "View WhatsApp inboxes, conversations, numbers, campaigns, and automations",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_messaging_inbox_write",
        "name": "inbox.write",
        "description": "Manage inbox conversation state and assignments",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_messaging_messages_send",
        "name": "messages.send",
        "description": "Create outbound WhatsApp message jobs",
        "resourcePattern": "workspace/{workspace_id}/number/{number_id}",
        "kind": "api_key_scope"
      },
      {
        "id": "aks_messaging_numbers_manage",
        "name": "numbers.manage",
        "description": "Register and manage WhatsApp Business phone numbers",
        "resourcePattern": "workspace/{workspace_id}/number/{number_id}",
        "kind": "api_key_scope"
      }
    ],
    "service_permissions": [
      {
        "id": "perm_topolo_messaging_automations_manage",
        "name": "automations:manage",
        "description": "Create and manage WhatsApp automation definitions",
        "resourcePattern": "workspace/{workspace_id}/automation/{automation_id}",
        "kind": "permission"
      },
      {
        "id": "perm_topolo_messaging_campaigns_manage",
        "name": "campaigns:manage",
        "description": "Create and manage WhatsApp campaign drafts and send plans",
        "resourcePattern": "workspace/{workspace_id}/campaign/{campaign_id}",
        "kind": "permission"
      },
      {
        "id": "perm_topolo_messaging_context_read",
        "name": "context:read",
        "description": "Look up Auth-owned user and organization context from Messaging",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_topolo_messaging_inbox_read",
        "name": "inbox:read",
        "description": "View WhatsApp inboxes, conversations, numbers, campaigns, and automations",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_topolo_messaging_inbox_write",
        "name": "inbox:write",
        "description": "Manage inbox conversation state and assignments",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_topolo_messaging_messages_send",
        "name": "messages:send",
        "description": "Create outbound WhatsApp message jobs",
        "resourcePattern": "workspace/{workspace_id}/number/{number_id}",
        "kind": "permission"
      },
      {
        "id": "perm_topolo_messaging_numbers_manage",
        "name": "numbers:manage",
        "description": "Register and manage WhatsApp Business phone numbers",
        "resourcePattern": "workspace/{workspace_id}/number/{number_id}",
        "kind": "permission"
      }
    ]
  },
  "runtime": {
    "primary_hosts": [
      "https://messages.topolo.app",
      "https://messages.stg.topolo.us"
    ],
    "repo_entries": [],
    "wrangler_surfaces": [],
    "packages": []
  },
  "data": {
    "env_vars": [],
    "bindings": [],
    "queue_bindings": [],
    "storage_kinds": [],
    "workflow_signals": []
  },
  "deployment": {
    "commands": [],
    "routes": [],
    "environments": [],
    "assets_directories": [],
    "observability_enabled": false
  },
  "debugging": {
    "failure_modes": [
      "No wrangler.toml surface was discovered under the registered repo paths.",
      "The registered contract source is missing: PlatformApplications/TopoloMessaging/functions/api/messaging/[[path]].ts",
      "Neither OpenAPI nor README-derived interface detail was found."
    ],
    "entrypoints": [
      "PlatformApplications/TopoloMessaging/functions/api/messaging/[[path]].ts"
    ]
  }
}