Build with Glue42.
Put the agentic loop in your own stack. Query unified marketing intelligence, read confidence-scored recommendations, and execute guardrailed optimizations — over a REST API or straight from your agents via MCP.
Getting started
Introduction
The Glue42 API exposes the same engine that powers the platform: the agentic loop — observe, reason, act, learn. Everything is workspace-scoped and every action the agent takes is logged and reversible.
There are two ways to build:
- REST API — programmatic access to data, recommendations and actions for dashboards, jobs and back-end services.
- MCP server — connect Glue42 directly to Claude, Cursor, or any agent runtime so it can read your marketing data and take action in natural language.
Getting started
Quickstart
Grab a secret key from Settings → Developers, then make your first call:
curl https://api.glue42.ai/v1/query \
-H "Authorization: Bearer glue_sk_live_..." \
-H "Content-Type: application/json" \
-d '{ "question": "Which channel has the best ROAS this month?" }'Getting started
Authentication
Authenticate every request with a bearer token. Keys are workspace-scoped and prefixed: glue_sk_live_ for production, glue_sk_test_ for sandbox. Never expose a secret key in client-side code.
Authorization: Bearer glue_sk_live_8f3c...e21aScopes control access per key: read:metrics, read:recommendations, write:actions, manage:connectors.
Getting started
Core concepts
A normalized data point from a connector — impression, conversion, spend, margin.
A reasoned finding: causal, predictive or attribution, with a confidence score.
A proposed optimization with projected impact and a confidence score.
An executed change (budget, bid, creative). Logged, attributable and reversible.
/v1/queryAsk a natural-language question across all connected data. Returns a written answer, the supporting series, and a confidence score.
{
"question": "Where should I move budget to hit a 4x ROAS?",
"timeRange": "30d",
"channels": ["meta", "google_ads", "pmax"]
}{
"answer": "Shift ~$12.4K/day from Meta prospecting into PMax...",
"confidence": 0.964,
"series": [{ "channel": "pmax", "roas": 4.72 }, ...],
"recommendationId": "rec_3kf9..."
}/v1/metricsStructured performance metrics by channel and date, reconciled to revenue.
?metrics=roas,cpa,spend,revenue&channels=all&range=30d&granularity=day{
"range": "30d",
"totals": { "roas": 4.72, "cpa": 38.14, "revenue": 2840000 },
"series": [{ "date": "2026-05-01", "roas": 4.41, ... }]
}/v1/recommendationsThe agent's current ranked recommendations, each with rationale, projected impact and confidence.
{
"data": [{
"id": "rec_3kf9...",
"title": "Reallocate $12.4K/day Meta → PMax",
"rationale": "Meta prospecting is saturated at 2.1x...",
"projectedImpact": { "revenue": 214000, "window": "month" },
"confidence": 0.964,
"status": "pending"
}]
}/v1/recommendations/:id/approveApprove and execute a recommendation. Runs inside your guardrails; returns the action record. Reversible via DELETE /v1/actions/:id.
{
"actionId": "act_91bc...",
"status": "executing",
"appliedTo": ["meta", "pmax"],
"reversible": true
}/v1/connectorsList connected sources and their sync status. 42+ connectors available.
{
"data": [
{ "id": "google_ads", "name": "Google Ads", "status": "healthy", "lastSync": "2026-05-29T21:55:00Z" },
{ "id": "meta", "name": "Meta", "status": "healthy", "lastSync": "..." }
]
}REST API
Webhooks
Subscribe to events and Glue42 will POST to your endpoint. Each payload is signed with an HMAC SHA-256 signature in the Glue42-Signature header — verify it before trusting the body.
Events: recommendation.created, action.executed, anomaly.detected, connector.sync.completed.
{
"event": "anomaly.detected",
"data": { "channel": "retail_media", "metric": "cpa", "delta": "+38%" },
"createdAt": "2026-05-29T08:50:00Z"
}MCP server
Connect Glue42 to your agents
Glue42 ships a Model Context Protocol server, so any MCP-capable client — Claude Desktop, Claude Code, Cursor, or your own agent runtime — can read your marketing intelligence and take guardrailed action in natural language. This is how Glue42 connects to everything else.
MCP server
Connect
Add Glue42 to your MCP client. Use the hosted server, or run it locally:
{
"mcpServers": {
"glue42": {
"url": "https://mcp.glue42.ai",
"headers": { "Authorization": "Bearer glue_sk_live_..." }
}
}
}MCP server
Tools
The server exposes these tools to the agent:
glue42_queryNatural-language question over all connected data.glue42_metricsStructured metrics by channel, metric and date range.glue42_recommendationsList the agent's current recommendations.glue42_execute_actionApprove & execute a recommendation (guardrailed, reversible).glue42_list_connectorsList connected sources and sync status.Once connected, just ask your agent:
"Using Glue42, find my worst-performing channel this week
and, if you're >90% confident, reallocate its budget to PMax."Reference
SDKs
Official SDKs wrap auth, retries and types.
npm install @glue42/sdkReference
Errors & limits
The API uses standard HTTP status codes and returns a JSON error body. Rate limit: 120 req/min per key (burst 20); limits are returned in X-RateLimit-* headers.
{
"error": { "type": "rate_limit_exceeded", "message": "Too many requests", "retryAfter": 12 }
}This is a developer preview — the surface is stabilizing. Want early access or a key? Talk to us →