Skip to main content

Overview

The Mission Control REST API provides programmatic access to identity resolution, attribution data, customer analytics, and platform management. The API is organized into modules covering the full platform functionality. Base URL: https://id.lunarmc.ai/api/

Authentication

All API endpoints require JWT Bearer token authentication. Obtain a token using the /api/get_token/ endpoint and refresh it with /api/refresh_token/.
# Get a token
curl -X POST https://id.lunarmc.ai/api/get_token/ \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "your_password"}'

# Use the token
curl https://id.lunarmc.ai/api/v1/eventsessions \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

# Refresh the token
curl -X POST https://id.lunarmc.ai/api/refresh_token/ \
  -H "Content-Type: application/json" \
  -d '{"refresh": "YOUR_REFRESH_TOKEN"}'

Public API (v1)

The v1 API provides external access for integrations and requires an API key.
MethodEndpointDescription
POST/api/v1/oauth/api_keyRequest a Mission Control API key
GET/api/v1/eventsessionsRetrieve event sessions data
GET/api/v1/sourceperformanceMedia source performance metrics
GET/api/v1/get_media_attributionMedia attribution data
GET/api/v1/get_ad_attributionAd-level attribution data
GET/api/v1/customer_360/{child_id}Customer 360 profile by ID
GET/api/v1/channel_attributionChannel attribution breakdown
GET/api/v1/get_id_graphIdentity graph data
GET/api/v1/customer_journey_detailsCustomer journey details
GET/api/v1/known_identity_detailsKnown identity details
GET/api/v1/conversion/detailsConversion details

API Modules

