# Mythic Analytics ## Clients API - [Clients Management API](https://docs.irisdata.ai/clients-api/overview.md): Create, list, update, and delete Mythic Analytics client tenants, manage tags and snippets, and retrieve loader embed code via the Clients Management API. - [Authentication](https://docs.irisdata.ai/clients-api/authentication.md): Authenticate requests to the Clients Management API using an admin API key passed as a bearer token or query parameter. - [List clients](https://docs.irisdata.ai/openapi/get-clients.md): Retrieve a paginated list of clients with optional filtering. - [Create client](https://docs.irisdata.ai/openapi/post-clients.md): Create a new client tenant. The API auto-generates `publishable_key` and `secret_key` credentials. Returns `409 Conflict` if a client with the same `id` already exists. - [Retrieve client](https://docs.irisdata.ai/openapi/get-clients-id.md): Fetch a single client with its related tags, snippets, and transformers. Returns `404` if the client does not exist. - [Update client](https://docs.irisdata.ai/openapi/patch-clients-id.md): Partially update client fields. Only include the fields you want to change. Returns `400` if no valid fields are provided or validation fails. Returns `404` if client not found. - [Delete client](https://docs.irisdata.ai/openapi/delete-clients-id.md): Soft-delete by default (sets `status` to `false`). Pass `?hard=true` to permanently remove the client from the database and KV store. **Hard delete is irreversible.** - [Replace tags](https://docs.irisdata.ai/openapi/put-clients-id-tags.md): Replace the entire tag set for a client. Tags reference predefined tag templates (GA4, Hotjar, custom scripts, etc.) and can include per-client parameters and trigger rules. After updating, the API rebuilds the client's remote configuration in KV. - [Replace snippets](https://docs.irisdata.ai/openapi/put-clients-id-snippets.md): Replace all custom code snippets for a client. Snippets are arbitrary HTML or JavaScript injected via remote configuration. After updating, the API rebuilds the client's remote configuration in KV. - [Get loader snippets](https://docs.irisdata.ai/openapi/get-clients-id-loader.md): Retrieve the loader configuration including the publishable key, embed URL, and ready-to-paste HTML snippets for embedding the SDK. - [List hostnames](https://docs.irisdata.ai/openapi/get-clients-id-hostnames.md): Retrieve all custom hostnames associated with a client tenant. - [Add hostname](https://docs.irisdata.ai/openapi/post-clients-id-hostnames.md): Add a custom hostname to a client tenant. The hostname is verified asynchronously via DNS lookup. Returns `409 Conflict` if the hostname is already associated with another client. - [Remove hostname](https://docs.irisdata.ai/openapi/delete-clients-id-hostnames.md): Remove a custom hostname from a client tenant. Pass the hostname value in the request body. - [List links](https://docs.irisdata.ai/openapi/get-clients-id-links.md): Retrieve all short links for a client tenant with optional filtering. - [Create link](https://docs.irisdata.ai/openapi/post-clients-id-links.md): Create a new short link for a client tenant. The link is assigned a unique slug and tracks click analytics automatically. - [Retrieve link](https://docs.irisdata.ai/openapi/get-clients-id-links-linkid.md): Fetch a single short link by its ID. - [Delete link](https://docs.irisdata.ai/openapi/delete-clients-id-links-linkid.md): Permanently delete a short link. This action is irreversible. - [Get link analytics](https://docs.irisdata.ai/openapi/get-clients-id-links-linkid-analytics.md): Retrieve click analytics for a specific short link, including total clicks, unique visitors, referrers, and geographic breakdown. - [Get event logs](https://docs.irisdata.ai/openapi/get-clients-id-logs.md): Retrieve a paginated list of event logs for a client tenant. Logs include page views, custom events, and system events. Results are ordered by timestamp descending (newest first). - [Get trends](https://docs.irisdata.ai/openapi/get-clients-id-trends.md): Retrieve aggregated trend data for a client tenant over a specified time period. Returns metrics such as total page views, unique visitors, average session duration, and bounce rate. - [List tag templates](https://docs.irisdata.ai/openapi/get-tags.md): Retrieve all available tag templates. Tag templates define pre-built integrations (GA4, Hotjar, Meta Pixel, custom scripts, etc.) that can be assigned to clients. Each template includes a name, type, code template, and required parameter definitions. ## Agencies API - [Agencies Management API](https://docs.irisdata.ai/agencies-api/overview.md): Create, list, update, and delete agencies, and manage GoHighLevel location associations via the Agencies Management API. - [List agencies](https://docs.irisdata.ai/openapi/get-agencies.md): Retrieve a paginated list of agencies with optional filtering. - [Create agency](https://docs.irisdata.ai/openapi/post-agencies.md): Create a new agency. Agencies group multiple client tenants under a single management entity. Returns `409 Conflict` if an agency with the same name already exists. - [Retrieve agency](https://docs.irisdata.ai/openapi/get-agencies-id.md): Fetch a single agency by its ID, including associated locations. - [Update agency](https://docs.irisdata.ai/openapi/patch-agencies-id.md): Partially update agency fields. Only include the fields you want to change. - [Delete agency](https://docs.irisdata.ai/openapi/delete-agencies-id.md): Permanently delete an agency and disassociate all related client tenants. **This action is irreversible.** - [Add location](https://docs.irisdata.ai/openapi/post-agencies-id-locations.md): Add a GoHighLevel location to an agency. - [Remove location](https://docs.irisdata.ai/openapi/delete-agencies-id-locations.md): Remove a GoHighLevel location from an agency. ## Builder API - [Builder API](https://docs.irisdata.ai/builder-api/overview.md): Build insights, dashboards, and visual canvases with the Mythic Analytics Builder API. - [Authentication](https://docs.irisdata.ai/builder-api/authentication.md): Authenticate requests to the Builder API using an admin API key or publishable key for public query endpoints. - [List insights](https://docs.irisdata.ai/openapi/get-insights.md): Retrieve a paginated list of insights with optional filtering. - [Create insight](https://docs.irisdata.ai/openapi/post-insights.md): Create a new analytics insight. An insight defines a saved query with visualization settings that can be embedded in dashboards. - [Retrieve insight](https://docs.irisdata.ai/openapi/get-insights-id.md): Fetch a single insight by its ID. - [Update insight](https://docs.irisdata.ai/openapi/patch-insights-id.md): Partially update insight fields. - [Delete insight](https://docs.irisdata.ai/openapi/delete-insights-id.md): Permanently delete an insight. Removes it from all dashboards. - [List dashboards](https://docs.irisdata.ai/openapi/get-dashboards.md): Retrieve a paginated list of dashboards. - [Create dashboard](https://docs.irisdata.ai/openapi/post-dashboards.md): Create a new dashboard. Dashboards are containers for insights arranged in a configurable grid layout. - [Retrieve dashboard](https://docs.irisdata.ai/openapi/get-dashboards-id.md): Fetch a single dashboard with its linked insights and layout configuration. - [Update dashboard](https://docs.irisdata.ai/openapi/patch-dashboards-id.md): Partially update dashboard fields including name and settings. - [Delete dashboard](https://docs.irisdata.ai/openapi/delete-dashboards-id.md): Permanently delete a dashboard. Linked insights are not deleted. - [Link insights](https://docs.irisdata.ai/openapi/put-dashboards-id-insights.md): Replace the set of insights linked to a dashboard. Pass an ordered array of insight IDs. This also controls display order. - [Update layout](https://docs.irisdata.ai/openapi/put-dashboards-id-layout.md): Replace the grid layout configuration for a dashboard. Each item defines the position and size of an insight card in the grid. - [List canvases](https://docs.irisdata.ai/openapi/get-canvases.md): Retrieve a paginated list of canvases. - [Create canvas](https://docs.irisdata.ai/openapi/post-canvases.md): Create a new visual canvas. Canvases are drag-and-drop workspaces with nodes and edges for building analytics flows. - [Retrieve canvas](https://docs.irisdata.ai/openapi/get-canvases-id.md): Fetch a single canvas with metadata. - [Update canvas](https://docs.irisdata.ai/openapi/patch-canvases-id.md): Partially update canvas metadata. - [Delete canvas](https://docs.irisdata.ai/openapi/delete-canvases-id.md): Permanently delete a canvas and all its nodes and edges. - [Toggle canvas status](https://docs.irisdata.ai/openapi/post-canvases-id-toggle.md): Toggle a canvas between `draft` and `published` status. - [Save canvas](https://docs.irisdata.ai/openapi/post-canvases-id-save.md): Save the current canvas state as a working draft. This creates a snapshot that can be reverted to later. - [Publish canvas](https://docs.irisdata.ai/openapi/post-canvases-id-publish.md): Publish the current canvas state. Creates a new version and makes the canvas live. The published version is served to end users. - [List versions](https://docs.irisdata.ai/openapi/get-canvases-id-versions.md): Retrieve the version history for a canvas. - [Rollback canvas](https://docs.irisdata.ai/openapi/post-canvases-id-rollback.md): Rollback a canvas to a specific version. The current state is replaced with the specified version's snapshot. - [List nodes](https://docs.irisdata.ai/openapi/get-canvases-canvasid-nodes.md): Retrieve all nodes in a canvas. - [List edges](https://docs.irisdata.ai/openapi/get-canvases-canvasid-edges.md): Retrieve all edges (connections between nodes) in a canvas. - [List node URLs](https://docs.irisdata.ai/openapi/get-canvases-canvasid-nodes-nodeid-urls.md): Retrieve all tracked URLs for a canvas node. - [Add node URL](https://docs.irisdata.ai/openapi/post-canvases-canvasid-nodes-nodeid-urls.md): Add a tracked URL to a canvas node. URLs are monitored for analytics. - [Update node URL](https://docs.irisdata.ai/openapi/patch-canvases-canvasid-nodes-nodeid-urls-urlid.md): Update a tracked URL on a canvas node. - [Delete node URL](https://docs.irisdata.ai/openapi/delete-canvases-canvasid-nodes-nodeid-urls-urlid.md): Remove a tracked URL from a canvas node. - [List node events](https://docs.irisdata.ai/openapi/get-canvases-canvasid-nodes-nodeid-events.md): Retrieve all tracked events for a canvas node. - [Add node event](https://docs.irisdata.ai/openapi/post-canvases-canvasid-nodes-nodeid-events.md): Add a tracked event to a canvas node. - [Update node event](https://docs.irisdata.ai/openapi/patch-canvases-canvasid-nodes-nodeid-events-eventid.md): Update a tracked event on a canvas node. - [Delete node event](https://docs.irisdata.ai/openapi/delete-canvases-canvasid-nodes-nodeid-events-eventid.md): Remove a tracked event from a canvas node. - [Toggle cross-domain tracking](https://docs.irisdata.ai/openapi/put-canvases-canvasid-nodes-nodeid-events-eventid-cross-domain.md): Enable or disable cross-domain tracking for a node event. - [Execute query](https://docs.irisdata.ai/openapi/post-query.md): Execute an analytics query against a client's data. Supports aggregations, filters, grouping, and time-series analysis. Requires admin authentication. - [Execute public query](https://docs.irisdata.ai/openapi/post-public-query.md): Execute an analytics query using a client's publishable key. Scoped to the client associated with the key. Supports the same query syntax as the admin endpoint but with client-level permissions. - [List data connections](https://docs.irisdata.ai/openapi/get-data-connections.md): Retrieve all available data connections. Data connections define external data sources (databases, APIs, warehouses) that can be used in queries and insights. - [List GHL funnels](https://docs.irisdata.ai/openapi/get-ghl-funnels.md): Retrieve funnels from a connected GoHighLevel location. Requires a valid GHL integration configured for the account. - [Import GHL funnel](https://docs.irisdata.ai/openapi/post-ghl-funnels-import.md): Import a GoHighLevel funnel as a canvas with nodes automatically mapped to funnel steps. Creates a new canvas and populates it with the funnel's page structure. - [Generate dashboard](https://docs.irisdata.ai/openapi/post-generate-dashboard.md): Use AI to automatically generate a dashboard with insights based on a natural language prompt. The generated dashboard includes relevant metrics, visualizations, and layout. - [Get platform config](https://docs.irisdata.ai/openapi/get-platform-config.md): Retrieve the current platform configuration including enabled features, limits, and integration settings. ## Client Links API - [Client Links API](https://docs.irisdata.ai/client-links-api/overview.md): Create and manage short links with click analytics, webhook notifications, and uptime monitoring via the Client Links API. - [Authentication](https://docs.irisdata.ai/client-links-api/authentication.md): Authenticate requests to the Client Links API using an admin API key passed as a bearer token or query parameter. - [List links](https://docs.irisdata.ai/openapi/get-links.md): Retrieve a paginated list of short links with optional filtering. - [Create link](https://docs.irisdata.ai/openapi/post-links.md): Create a new short link. The link is assigned a unique slug and automatically tracks click analytics including referrers, geography, and device information. - [Retrieve link](https://docs.irisdata.ai/openapi/get-links-id.md): Fetch a single short link by its ID. - [Update link](https://docs.irisdata.ai/openapi/patch-links-id.md): Partially update a short link. - [Delete link](https://docs.irisdata.ai/openapi/delete-links-id.md): Permanently delete a short link. **This action is irreversible.** - [Get link analytics](https://docs.irisdata.ai/openapi/get-links-id-analytics.md): Retrieve click analytics for a short link including total clicks, unique visitors, referrer breakdown, geographic data, and device statistics. - [List webhooks](https://docs.irisdata.ai/openapi/get-links-webhooks.md): Retrieve all webhook subscriptions. - [Create webhook](https://docs.irisdata.ai/openapi/post-links-webhooks.md): Create a webhook subscription for link events. The webhook URL receives POST requests when the subscribed events occur (e.g., link clicked, link created, uptime alert). - [Delete webhook](https://docs.irisdata.ai/openapi/delete-links-webhooks-id.md): Permanently delete a webhook subscription. - [Get uptime status](https://docs.irisdata.ai/openapi/get-links-id-uptime-status.md): Retrieve the current uptime monitoring status for a link's destination URL, including current state and response time. - [Get uptime history](https://docs.irisdata.ai/openapi/get-links-id-uptime-history.md): Retrieve uptime history with response times, status changes, and availability percentage over a given period. - [Start monitoring](https://docs.irisdata.ai/openapi/post-links-id-uptime-start.md): Enable uptime monitoring for a link's destination URL. The system checks availability at regular intervals and triggers webhook alerts on status changes. - [Stop monitoring](https://docs.irisdata.ai/openapi/post-links-id-uptime-stop.md): Disable uptime monitoring for a link. Historical data is preserved. ## MCP Platform - [MCP Platform](https://docs.irisdata.ai/mcp/overview.md): Manage MCP servers, tools, API keys, and access control for the Mythic Analytics Model Context Protocol platform. - [Authentication](https://docs.irisdata.ai/mcp/authentication.md): Authenticate requests to the MCP Platform API using an admin API key for management endpoints, or an MCP API key for gateway tool execution. - [MCP Gateway](https://docs.irisdata.ai/mcp/gateway.md): Execute MCP tool calls via the JSON-RPC 2.0 gateway endpoint. - [List servers](https://docs.irisdata.ai/openapi/get-mcp-servers.md): Retrieve all registered MCP servers. - [Create server](https://docs.irisdata.ai/openapi/post-mcp-servers.md): Register a new MCP server. The server is probed for available tools upon creation. Returns `409 Conflict` if a server with the same name already exists. - [Retrieve server](https://docs.irisdata.ai/openapi/get-mcp-servers-id.md): Fetch a single MCP server with its tools and access configuration. - [Update server](https://docs.irisdata.ai/openapi/patch-mcp-servers-id.md): Partially update server configuration. - [Delete server](https://docs.irisdata.ai/openapi/delete-mcp-servers-id.md): Remove an MCP server registration and its access control rules. - [Probe server](https://docs.irisdata.ai/openapi/post-mcp-servers-id-probe.md): Probe an MCP server to discover available tools and verify connectivity. Updates the server's tool list and status. - [Get server access rules](https://docs.irisdata.ai/openapi/get-mcp-servers-id-access.md): Retrieve access control rules for a server. - [Replace server access rules](https://docs.irisdata.ai/openapi/put-mcp-servers-id-access.md): Replace all access control rules for a server. - [Set client access](https://docs.irisdata.ai/openapi/put-mcp-servers-id-access-clientid.md): Set access control for a specific client on a server. - [List tools](https://docs.irisdata.ai/openapi/get-mcp-tools.md): Retrieve all discovered MCP tools across all registered servers. Tools are discovered during server probes. - [Update tool](https://docs.irisdata.ai/openapi/patch-mcp-tools-id.md): Update tool metadata such as display name, description, or enabled state. - [Get tool access rules](https://docs.irisdata.ai/openapi/get-mcp-tools-id-access.md): Retrieve access control rules for a specific tool. - [Replace tool access rules](https://docs.irisdata.ai/openapi/put-mcp-tools-id-access.md): Replace all access control rules for a tool. - [Set client tool access](https://docs.irisdata.ai/openapi/put-mcp-tools-id-access-clientid.md): Set access control for a specific client on a tool. - [List API keys](https://docs.irisdata.ai/openapi/get-mcp-api-keys.md): Retrieve all MCP API keys. Secret values are masked in the response. - [Create API key](https://docs.irisdata.ai/openapi/post-mcp-api-keys.md): Create a new MCP API key. The full key value is only returned once at creation time. Store it securely. - [Delete API key](https://docs.irisdata.ai/openapi/delete-mcp-api-keys-id.md): Permanently revoke and delete an MCP API key. ## Admin API - [Admin API](https://docs.irisdata.ai/admin-api/overview.md): Manage AI proxy requests, key-value storage, and Pub/Sub subscriptions via the Mythic Analytics Admin API. - [Authentication](https://docs.irisdata.ai/admin-api/authentication.md): Authenticate requests to the Admin API using an admin API key passed as a bearer token or query parameter. - [Chat completion](https://docs.irisdata.ai/openapi/post-ai-chat.md): Proxy a chat completion request through the Mythic Analytics AI gateway. Supports streaming responses and context-aware conversations about analytics data. - [Execute AI action](https://docs.irisdata.ai/openapi/post-ai-action.md): Execute a predefined AI action (e.g., summarize data, generate report, suggest insights). Actions are higher-level operations that combine AI capabilities with platform data. - [List KV entries](https://docs.irisdata.ai/openapi/get-admin-kv.md): Retrieve a paginated list of key-value entries. Supports prefix filtering for scoped lookups. - [Get KV entry](https://docs.irisdata.ai/openapi/get-admin-kv-key.md): Retrieve a single key-value entry by its key. - [Delete KV entry](https://docs.irisdata.ai/openapi/delete-admin-kv-key.md): Delete a single key-value entry. - [Bulk delete KV entries](https://docs.irisdata.ai/openapi/post-admin-kv-bulk-delete.md): Delete multiple key-value entries in a single request. Pass an array of keys or a prefix pattern. - [List subscriptions](https://docs.irisdata.ai/openapi/get-admin-pubsub-subscriptions.md): Retrieve all Pub/Sub subscriptions. - [Create subscription](https://docs.irisdata.ai/openapi/post-admin-pubsub-subscriptions.md): Create a new Pub/Sub subscription. Subscriptions receive messages published to a topic and can deliver them via pull or push mechanisms. - [Retrieve subscription](https://docs.irisdata.ai/openapi/get-admin-pubsub-subscriptions-id.md): Fetch a single subscription with its configuration and metrics. - [Update subscription](https://docs.irisdata.ai/openapi/patch-admin-pubsub-subscriptions-id.md): Partially update subscription configuration. - [Delete subscription](https://docs.irisdata.ai/openapi/delete-admin-pubsub-subscriptions-id.md): Permanently delete a subscription. Undelivered messages are lost. - [Get subscription metrics](https://docs.irisdata.ai/openapi/get-admin-pubsub-subscriptions-id-metrics.md): Retrieve delivery metrics for a subscription. - [Pull messages](https://docs.irisdata.ai/openapi/post-admin-pubsub-subscriptions-id-pull.md): Pull messages from a subscription. Returns up to `max_messages` messages. Messages must be acknowledged after processing or they will be redelivered. - [Acknowledge messages](https://docs.irisdata.ai/openapi/post-admin-pubsub-subscriptions-id-acknowledge.md): Acknowledge receipt and processing of pulled messages. - [Pause subscription](https://docs.irisdata.ai/openapi/post-admin-pubsub-subscriptions-id-pause.md): Pause message delivery for a subscription. Messages continue to queue. - [Resume subscription](https://docs.irisdata.ai/openapi/post-admin-pubsub-subscriptions-id-resume.md): Resume message delivery for a paused subscription. ## JavaScript SDK - [JavaScript SDK](https://docs.irisdata.ai/javascript-sdk/overview.md): Integrate the Mythic Analytics JavaScript SDK to track events, page views, and user identity from the browser with automatic batching, session management, and privacy controls. - [Tracking Methods](https://docs.irisdata.ai/javascript-sdk/tracking-methods.md): Track custom events, page views, user identity, and manage session state with the Mythic Analytics SDK core methods. - [Super Properties](https://docs.irisdata.ai/javascript-sdk/super-properties.md): Manage super properties that are automatically merged into every event captured by the Mythic Analytics SDK. - [Consent & Privacy](https://docs.irisdata.ai/javascript-sdk/consent-privacy.md): Control user consent, opt-in/opt-out tracking, and manage privacy settings with the Mythic Analytics SDK. - [Utility Methods](https://docs.irisdata.ai/javascript-sdk/utility-methods.md): Access device, session, and configuration state with the Mythic Analytics SDK utility methods. - [Configuration Reference](https://docs.irisdata.ai/javascript-sdk/configuration.md): Complete reference for all Mythic Analytics JavaScript SDK configuration options including network, auto-capture, privacy, consent, HIPAA, and more. - [Auto-captured Events](https://docs.irisdata.ai/javascript-sdk/auto-captured-events.md): Reference for all events automatically captured by the Mythic Analytics SDK including page views, attribution tracking, and auto-included context properties. - [Troubleshooting](https://docs.irisdata.ai/javascript-sdk/troubleshooting.md): Debug common issues with the Mythic Analytics JavaScript SDK including missing events, blocked requests, and configuration problems.