Graph API
Access the raw engagement correlation graph data.
Full graph dump
GET /api/v1/graph
Authorization: Bearer <token>Returns the complete graph with all nodes and edges. This endpoint supports optional authentication, unauthenticated requests receive the demo graph.
Query parameters
| Parameter | Description |
|---|---|
mode | full (default) includes all nodes. summary excludes Touchpoint nodes for lighter payloads. |
Graph query
POST /api/v1/graph/query
Authorization: Bearer <token>
Content-Type: application/json
{
"query": "MATCH (c:Customer)-[:HAS_TOUCHPOINT]->(t:Touchpoint) WHERE c.name = 'Sarah Chen' RETURN t"
}Accepts Cypher-style queries against the graph. Destructive queries (CREATE, DELETE, SET) are blocked for API key authentication, only JWT-authenticated users can write.
Example queries
-- Find all customers in a campaign
MATCH (c:Customer)-[:HAS_TOUCHPOINT]->(t:Touchpoint)-[:INFLUENCED_BY]->(camp:Campaign)
WHERE camp.name = 'Spring Email Blast'
RETURN c.name, count(t)
-- Find opportunities above a score threshold
MATCH (o:Opportunity)
WHERE o.score > 80
RETURN o
-- Get a customer's journey through stages
MATCH (c:Customer)-[:AT_STAGE]->(s:Stage)
WHERE c.email = 'sarah@example.com'
RETURN s.name, c.progress