Customer identification and identity resolution analytics.
MethodEndpointDescription
GET/api/identity_insight/Main identity insight view
GET/api/identity_insight/customers_blockCustomer identification metrics
GET/api/identity_insight/cookies_blockCookie tracking metrics
GET/api/identity_insight/trend_blockIdentification trend data
GET/api/identity_insight/prospect_blockProspect identification data
GET/api/identity_insight/summary_dataSummary statistics
GET/api/identity_insight/visits_analyticsVisit analytics
GET/api/identity_insight/cacCustomer acquisition cost
GET/api/identity_insight/ltv_cohort_summaryLTV cohort summary
GET/api/identity_insight/ltv_data_cards_cohortLTV cohort data cards
GET/api/identity_insight/view_companies_nameCompany name lookup
Comprehensive customer profiles and analytics.
MethodEndpointDescription
GET/api/customer_360/searchSearch customers
GET/api/customer_360/user/{parent_id}Customer detail view
GET/api/customer_360/filters/Available search filters
GET/api/customer_360/analyticsCustomer analytics
GET/api/customer_360/cltv_trendCustomer lifetime value trend
GET/api/customer_360/conversion_by_mediasourceConversions by media source
GET/api/customer_360/conversion_detailsConversion details
GET/api/customer_360/products_visited_through_adsProducts visited via ads
GET/api/customer_360/loyalcustomers_listLoyal customers
GET/api/customer_360/newvisitornotconverted_listNew visitors not converted
GET/api/customer_360/knownvisitornotconverted_listKnown visitors not converted
GET/api/customer_360/customerreadytopurchase_listCustomers ready to purchase
GET/api/customer_360/ranked_page_visitsRanked page visits
GET/api/customer_360/visits_by_cityVisits by city
GET/api/customer_360/visits_by_countryVisits by country
GET/api/customer_360/visits_by_stateVisits by state
GET/api/customer_360/count_fbp_cookiesFacebook pixel cookie count
GET/api/customer_360/custom_audiences_listCustom audience segments
POST/api/customer_360/send_cookies_audienceSend cookie audience data
POST/api/customer_360/export_cookiesExport cookies for audience
GET/api/customer_360/journey-insightJourney insight data
GET/api/customer_360/media_source_overlap_reportMedia source overlap
Attribution, order credit, and channel performance analytics.
MethodEndpointDescription
GET/api/interaction_insight/channelattributionChannel attribution breakdown
GET/api/interaction_insight/order_credit_detailsOrder credit details
GET/api/interaction_insight/performance_media_credit_detailsPerformance media credits
GET/api/interaction_insight/order_ad_campaign_detailsOrder ad campaign details
GET/api/interaction_insight/conversion_by_sources_detailsConversions by source
GET/api/interaction_insight/order_count_detailsOrder count details
GET/api/interaction_insight/days_to_convDays to conversion
GET/api/interaction_insight/orders_by_sourcesOrders by media source
GET/api/interaction_insight/orders_coverage/detailsOrder coverage details
GET/api/interaction_insight/viewthroughattributionView-through attribution
GET/api/interaction_insight/page_views_visitsPage views and visits
GET/api/interaction_insight/cohort_analysisCohort analysis
GET/api/interaction_insight/conversion_trackingConversion tracking
GET/api/interaction_insight/revenue_comparisionRevenue comparison dashboard
GET/api/interaction_insight/orderdetailschanneldataOrder details by channel
GET/api/interaction_insight/orderdetailscampaigndataOrder details by campaign
GET/api/interaction_insight/orderdetailsadsdataOrder details by ad
GET/api/interaction_insight/keyword_attributiondataKeyword attribution
GET/api/interaction_insight/popular_productsMost popular products
GET/api/interaction_insight/googleadsmetricsGoogle Ads metrics
GET/api/interaction_insight/facebookadsmetricsFacebook Ads metrics
GET/api/interaction_insight/ads_insight_viewAd insight overview
GET/api/interaction_insight/revenue_adspend_dataRevenue vs ad spend
GET/api/interaction_insight/kpi_customer_dataKPI customer data
GET/api/interaction_insight/order_sorting_toolOrder sorting tool
GET/api/interaction_insight/get_media_sourcesAvailable media sources
GET/api/interaction_insight/get_coupon_codesCoupon codes
Executive summary, KPIs, and sales dashboards.
MethodEndpointDescription
GET/api/sales_performance/dashboardSales dashboard
GET/api/sales_performance/ads-dashboardAds performance dashboard
GET/api/sales_performance/ads-dashboard-graphAds dashboard charts
GET/api/sales_performance/ads-dashboard-attributesAds dashboard attributes
GET/api/sales_performance/numberofvisitorsVisitor count
GET/api/sales_performance/aovAverage order value
GET/api/sales_performance/ads_performanceAds performance data
GET/api/sales_performance/rev-adspend-dataRevenue vs ad spend
GET/api/sales_performance/kpi-dataKPI metrics
GET/api/sales_performance/ga4-dashboardGA4 dashboard
GET/api/sales_performance/ga4-analytics-dataGA4 analytics
GET/api/sales_performance/available-custom-metricsAvailable custom metrics
GET/POST/api/sales_performance/custom-cardsCustom dashboard cards
POST/api/sales_performance/custom-cards/reorderReorder custom cards
GET/api/sales_performance/default-cardsDefault card definitions
POST/api/sales_performance/save-card-configurationSave card configuration
GET/api/sales_performance/bought-togetherFrequently bought together
GET/api/sales_performance/product-journeyProduct journey analysis
GET/api/sales_performance/customer-cohortCustomer cohort analysis
GET/api/sales_performance/sales-forecastSales forecast
GET/api/sales_performance/orders-forecastOrders forecast
GET/api/sales_performance/ads-recommenderAds recommendations
Campaign and marketing analytics.
MethodEndpointDescription
GET/api/marketing_performance/dashboardMarketing dashboard
GET/api/marketing_performance/campaign-performanceCampaign performance
GET/api/marketing_performance/campaign-performance-detailsCampaign detail view
GET/api/marketing_performance/campaign-performance-matrixCampaign matrix
Ad platform channel analytics and GA4 data.
MethodEndpointDescription
GET/api/channel_performance/list_accountsList connected accounts
GET/api/channel_performance/campaignsCampaign list
GET/api/channel_performance/summary_metricsSummary metrics
GET/api/channel_performance/key_kpisKey KPIs
GET/api/channel_performance/performance_by_dayDaily performance
GET/api/channel_performance/campaign_performanceCampaign performance
GET/api/channel_performance/ga4/campaignsGA4 campaigns
GET/api/channel_performance/ga4/summary_metricsGA4 summary metrics
GET/api/channel_performance/ga4/key_kpisGA4 key KPIs
GET/api/channel_performance/ga4/top_traffic_sourcesGA4 top traffic sources
GET/api/channel_performance/ga4/top_eventsGA4 top events
GET/api/channel_performance/ga4/top_landing_pagesGA4 top landing pages
GET/api/channel_performance/ga4/traffic_source_trendsGA4 traffic source trends
High-level dashboard metrics and visitor analytics.
MethodEndpointDescription
GET/api/summary_insight/detailsSummary details
GET/api/summary_insight/drill_visitsDrill-down visit details
GET/api/summary_insight/drill_ordersDrill-down order details
GET/api/summary_insight/visitor_devicesVisitor device breakdown
GET/api/summary_insight/new_visitor_notconvertNew unconverted visitors
GET/api/summary_insight/known_visitor_notconvertKnown unconverted visitors
GET/api/summary_insight/customer_readytopurchaseCustomers ready to buy
GET/api/summary_insight/customervisitors_summaryCustomer/visitor summary
GET/api/summary_insight/loyal_customersLoyal customer list
GET/api/summary_insight/visitors_interestVisitor product interest
GET/api/summary_insight/perc_visits_locVisits by location
GET/api/summary_insight/perc_visits_hourlyVisits by hour
GET/api/summary_insight/organic_trafficOrganic traffic data
GET/api/summary_insight/curr_cpaCurrent CPA
GET/api/summary_insight/curr_roaCurrent ROA
GET/api/summary_insight/customers_life_timeCustomer lifetime metrics
GET/api/summary_insight/sessions_by_osSessions by OS
GET/api/summary_insight/sessions_by_deviceSessions by device type
GET/api/summary_insight/avg_reorder_daysAverage reorder days
Audience segmentation and targeting.
MethodEndpointDescription
GET/api/segmentation/metadataSegmentation metadata
GET/api/segmentation/formtype-metadataForm type metadata
POST/api/segmentation/createupdateCreate/update segment
GET/api/segmentation/listList segments
POST/api/segmentation/deleteDelete segment
POST/api/segmentation/parseParse segmentation data
GET/api/segmentation/detailSegment detail
POST/api/segmentation/countSegment count
GET/api/segmentation/list_audience_segmentsList audience segments
GET/api/segmentation/abandoned_cart/metricsAbandoned cart metrics
Customer segmentation funnels and analysis.
MethodEndpointDescription
GET/api/customer_insight/get_all_media_sourcesAll media sources
GET/api/customer_insight/funnelFunnel data
GET/api/customer_insight/get-customer-segmentationCustomer segmentation
GET/api/customer_insight/get-customer-segmentation-listSegmentation list
GET/api/customer_insight/get-customer-segmentation-funnel-summaryFunnel summary
OAuth connections and third-party integrations.
MethodEndpointDescription
GET/api/integration/oauth_redirect_urlGet OAuth redirect URL
GET/POST/api/integration/oauth/googleGoogle Ads OAuth
GET/POST/api/integration/oauth/facebookFacebook Ads OAuth
GET/POST/api/integration/oauth/bingBing Ads OAuth
GET/POST/api/integration/oauth/snapchatSnapchat Ads OAuth
GET/POST/api/integration/oauth/linkedinLinkedIn Ads OAuth
GET/POST/api/integration/oauth/pinterestPinterest Ads OAuth
GET/POST/api/integration/oauth/tiktokTikTok Ads OAuth
GET/POST/api/integration/oauth/redditReddit Ads OAuth
GET/POST/api/integration/oauth/shopifyShopify OAuth
GET/POST/api/integration/oauth/hubspotHubSpot OAuth
GET/POST/api/integration/oauth/salesforceSalesforce OAuth
GET/POST/api/integration/oauth/google_ga4Google Analytics 4 OAuth
GET/POST/api/integration/oauth/google_sheetsGoogle Sheets OAuth
GET/POST/api/integration/oauth/typeformTypeform OAuth
GET/POST/api/integration/integration_configIntegration configuration
GET/api/integration/source_listsSource master list
POST/api/integration/create_sourceCreate/upsert source
POST/api/integration/save_credentialsSave integration credentials
User registration, authentication, and account management.
MethodEndpointDescription
POST/api/get_token/Obtain JWT access token
POST/api/refresh_token/Refresh JWT token
POST/api/user/register/Register new client
POST/api/user/registeruser/Register new user
GET/api/user/view/details/Current user details
PUT/api/user/change/password/Change password
POST/api/user/reset_passwordRequest password reset
POST/api/user/reset_password/confirmConfirm password reset
GET/POST/api/user/systemconfSystem configuration
POST/api/user/tag_managementTag management settings
GET/api/user/get_modules_dataAvailable modules
GET/api/user/check_all_integrations_statusIntegration status check
GET/api/user/get_user_screensUser screen permissions
GET/POST/api/user/dynamic_column_configDynamic column configuration
Custom report builder and saved reports.
MethodEndpointDescription
GET/api/custom_reports/view_reportView a report
GET/api/custom_reports/user_dataUser report data
GET/api/custom_reports/sourceSource report data
GET/api/custom_reports/metricsAvailable metrics
POST/api/custom_reports/create_update_reportCreate/update report
DELETE/api/custom_reports/delete_reportDelete report
GET/api/custom_reports/dimensionAvailable dimensions
GET/POST/api/custom_reports/custom_fieldsCustom fields
GET/api/custom_reports/group_by_timeTime grouping options
Dashboard builder with charts and insights.
MethodEndpointDescription
GET/POST/api/custom_dashboards/dashboardDashboard CRUD
GET/api/custom_dashboards/chart_dataChart data
GET/api/custom_dashboards/metrics_dataMetrics data
GET/api/custom_dashboards/all_metricsAll available metrics
POST/api/custom_dashboards/create_chartsCreate charts
POST/api/custom_dashboards/publish_dashboardPublish dashboard
POST/api/custom_dashboards/generate_dashboard_insightsGenerate AI insights
POST/api/custom_dashboards/share_dashboardShare dashboard
Stripe subscription and billing management.
MethodEndpointDescription
POST/api/payments/create_subscriptionCreate subscription
GET/api/payments/plan_listAvailable plans
GET/api/payments/current_planCurrent plan
PUT/api/payments/update_subscriptionUpdate subscription
GET/api/payments/customer_payment_methodPayment method details
GET/api/payments/invoice_detailsInvoice history
POST/api/payments/setup_intentStripe setup intent
POST/api/payments/save_cardSave payment card
GET/api/payments/visitors_countVisitor count for billing
Feature flag management for clients.
MethodEndpointDescription
GET/POST/api/feature_flags/features/List/create features
GET/PUT/DELETE/api/feature_flags/features/{pk}/Feature detail/update/delete
GET/POST/api/feature_flags/List/create feature flags
GET/PUT/DELETE/api/feature_flags/{pk}/Flag detail/update/delete
Privacy compliance and data management.
MethodEndpointDescription
GET/api/privacy_insight/detailsPrivacy insight overview
GET/api/privacy_insight/data_access/customer/{customer_id}Customer data access
GET/api/privacy_insight/data_download/customer/{customer_id}Download customer data
POST/api/privacy_insight/ticket/createCreate privacy ticket
POST/api/privacy_insight/data_delete/customer/{customer_id}Delete customer data
Data anomaly detection and alerts.
MethodEndpointDescription
GET/api/monitoring/data-anomalyDaily data anomalies
GET/api/monitoring/top-bannerTop banner alerts
POST/api/monitoring/update-anomaly-tagUpdate anomaly tags
GET/api/monitoring/high-value-customersHigh value customer alerts
AI-powered analytics chatbot.
MethodEndpointDescription
POST/api/l5chatbot/chat-querySubmit a chat query
Annotation and note management.
MethodEndpointDescription
GET/api/notes/listList notes
POST/api/notes/create_noteCreate note
PUT/api/notes/update_noteUpdate note
DELETE/api/notes/deleteDelete note
GET/api/notes/get_trend_data_by_notesTrend data for notes
GET/api/notes/revision_historyNote revision history
Campaign, creative, and ad management.
MethodEndpointDescription
GET/POST/api/marketing_resources/campaigns/Campaign CRUD
GET/POST/api/marketing_resources/creatives/Creative CRUD
GET/POST/api/marketing_resources/ads/Ad CRUD
GET/api/marketing_resources/ads/reporting/Ad performance reporting
GET/api/marketing_resources/creatives/reporting/top_performing/Top performing creatives
GET/POST/api/marketing_resources/folders/Report folders
GET/POST/api/marketing_resources/reports/Saved reports
Background job management for integrations.
MethodEndpointDescription
GET/api/job-queue/status/Job queue status
POST/api/job-queue/trigger/Trigger integration job
GET/api/job-queue/details/{job_id}/Job details
POST/api/job-queue/smart_run/Smart bulk run

Webhooks

Mission Control receives webhooks from connected platforms:
PlatformEndpointDescription
Shopify/api/integration/shopify/{client_id}/customerCustomer data webhook
Shopify/api/integration/shopify/{client_id}/app_uninstallApp uninstall webhook
WooCommerce/api/integration/{client_id}/woocommerce_webhookWooCommerce events
Stripe/api/payments/stripe_subscription_createdSubscription events