API Reference
Motionworks API v2 is a Cloudflare Workers-based REST API at
api2.mworks.com/v2. It is the successor to the legacy
Intermx API and is the recommended platform for new integrations.
Base URL
https://api2.mworks.com/v2 api2.mworks.com is the canonical Motionworks API host.
Use it for all production traffic.
Authentication
Two authentication patterns are supported:
API key (X-API-Key header)
Server-to-server flow. Recommended for backend integrations. Issue a long-lived key per integration via the portal at app2.mworks.com; rotate by minting a new key and revoking the old one.
Bearer JWT (Supabase OAuth)
Portal / PLG flow. JWTs are obtained via the in-app sign-in flow at
app2.mworks.com and forwarded
as Authorization: Bearer <jwt>. JWTs expire and
rotate with the user session — they are not long-lived secrets.
Calling an authenticated endpoint with the API-key pattern:
curl https://api2.mworks.com/v2/markets \
-H "X-API-Key: $MW_API_KEY" Sandbox onboarding
Get a sandbox API key by signing up at app2.mworks.com. New accounts receive a 10 req/min sandbox-tier key automatically — no waitlist, no sales call. Verify the key with the public health endpoint:
curl https://api2.mworks.com/v2/health \
-H "X-API-Key: $MW_API_KEY" Rate limits
| Tier | Limit | Audience |
|---|---|---|
| Sandbox | 10 req/min | Trial keys, evaluation |
| Growth | 100 req/min | Production single-tenant integrations |
| Enterprise | 1,000 req/min | High-volume enterprise integrations |
Every response includes the rate-limit headers:
X-RateLimit-Limit— requests permitted in the current window.X-RateLimit-Remaining— requests remaining in the current window.Retry-After— seconds to wait before retrying, attached to429responses.
Error envelope
Every error response uses the same JSON shape. The
X-Request-Id response header always matches the
request_id field in the body — use it when filing support
tickets.
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Sandbox tier allows 10 requests per minute. Retry after 38s.",
"status": 429,
"request_id": "01HQ7K3W9V1F8X2YZ4M5N6P7QR",
"product": "platform",
"docs_url": "https://mworks.com/docs/api/#rate-limits"
}
} Stable error codes
| Code | Description |
|---|---|
INVALID_API_KEY | The X-API-Key header is missing or does not match a known key. |
EXPIRED_API_KEY | The X-API-Key header matches a known key, but the key has been revoked or expired. |
INSUFFICIENT_CREDITS | The org's credit balance is below the cost of the requested call. |
RATE_LIMIT_EXCEEDED | The org has exceeded its tier's per-minute request quota. |
NOT_FOUND | The requested resource (segment, market, place, path, etc.) does not exist. |
VALIDATION_ERROR | Request parameters or body failed schema validation. |
INTERNAL_ERROR | An unexpected error occurred. The request was logged with X-Request-Id. |
DATA_UNAVAILABLE | The endpoint and field are valid, but no data is available for the requested period or geography. |
NOT_YET_AVAILABLE | The endpoint or field is on the published roadmap; data is not yet produced. |
Code samples
Calling GET /v2/markets (defined on the platform spec)
to list available DMAs / metro markets.
curl
curl https://api2.mworks.com/v2/markets \
-H "X-API-Key: $MW_API_KEY" Python (requests)
import os
import requests
resp = requests.get(
"https://api2.mworks.com/v2/markets",
headers={"X-API-Key": os.environ["MW_API_KEY"]},
timeout=10,
)
resp.raise_for_status()
markets = resp.json()["data"]
print(f"{len(markets)} markets") JavaScript (fetch)
const resp = await fetch("https://api2.mworks.com/v2/markets", {
headers: { "X-API-Key": process.env.MW_API_KEY },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const { data: markets } = await resp.json();
console.log(`${markets.length} markets`); API reference
One Redoc-rendered reference per product, sourced from the OpenAPI 3.1 specs in api-mworks-com.
Motionworks API - Platform (Markets, Segments, Auth, Billing)
→Motionworks API - Pathcast (Paths, Viewsheds, Traffic)
→Motionworks API - Placecast (Foot Traffic)
→Motionworks API - Places Library
→Motionworks API - Popcast (Population Intelligence)
→Popcast Ambient API
→Popcast Attention API
→Popcast Change API
→Popcast Conscience API
→Popcast Reporting API
→Popcast Signal API
→Motionworks API - Redemption
→Motionworks API - Set Dynamics (Campaign Reach & Frequency)
→Motionworks API - Viewcast (Inventory Profiles)
→Download specs
OpenAPI YAMLs are available for download:
- platform.yaml — Motionworks API - Platform (Markets, Segments, Auth, Billing)
- pathcast.yaml — Motionworks API - Pathcast (Paths, Viewsheds, Traffic)
- placecast.yaml — Motionworks API - Placecast (Foot Traffic)
- places.yaml — Motionworks API - Places Library
- popcast.yaml — Motionworks API - Popcast (Population Intelligence)
- popcast-ambient.yaml — Popcast Ambient API
- popcast-attention.yaml — Popcast Attention API
- popcast-change.yaml — Popcast Change API
- popcast-conscience.yaml — Popcast Conscience API
- popcast-reporting.yaml — Popcast Reporting API
- popcast-signal.yaml — Popcast Signal API
- redemption.yaml — Motionworks API - Redemption
- set-dynamics.yaml — Motionworks API - Set Dynamics (Campaign Reach & Frequency)
- viewcast.yaml — Motionworks API - Viewcast (Inventory Profiles)
Contact
Questions or want enterprise access? Email api@mworks.com.