API Documentation

Base URL

https://api.causalmma.com

Authentication

All API requests require an API key sent in the header:

X-API-Key: YOUR_API_KEY

Get your API key by emailing cm-sales@infinidatum.net


Main Endpoint: Attribution Analysis

POST /api/v1/attribution

Analyze multi-touch attribution across customer touchpoints.

Request

{
  "touchpoints": [
    {
      "customer_id": "c1",
      "timestamp": "2025-01-01T10:00:00",
      "channel": "email",
      "conversion": 0
    },
    {
      "customer_id": "c1",
      "timestamp": "2025-01-01T12:00:00",
      "channel": "paid_search",
      "conversion": 1,
      "conversion_value": 100
    }
  ],
  "attribution_model": "data_driven"
}

Parameters

Field Type Required Description
touchpoints array Yes List of customer touchpoints
attribution_model string Yes Model to use (see below)

Touchpoint Object

Field Type Required Description
customer_id string Yes Unique customer identifier
timestamp string Yes ISO 8601 format
channel string Yes Marketing channel name
conversion integer Yes 1 if converted, 0 otherwise
conversion_value number No Revenue from conversion

Attribution Models

Model Description Best For
data_driven Statistical causal inference Most accurate results
shapley Game-theoretic fair credit Provably fair attribution
time_decay More recent = more credit Recency-focused campaigns
position First & last touch emphasized Awareness + conversion
linear Equal credit to all Baseline comparison
first_touch All credit to first Awareness campaigns
last_touch All credit to last Conversion focus

Response

{
  "attribution_weights": {
    "email": 0.45,
    "paid_search": 0.55
  },
  "attributed_revenue": {
    "email": 45.00,
    "paid_search": 55.00
  },
  "confidence_intervals": {
    "email": {"lower": 0.38, "upper": 0.52},
    "paid_search": {"lower": 0.48, "upper": 0.62}
  },
  "p_values": {
    "email": 0.001,
    "paid_search": 0.0001
  },
  "method_used": "doubly_robust",
  "total_revenue": 100.00
}

Advanced Causal Inference Endpoints

POST /api/v1/causal/discover-structure

Discover causal relationships between variables using the PC Algorithm.

{
  "data": [
    {"age": 25, "income": 50000, "treatment": 1, "outcome": 100},
    {"age": 30, "income": 60000, "treatment": 0, "outcome": 80}
  ],
  "variables": ["age", "income", "treatment", "outcome"],
  "algorithm": "pc",
  "significance_level": 0.05
}

POST /api/v1/causal/propensity-score

Estimate treatment effects using propensity score matching.

{
  "data": [...],
  "treatment_variable": "treatment",
  "outcome_variable": "outcome",
  "covariates": ["age", "income"],
  "caliper": 0.1
}

POST /api/v1/causal/instrumental-variables

Two-stage least squares estimation with instrumental variables.

{
  "data": [...],
  "instrument_variable": "instrument",
  "treatment_variable": "treatment",
  "outcome_variable": "outcome",
  "confounders": ["confounder"]
}

Utility Endpoints

GET /health

Check API health status.

curl https://api.causalmma.com/health

GET /docs

Interactive API documentation (Swagger UI).

View Interactive Docs →


Rate Limits

Tier Requests/Minute Monthly Requests Price
Starter 100 10,000 $149/month
Professional 500 50,000 $399/month
Business 1,000 100,000 $799/month
Enterprise Custom Unlimited Custom

All plans include a 14-day free trial. No credit card required to start.


Error Responses

All errors return a JSON response with details:

{
  "error": "Invalid API key",
  "status": 401
}

Common Error Codes

Code Meaning
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid API key
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error

Need Help?

Email: cm-support@infinidatum.net

Response time: Usually within 24 hours