Download OpenAPI specification:
Leadvibe API for event ingestion, scoring, segments, triggers, and organization unit (OU) workflows. Notes on scoping and security:
# HELP events_ingested_total Total number of events ingested (accepted). # TYPE events_ingested_total counter events_ingested_total 0 # HELP queue_depth Current depth of the async processing queue. # TYPE queue_depth gauge queue_depth 0 # HELP event_to_slack_latency_seconds Latency in seconds from event ingestion to Slack notification. # TYPE event_to_slack_latency_seconds histogram # HELP http_requests_total Total number of HTTP requests by status code and method. # TYPE http_requests_total counter
Returns the authenticated user's basic profile. Requires a valid JWT.
{- "org_member_id": "om_abc123",
- "first_name": "Jane",
- "last_name": "Doe",
- "email": "jane@example.com",
- "role": "admin",
- "verified": true
}Requires authentication and an active OU selected via POST /org-units/active. The server derives org_id and unit_id from the authenticated context; clients must not send unit_id.
Identify the target lead with EITHER:
lead_id, ORaliases array (preferred). Each entry supplies alias_kind and raw_value.Backward compatibility: top‑level alias_kind and alias are accepted on ingest but are deprecated and not returned by read endpoints.
| lead_id | string Existing lead identifier; optional when aliases are provided |
| alias_kind | string Enum: "email" "phone" "external_id" "cookie" "social" Deprecated. Use |
| alias | string Deprecated. Use |
Array of objects Preferred. One or more aliases to identify or create a lead. | |
| event_type required | string |
| timestamp | string <date-time> |
object Arbitrary JSON metadata. Max 100KB; larger payloads are rejected with 413. For DECAY events, the server sets metadata.channel to 'system'. |
{- "lead_id": "ld_123",
- "event_type": "page_view",
- "timestamp": "2025-08-15T12:00:00Z",
- "metadata": {
- "path": "/pricing",
- "utm_source": "newsletter"
}
}{- "message": "event ingested",
- "metadata": {
- "geo_country": "US",
- "geo_region": "California",
- "geo_city": "San Francisco",
- "user_agent": "Mozilla/5.0"
}
}Accepts a CSV upload. The server enqueues each row as an EngagementEvent under the authenticated org and active OU. Required columns: event_type. Optional: lead_id, timestamp (RFC3339), metadata (JSON), alias columns (external_id,email,phone,cookie,social).
| file | string <binary> CSV file with header row |
{- "message": "string"
}Returns events limited to the active Organization Unit (OU).
| page | integer >= 1 Default: 1 |
| limit | integer [ 1 .. 500 ] Default: 50 |
| metadata | Array of strings Repeatable metadata key/value filters (e.g., metadata=utm_campaign:fall2025) |
| logic | string Default: "and" Enum: "and" "or" Combine metadata filters with AND (default) or OR |
[- {
- "id": "ev_001",
- "org_id": "org_1",
- "unit_id": "unit_default",
- "lead_id": "ld_123",
- "event_type": "page_view",
- "timestamp": "2025-08-15T12:00:00Z",
- "metadata": {
- "path": "/pricing"
}
}
]| leadID required | string |
[- {
- "id": "ev_002",
- "org_id": "org_1",
- "unit_id": "unit_default",
- "lead_id": "ld_123",
- "event_type": "signup",
- "timestamp": "2025-08-15T12:05:00Z"
}
]Returns per-ruleset score deltas and before/after totals for a single event.
| eventID required | string |
{- "event_id": "string",
- "lead_id": "string",
- "event_type": "string",
- "occurred_at": "2019-08-24T14:15:22Z",
- "rulesets": [
- {
- "ruleset_id": "string",
- "ruleset_name": "string",
- "is_primary": true,
- "score_delta": 0,
- "score_before": 0,
- "score_after": 0,
- "rule_weight": 0
}
]
}Returns a composite view of lead activity: filtered engagement events, orders, and a unified timeline.
Unified Activity Stream (ADR-0010):
engagement_events tableorders table (represented as synthetic activity projections)OU Scoping: Only returns data for the caller's active Organizational Unit.
Synthetic Order Projections:
orders array and timeline with type: "order"engagement_events tableFiltering behavior:
range, start, end: Apply to both events and orderschannel, minScore, maxLatency, hasDelta: Apply to events only| leadID required | string Lead UUID |
| range | string Default: "last_7d" Enum: "all" "last_7d" "last_24h" "last_30d" "last_90d" "today" "yesterday" "custom" Time range filter (applies to both events and orders) |
| start | string <date-time> Start timestamp (RFC3339, UTC). Required when range=custom |
| end | string <date-time> End timestamp (RFC3339, UTC). Required when range=custom |
| channel | string Enum: "all" "web" "email" "slack" "webinar" "crm" "system" Channel filter (applies to events only) |
| minScore | integer >= 0 Minimum score filter (applies to events only) |
| maxLatency | integer >= 1 Maximum latency in ms (applies to events only) |
| hasDelta | string Enum: "1" "true" "0" "false" Show only events with score deltas (applies to events only) |
{- "events": [
- {
- "id": "evt-123",
- "event_type": "page_view",
- "timestamp": "2025-11-15T09:00:00Z",
- "metadata": {
- "url": "/products/widget"
}, - "source": "web"
}
], - "orders": [
- {
- "id": "order-456",
- "type": "order",
- "timestamp": "2025-11-15T09:10:00Z",
- "order_id": "456",
- "total_amount": 129.99,
- "status": "completed",
- "items_summary": "2 items"
}
], - "timeline": [
- {
- "id": "evt-123",
- "ts": "2025-11-15T09:00:00Z",
- "title": "page_view",
- "type": "event",
- "subtext": "/products/widget",
- "jumpTo": "evt-123",
- "dotColor": "brand",
- "channel": "web"
}, - {
- "id": "order-456",
- "ts": "2025-11-15T09:10:00Z",
- "title": "Order Placed",
- "type": "order",
- "subtext": "$129.99 • 2 items • completed",
- "jumpTo": "order-456",
- "dotColor": "green",
- "channel": "order"
}
]
}Returns scores for the provided lead_ids under the active OU. If ruleset is omitted or set to primary,
the primary engagement ruleset is used. If no primary exists, all scores are returned as 0.
| lead_ids required | Array of strings [ 1 .. 500 ] items |
| ruleset | string primary (default) or a specific ruleset_id/name |
{- "lead_ids": [
- "string"
], - "ruleset": "string"
}[- {
- "lead_id": "ld_001",
- "ruleset_id": "rs_abc",
- "ruleset_name": "Primary Engagement",
- "score": 32
}, - {
- "lead_id": "ld_002",
- "ruleset_id": "rs_abc",
- "ruleset_name": "Primary Engagement",
- "score": 18
}
]Reads a lead's score within the active OU. If ruleset_id is omitted, returns the highest score across all active rulesets for the active OU.
| leadID required | string |
{- "lead_id": "ld_123",
- "score": 87
}Returns lead scores for the active Organizational Unit (OU).
When page or limit is provided, the response includes pagination metadata (total, page, limit).
Notes:
| page | integer >= 1 Default: 1 |
| limit | integer [ 1 .. 500 ] Default: 50 |
| range | string Enum: "all" "today" "yesterday" "last_24h" "last_7d" "last_30d" "last_90d" Filter leads by created_at using a named range (e.g., last_7d). Also used for session counts. |
| min_score | integer Minimum total score. |
| max_score | integer Maximum total score. |
| event_type | string Filter by last event type per lead. |
| last_active | string Enum: "any" "7d" "30d" Filter by last activity recency (e.g., 7d or 30d). |
{- "leads": [
- {
- "lead_id": "ld_001",
- "score": 32
}, - {
- "lead_id": "ld_002",
- "score": 28
}
], - "total": 2,
- "page": 1,
- "limit": 25
}| id required | string |
object | |
| account_id | string or null |
{- "id": "string",
- "metadata": { },
- "account_id": "string"
}{- "id": "string",
- "org_id": "string",
- "unit_id": "string",
- "account_id": "string",
- "owner_id": "string",
- "owner_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "merged_into": "string",
- "metadata": { }
}Returns up to 10 leads matching a search query. Matches by lead ID prefix or alias value (email, phone, etc.). Used for autocomplete in the UI.
| q required | string >= 2 characters Search query (minimum 2 characters) |
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "match_type": "id",
- "best_alias": "string",
- "engagement_level": "string",
- "profile_level": "string"
}
]| leadID required | string |
{- "lead": {
- "id": "string",
- "org_id": "string",
- "unit_id": "string",
- "account_id": "string",
- "owner_id": "string",
- "owner_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "merged_into": "string",
- "metadata": { }
}, - "account": { }
}| leadID required | string |
{- "lead": {
- "id": "string",
- "org_id": "string",
- "unit_id": "string",
- "account_id": "string",
- "owner_id": "string",
- "owner_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "merged_into": "string",
- "metadata": { }
}, - "account": { }
}| leadID required | string |
object | |
| account_id | string or null |
{- "metadata": { },
- "account_id": "string"
}| id required | string |
object | |
| account_id | string or null |
{- "id": "string",
- "metadata": { },
- "account_id": "string"
}{- "id": "string",
- "org_id": "string",
- "unit_id": "string",
- "account_id": "string",
- "owner_id": "string",
- "owner_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "merged_into": "string",
- "metadata": { }
}| leadID required | string |
| property name* additional property | any |
{- "industry": "SaaS",
- "plan": "Pro"
}{- "id": "ld_123",
- "org_id": "org_1",
- "unit_id": "unit_default",
- "metadata": {
- "industry": "SaaS",
- "plan": "Pro"
}
}Consolidate multiple source leads into a target lead within the active OU. Moves events and aliases, marks sources as merged, and recomputes the target's lead scores. Cross-OU merges are not allowed. Default truncation policy is 'none'.
| targetLeadId required | string |
| sourceLeadIds required | Array of strings |
object |
{- "targetLeadId": "string",
- "sourceLeadIds": [
- "string"
], - "truncate": {
- "strategy": "none",
- "windowMinutes": 1,
- "keepTypes": [
- "string"
]
}
}{- "target": {
- "id": "string",
- "org_id": "string",
- "unit_id": "string",
- "account_id": "string",
- "owner_id": "string",
- "owner_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "merged_into": "string",
- "metadata": { }
}, - "mergedSources": [
- "string"
], - "movedEvents": 0,
- "truncatedEvents": 0,
- "rescore": {
- "mode": "inline",
- "taskId": "string"
}
}Returns top drivers, a rule weights snapshot, and surge boost contributions for the specified lead. OU scoped; time window defaults to last 24 hours.
| leadID required | string |
| hours | integer >= 1 Default: 24 |
{- "top_drivers": [
- {
- "event_type": "string",
- "total": 0
}
], - "snapshot": [
- {
- "event_type": "string",
- "weight": 0
}
], - "surge_boost": [
- {
- "base_event_type": "string",
- "total": 0,
- "events": 0,
- "avg_multiplier": 0
}
], - "surge_total": 0,
- "surge_event_count": 0,
- "decay_applied": 0,
- "range_hours": 0
}| id required | string |
[- {
- "rule_id": "string",
- "ruleset_id": "string",
- "org_id": "string",
- "unit_id": "string",
- "event_type": "string",
- "weight": 0,
- "icon": "string",
- "active": true,
- "start_at": "2019-08-24T14:15:22Z",
- "end_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "created_by": "string",
- "updated_by": "string"
}
]| rule_id | string |
| ruleset_id | string |
| org_id | string |
| unit_id | string |
| event_type | string |
| weight | integer |
| icon | string |
| active | boolean |
| start_at | string <date-time> |
| end_at | string <date-time> |
| created_at | string <date-time> |
| updated_at | string <date-time> |
| created_by | string |
| updated_by | string |
{- "event_type": "email_open",
- "weight": 5,
- "active": true
}{- "rule_id": "rl_2",
- "ruleset_id": "rs_default",
- "event_type": "email_open",
- "weight": 5,
- "active": true
}| id required | string |
| rule_id | string |
| ruleset_id | string |
| org_id | string |
| unit_id | string |
| event_type | string |
| weight | integer |
| icon | string |
| active | boolean |
| start_at | string <date-time> |
| end_at | string <date-time> |
| created_at | string <date-time> |
| updated_at | string <date-time> |
| created_by | string |
| updated_by | string |
{- "rule_id": "string",
- "ruleset_id": "string",
- "org_id": "string",
- "unit_id": "string",
- "event_type": "string",
- "weight": 0,
- "icon": "string",
- "active": true,
- "start_at": "2019-08-24T14:15:22Z",
- "end_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "created_by": "string",
- "updated_by": "string"
}Phase 2 Feature: Surge trigger functionality is temporarily paused for MVP. Endpoints exist but may return empty results. Surge multipliers (session-based scoring) remain fully functional via /settings/ou/surge-policy.
[- {
- "trigger_id": "string",
- "event_type": "string",
- "window_seconds": 1,
- "window_unit": "seconds",
- "threshold_count": 1,
- "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]Phase 2 Feature: Surge trigger functionality is temporarily paused for MVP.
| event_type | string |
| window_seconds required | integer >= 1 |
| window_unit | string Default: "seconds" Enum: "seconds" "minutes" "hours" "days" |
| threshold_count required | integer >= 1 |
| webhook_url required | string Exactly one destination: provide webhook_url OR emails |
| emails | Array of strings <email> [ items <email > ] |
{- "event_type": "string",
- "window_seconds": 1,
- "window_unit": "seconds",
- "threshold_count": 1,
- "webhook_url": "string",
- "emails": [
- "user@example.com"
]
}{- "trigger_id": "string",
- "event_type": "string",
- "window_seconds": 1,
- "window_unit": "seconds",
- "threshold_count": 1,
- "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Phase 2 Feature: Surge trigger functionality is temporarily paused for MVP.
| id required | string |
| event_type | string |
| window_seconds required | integer >= 1 |
| window_unit | string Default: "seconds" Enum: "seconds" "minutes" "hours" "days" |
| threshold_count required | integer >= 1 |
| webhook_url required | string Exactly one destination: provide webhook_url OR emails |
| emails | Array of strings <email> [ items <email > ] |
{- "event_type": "string",
- "window_seconds": 1,
- "window_unit": "seconds",
- "threshold_count": 1,
- "webhook_url": "string",
- "emails": [
- "user@example.com"
]
}Phase 2 Feature: Surge trigger functionality is temporarily paused for MVP. This endpoint may return empty results while surge detection is disabled.
| page | integer >= 1 Default: 1 |
| limit | integer [ 1 .. 500 ] Default: 50 |
| start | string <date-time> Start timestamp (RFC3339). |
| end | string <date-time> End timestamp (RFC3339). |
| channel | string Filter by surge channel (snapshot channel/source). |
[ ]| name | string |
| score_column | string Default: "total_score" |
| is_primary | boolean Default: false |
{- "name": "Marketing",
- "score_column": "total_score"
}{- "ruleset_id": "rs_marketing",
- "name": "Marketing",
- "score_column": "total_score"
}| source_field required | string |
| profile_property required | string |
{- "source_field": "utm_source",
- "profile_property": "acquisition_source"
}{- "id": "pm_2",
- "source_field": "utm_source",
- "profile_property": "acquisition_source"
}| id required | string |
| source_field required | string |
| profile_property required | string |
{- "source_field": "string",
- "profile_property": "string"
}| name required | string |
| enabled | boolean |
| is_primary | boolean Default: false |
{- "name": "string",
- "enabled": true,
- "is_primary": false
}{- "id": "string",
- "org_id": "string",
- "name": "string",
- "enabled": true,
- "is_primary": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}| id required | string |
| name required | string |
| enabled | boolean |
| is_primary | boolean Default: false |
{- "name": "string",
- "enabled": true,
- "is_primary": false
}| id required | string |
[- {
- "id": "string",
- "ruleset_id": "string",
- "profile_property": "string",
- "condition": "string",
- "comparison_value": "string",
- "weight": 0,
- "ui_order": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]| id required | string |
| profile_property required | string |
| condition required | string |
| comparison_value required | string |
| weight required | integer |
| ui_order | integer |
{- "profile_property": "string",
- "condition": "string",
- "comparison_value": "string",
- "weight": 0,
- "ui_order": 0
}{- "id": "string",
- "ruleset_id": "string",
- "profile_property": "string",
- "condition": "string",
- "comparison_value": "string",
- "weight": 0,
- "ui_order": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}| id required | string |
| ruleId required | string |
| profile_property | string |
| condition | string |
| comparison_value | string |
| weight | integer |
| ui_order | integer |
{- "profile_property": "string",
- "condition": "string",
- "comparison_value": "string",
- "weight": 0,
- "ui_order": 0
}| name required | string |
| description | string |
| active | boolean |
{- "name": "string",
- "description": "string",
- "active": true
}{- "segment_id": "sg_marketing",
- "name": "Marketing Leads",
- "description": "Leads from marketing sources",
- "active": true
}| id required | string |
| name required | string |
| description | string |
| active | boolean |
{- "name": "string",
- "description": "string",
- "active": true
}| id required | string |
| page | integer >= 1 Default: 1 |
| limit | integer [ 1 .. 500 ] Default: 50 |
[- {
- "org_id": "string",
- "lead_id": "string",
- "ruleset_id": "string",
- "score": 0,
- "last_event_at": "2019-08-24T14:15:22Z",
- "profile_scores": {
- "property1": 0,
- "property2": 0
}, - "ruleset_names": {
- "property1": "string",
- "property2": "string"
}, - "profile_primary_ruleset_name": "string",
- "engagement_scores": {
- "property1": 0,
- "property2": 0
}, - "engagement_primary_ruleset_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "owner_name": "string",
- "account_id": "string",
- "engagement_level": "string",
- "profile_level": "string",
- "account_level": "string",
- "best_alias": "string"
}
]| id required | string |
[- {
- "rule_id": "string",
- "segment_id": "string",
- "org_id": "string",
- "rule_name": "string",
- "rule_type": "lead_metadata",
- "field_name": "string",
- "operator": "string",
- "value": "string",
- "event_type": "string",
- "logic_group": 0,
- "logic_op": "AND",
- "order_index": 0,
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "created_by": "string",
- "updated_by": "string"
}
]| id required | string |
| rule_name | string |
| rule_type required | string Enum: "lead_metadata" "event_metadata" |
| field_name required | string |
| operator required | string |
| value | string |
| event_type | string |
| logic_group | integer |
| logic_op | string Enum: "AND" "OR" |
| order_index | integer |
| active | boolean |
{- "rule_name": "string",
- "rule_type": "lead_metadata",
- "field_name": "string",
- "operator": "string",
- "value": "string",
- "event_type": "string",
- "logic_group": 0,
- "logic_op": "AND",
- "order_index": 0,
- "active": true
}{- "rule_id": "string",
- "segment_id": "string",
- "org_id": "string",
- "rule_name": "string",
- "rule_type": "lead_metadata",
- "field_name": "string",
- "operator": "string",
- "value": "string",
- "event_type": "string",
- "logic_group": 0,
- "logic_op": "AND",
- "order_index": 0,
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "created_by": "string",
- "updated_by": "string"
}| id required | string |
| ruleId required | string |
| rule_name | string |
| rule_type | string Enum: "lead_metadata" "event_metadata" |
| field_name | string |
| operator | string |
| value | string |
| event_type | string |
| logic_group | integer |
| logic_op | string Enum: "AND" "OR" |
| order_index | integer |
| active | boolean |
{- "rule_name": "string",
- "rule_type": "lead_metadata",
- "field_name": "string",
- "operator": "string",
- "value": "string",
- "event_type": "string",
- "logic_group": 0,
- "logic_op": "AND",
- "order_index": 0,
- "active": true
}| inactive_for required | integer Duration amount |
| unit required | string Enum: "days" "hours" "weeks" |
| decrease required | integer Score decrease amount |
{- "inactive_for": 0,
- "unit": "days",
- "decrease": 0
}{- "decay_id": "dc_inactive30d",
- "inactive_for": 30,
- "unit": "days",
- "decrease": 25
}| id required | string |
| inactive_for | integer |
| unit | string Enum: "days" "hours" "weeks" |
| decrease | integer |
{- "inactive_for": 0,
- "unit": "days",
- "decrease": 0
}Lists configured inorganic activity filters used to flag bot-like activity in the active OU.
[- {
- "filter_id": "string",
- "event_type": "string",
- "count_threshold": 0,
- "time_window_ms": 0,
- "group_events": true,
- "org_id": "string",
- "created_by": "string",
- "updated_by": "string"
}
]| event_type required | string |
| count_threshold required | integer |
| time_window_ms required | integer |
| group_events | boolean |
{- "event_type": "string",
- "count_threshold": 0,
- "time_window_ms": 0,
- "group_events": true
}{- "filter_id": "string",
- "event_type": "string",
- "count_threshold": 0,
- "time_window_ms": 0,
- "group_events": true,
- "org_id": "string",
- "created_by": "string",
- "updated_by": "string"
}| id required | string |
| event_type | string |
| count_threshold | integer |
| time_window_ms | integer |
| group_events | boolean |
{- "event_type": "string",
- "count_threshold": 0,
- "time_window_ms": 0,
- "group_events": true
}Lists pattern triggers (including frequency counts) for the active OU.
[- {
- "trigger_id": "string",
- "name": "string",
- "description": "string",
- "active": true,
- "window_seconds": 0,
- "conditions": [
- {
- "type": "count",
- "event_type": "string",
- "count": 0,
- "operator": "gte"
}
], - "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]| trigger_id | string |
| name | string |
| description | string |
| active | boolean |
| window_seconds | integer |
Array of objects | |
| webhook_url | string |
| emails | Array of strings <email> [ items <email > ] |
| created_at | string <date-time> |
| updated_at | string <date-time> |
{- "trigger_id": "string",
- "name": "string",
- "description": "string",
- "active": true,
- "window_seconds": 0,
- "conditions": [
- {
- "type": "count",
- "event_type": "string",
- "count": 0,
- "operator": "gte"
}
], - "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}{- "trigger_id": "string",
- "name": "string",
- "description": "string",
- "active": true,
- "window_seconds": 0,
- "conditions": [
- {
- "type": "count",
- "event_type": "string",
- "count": 0,
- "operator": "gte"
}
], - "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}| id required | string |
| trigger_id | string |
| name | string |
| description | string |
| active | boolean |
| window_seconds | integer |
Array of objects | |
| webhook_url | string |
| emails | Array of strings <email> [ items <email > ] |
| created_at | string <date-time> |
| updated_at | string <date-time> |
{- "trigger_id": "string",
- "name": "string",
- "description": "string",
- "active": true,
- "window_seconds": 0,
- "conditions": [
- {
- "type": "count",
- "event_type": "string",
- "count": 0,
- "operator": "gte"
}
], - "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Lists milestone triggers configured for the active OU.
[- {
- "trigger_id": "string",
- "org_id": "string",
- "event_type": "string",
- "score_threshold": 0,
- "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "email_subject": "string",
- "email_preheader": "string",
- "email_message": "string",
- "name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "created_by": "string",
- "updated_by": "string"
}
]| event_type required | string |
| score_threshold required | integer |
| webhook_url | string |
| emails | Array of strings <email> [ items <email > ] |
| email_subject | string |
| email_preheader | string |
| email_message | string |
{- "event_type": "string",
- "score_threshold": 0,
- "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "email_subject": "string",
- "email_preheader": "string",
- "email_message": "string"
}{- "trigger_id": "string",
- "org_id": "string",
- "event_type": "string",
- "score_threshold": 0,
- "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "email_subject": "string",
- "email_preheader": "string",
- "email_message": "string",
- "name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "created_by": "string",
- "updated_by": "string"
}| id required | string |
| event_type | string |
| score_threshold | integer |
| webhook_url | string |
| emails | Array of strings <email> [ items <email > ] |
| email_subject | string |
| email_preheader | string |
| email_message | string |
{- "event_type": "string",
- "score_threshold": 0,
- "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "email_subject": "string",
- "email_preheader": "string",
- "email_message": "string"
}Test a milestone trigger against a specific lead or scan historical data. Returns whether the trigger would fire and which leads match.
| id required | string |
| lead_id | string Specific lead to test (optional) |
| days | integer Default: 30 Days to look back |
{- "lead_id": "string",
- "days": 30
}{- "would_fire": true,
- "matched_leads": [
- "string"
], - "total_matches": 0,
- "message": "string"
}Lists time- or order-based sequence triggers for the active OU.
[- {
- "trigger_id": "string",
- "org_id": "string",
- "unit_id": "string",
- "name": "string",
- "event_steps": [
- {
- "event_type": "string",
- "attribute_filters": [
- {
- "field": "string",
- "operator": "equals",
- "value": "string"
}
]
}
], - "window_seconds": 0,
- "window_unit": "seconds",
- "ordered": true,
- "fire_mode": "once",
- "profile_filters": [
- {
- "field": "engagement_level",
- "operator": "eq",
- "value": "string"
}
], - "lead_attribute_filters": [
- {
- "field": "string",
- "operator": "equals",
- "value": "string"
}
], - "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "email_subject": "string",
- "email_preheader": "string",
- "email_message": "string",
- "slack_target_kind": "channel",
- "slack_target_id": "string",
- "teams_target_kind": "channel",
- "teams_target_id": "string",
- "hubspot_sync": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "created_by": "string",
- "updated_by": "string"
}
]| event_types required | Array of strings |
| window_seconds required | integer |
| window_unit required | string Enum: "seconds" "minutes" "hours" |
| ordered | boolean |
| webhook_url required | string |
| emails | Array of strings <email> [ items <email > ] |
| email_subject | string |
| email_preheader | string |
| email_message | string |
{- "event_types": [
- "string"
], - "window_seconds": 0,
- "window_unit": "seconds",
- "ordered": true,
- "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "email_subject": "string",
- "email_preheader": "string",
- "email_message": "string"
}{- "trigger_id": "string",
- "org_id": "string",
- "unit_id": "string",
- "name": "string",
- "event_steps": [
- {
- "event_type": "string",
- "attribute_filters": [
- {
- "field": "string",
- "operator": "equals",
- "value": "string"
}
]
}
], - "window_seconds": 0,
- "window_unit": "seconds",
- "ordered": true,
- "fire_mode": "once",
- "profile_filters": [
- {
- "field": "engagement_level",
- "operator": "eq",
- "value": "string"
}
], - "lead_attribute_filters": [
- {
- "field": "string",
- "operator": "equals",
- "value": "string"
}
], - "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "email_subject": "string",
- "email_preheader": "string",
- "email_message": "string",
- "slack_target_kind": "channel",
- "slack_target_id": "string",
- "teams_target_kind": "channel",
- "teams_target_id": "string",
- "hubspot_sync": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "created_by": "string",
- "updated_by": "string"
}| id required | string |
| event_types | Array of strings |
| window_seconds | integer |
| window_unit | string Enum: "seconds" "minutes" "hours" |
| ordered | boolean |
| webhook_url | string |
| emails | Array of strings <email> [ items <email > ] |
| email_subject | string |
| email_preheader | string |
| email_message | string |
{- "event_types": [
- "string"
], - "window_seconds": 0,
- "window_unit": "seconds",
- "ordered": true,
- "webhook_url": "string",
- "emails": [
- "user@example.com"
], - "email_subject": "string",
- "email_preheader": "string",
- "email_message": "string"
}Test a sequence trigger against a specific lead or scan historical data. Returns whether the trigger would fire and which leads match.
| id required | string |
| lead_id | string Specific lead to test (optional) |
| days | integer Default: 30 Days to look back |
{- "lead_id": "string",
- "days": 30
}{- "would_fire": true,
- "matched_leads": [
- "string"
], - "total_matches": 0,
- "message": "string"
}| id required | string |
| name required | string |
{- "name": "string"
}{- "unit_id": "string",
- "name": "string",
- "slug": "string"
}Validates membership and sets the activeOu cookie. Returns OU headers for convenience.
| ouId required | string The unit_id to activate for the current session |
{- "ouId": "string"
}Lists members of the current organization. Results are organization-scoped.
[- {
- "org_member_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com",
- "role": "string"
}
]| first_name required | string |
| last_name required | string |
| email required | string <email> |
| password required | string <password> |
| role required | string |
{- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com",
- "password": "pa$$word",
- "role": "string"
}{- "org_member_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com",
- "role": "string"
}| id required | string |
| first_name | string |
| last_name | string |
string <email> | |
| role | string |
{- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com",
- "role": "string"
}Lists members assigned to the specified OU with OU-scoped roles. Requires caller to be a member of that OU.
| id required | string OU ID (unit_id) |
[- {
- "org_member_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com",
- "role": "Owner"
}
]Assigns a member to the specified OU with a role. Idempotent. Requires OU role Owner or Operator.
| id required | string OU ID (unit_id) |
| org_member_id required | string |
| role | string Default: "Viewer" Enum: "Owner" "Operator" "Viewer" |
{- "org_member_id": "string",
- "role": "Owner"
}| id required | string |
| memberId required | string |
| role required | string Enum: "Owner" "Operator" "Viewer" |
{- "role": "Owner"
}Returns whether rate limiting is enabled, the mode, keying policy, computed key for this caller, and numeric limits.
{- "enabled": true,
- "mode": "observe",
- "key_by": "org",
- "key": "string",
- "rps": 0,
- "burst": 0,
- "stage": "string"
}| name required | string <= 50 characters Human-friendly label for this credential (1–50 chars) |
{- "name": "string"
}{- "secret_id": "string",
- "client_id": "string",
- "client_secret": "string",
- "name": "string",
- "created_at": "2019-08-24T14:15:22Z"
}SSE stream of score updates, surge events, and newly ingested events.
OU scoping:
ouId as a query param to receive only events for that OU.activeOu cookie.Note: This endpoint is currently unauthenticated.
| ouId | string Organization Unit (OU) ID to scope the stream. |
event: score_update data: {"lead_id":"ld_123","delta":5}
Returns aggregated surge metrics for the specified organization unit within a time range. Requires authentication and an active organization; OU membership is enforced.
| ouId required | string Organization Unit ID to scope the results. |
| start required | string <date-time> Start of the time range (RFC3339). |
| end required | string <date-time> End of the time range (RFC3339). |
| interval | string Enum: "15m" "1h" "1d" Aggregation interval. Defaults to |
| channel | string Optional channel filter (e.g., 'web', 'email', 'slack'). |
{- "ou_id": "string",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "interval": "15m",
- "totals": {
- "surges": 0,
- "unique_leads": 0
}, - "peak": {
- "ts": "2019-08-24T14:15:22Z",
- "count": 0
}, - "channels": [
- {
- "channel": "string",
- "count": 0
}
], - "series": [
- {
- "ts": "2019-08-24T14:15:22Z",
- "total": 0,
- "by_channel": {
- "property1": 0,
- "property2": 0
}
}
]
}Runs account/profile mapping and recalculates profile scores for all leads in the active OU.
{- "leads_processed": 0,
- "accounts_linked": 0,
- "accounts_created": 0,
- "profile_scores_updated": 0
}Adds or corrects the accountId in event metadata by joining each event's lead to its associated account within the active OU. No-op for events that already have accountId.
{- "events_scanned": 0,
- "events_updated": 0,
- "leads_without_account": 0
}Reads all leads in the active OU and applies the currently configured profile field mappings to populate lead metadata. Respects each mapping's update behavior setting.
{- "leads_processed": 0,
- "leads_updated": 0
}Returns recent audit log entries for the active OU with optional filters and sorting.
| limit | integer [ 1 .. 500 ] Max rows to return (default 100; max 500) |
| offset | integer >= 0 Number of rows to skip (for pagination) |
| search | string Search across user_email, path, and IP address |
| method | string Enum: "GET" "POST" "PUT" "PATCH" "DELETE" Filter by HTTP method |
| status_min | integer Minimum status code (inclusive) |
| status_max | integer Maximum status code (inclusive) |
| user_email | string Filter by exact user email |
| sort_by | string Default: "created_at" Enum: "created_at" "user_email" "method" "path" "status" "ip" "latency_ms" Column to sort by |
| sort_order | string Default: "DESC" Enum: "ASC" "DESC" Sort order (ascending or descending) |
{- "items": [
- {
- "id": "string",
- "org_id": "string",
- "unit_id": "string",
- "user_sub": "string",
- "user_email": "string",
- "method": "string",
- "path": "string",
- "status": 0,
- "ip": "string",
- "user_agent": "string",
- "latency_ms": 0,
- "request_id": "string",
- "created_at": "2019-08-24T14:15:22Z"
}
], - "limit": 0,
- "offset": 0
}Sets the Slack app client ID and client secret for the current organization.
| client_id required | string |
| client_secret required | string |
{- "client_id": "string",
- "client_secret": "string"
}Returns organization event types with hidden flag and per-OU event counts.
[- {
- "name": "string",
- "hidden": true,
- "max_processing_scope": "observe",
- "ou_event_count": 0,
- "protected": true,
- "deletable": true
}
]| eventType required | string |
| hidden | boolean |
| max_processing_scope | string Enum: "observe" "decide" "activate" Ceiling for event processing in this OU; does not imply execution. |
{- "hidden": true,
- "max_processing_scope": "observe"
}Returns whether the active OU is connected to a Slack workspace and basic metadata.
{- "connected": true,
- "team_name": "string",
- "team_id": "string",
- "bot_user_id": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "default_target_kind": "channel",
- "default_target_id": "string",
- "authorize_url": "string"
}Proxies Slack conversations.list and returns the upstream response. Requires the OU to be connected to Slack.
| types | string Example: types=public_channel,private_channel |
{- "ok": true,
- "channels": [
- {
- "id": "string",
- "name": "string",
- "is_private": true
}
], - "response_metadata": {
- "next_cursor": "string"
}
}Proxies Slack users.list and returns the upstream response. Requires the OU to be connected to Slack.
{- "ok": true,
- "members": [
- {
- "id": "string",
- "name": "string"
}
], - "response_metadata": {
- "next_cursor": "string"
}
}Persists the default Slack target (channel or user) for notifications.
| kind required | string Enum: "channel" "user" |
| id required | string |
{- "kind": "channel",
- "id": "string"
}Sends a simple test message to the provided channel or user for the active OU. If kind=user, opens a DM first.
| kind required | string Enum: "channel" "user" |
| id required | string |
| text | string Optional custom message |
{- "kind": "channel",
- "id": "string",
- "text": "string"
}{- "message": "string"
}Returns the OU-scoped session-based surge multiplier policy for the active OU. If none exists, returns Standard defaults.
{- "org_id": "string",
- "unit_id": "string",
- "mode": "off",
- "bands": [
- {
- "start_min": 0,
- "end_min": 1,
- "multiplier": 1
}
], - "idle_reset_seconds": 1,
- "multiplier_cap": 1
}Creates or updates the session-based surge multiplier policy for the active OU.
| mode | string Enum: "off" "standard" "gentle" "custom" |
Array of objects | |
| idle_reset_seconds | integer >= 1 |
| multiplier_cap | number [ 1 .. 3 ] |
{- "mode": "off",
- "bands": [
- {
- "start_min": 0,
- "end_min": 1,
- "multiplier": 1
}
], - "idle_reset_seconds": 1,
- "multiplier_cap": 1
}Phase 2 Feature (ABM Required)
Account-based marketing endpoints require abm_enabled: true in organization scoring settings.
These endpoints return 403 Forbidden if ABM is not enabled for your organization.
Contact your account manager for access.
Returns a list of accounts for the active OU by aggregating leads joined with accounts and lead scores. Fields include top_score (max lead score within the account), leads_count, owner_name (from the top-scoring lead), and surging (true if any lead in the account surged in the last 24 hours).
| page | integer >= 1 Default: 1 |
| limit | integer [ 1 .. 500 ] Default: 50 |
| range | string Enum: "all" "today" "yesterday" "last_24h" "last_7d" "last_30d" "last_90d" Filter accounts by created_at using a named range. |
| search | string Search by account name or domain. |
| intent_level | string Enum: "all" "low" "medium" "high" Filter by intent level. |
{- "accounts": [
- {
- "account_id": "acc_123",
- "org_id": "org_1",
- "domain": "example.com",
- "name": "Example Inc",
- "created_at": "2024-01-01T00:00:00Z",
- "account_level": "High",
- "top_score": 612,
- "leads_count": 4,
- "owner_name": "Alex Rivera",
- "surging": true
}
], - "total": 1,
- "page": 1,
- "limit": 25
}Unlinks leads in the active OU from the given accounts and deletes account records that are no longer referenced by any lead.
| ids | Array of strings |
{- "ids": [
- "string"
]
}{- "account_id": "string",
- "org_id": "string",
- "domain": "string",
- "name": "string",
- "metadata": { },
- "top_score": 0,
- "leads": [
- {
- "lead_id": "string",
- "score": 0,
- "owner_name": "string",
- "last_event_at": "2019-08-24T14:15:22Z"
}
], - "recent_events": [
- {
- "id": "string",
- "lead_id": "string",
- "event_type": "string",
- "source": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
]
}| name required | string |
| enabled | boolean |
| is_primary | boolean Default: false |
{- "name": "string",
- "enabled": true,
- "is_primary": false
}{- "id": "string",
- "org_id": "string",
- "name": "string",
- "enabled": true,
- "is_primary": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}| id required | string |
| name required | string |
| enabled | boolean |
| is_primary | boolean Default: false |
{- "name": "string",
- "enabled": true,
- "is_primary": false
}| id required | string |
[- {
- "id": "string",
- "ruleset_id": "string",
- "account_property": "string",
- "condition": "string",
- "comparison_value": "string",
- "weight": 0,
- "ui_order": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]| id required | string |
| account_property required | string |
| condition required | string |
| comparison_value required | string |
| weight required | integer |
| ui_order | integer |
{- "account_property": "string",
- "condition": "string",
- "comparison_value": "string",
- "weight": 0,
- "ui_order": 0
}{- "id": "string",
- "ruleset_id": "string",
- "account_property": "string",
- "condition": "string",
- "comparison_value": "string",
- "weight": 0,
- "ui_order": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}| id required | string |
| ruleId required | string |
| account_property | string |
| condition | string |
| comparison_value | string |
| weight | integer |
| ui_order | integer |
{- "account_property": "string",
- "condition": "string",
- "comparison_value": "string",
- "weight": 0,
- "ui_order": 0
}| source_field required | string |
| account_property required | string |
| update_behavior | string Default: "always_latest" Enum: "always_latest" "set_once" "append" Controls how this field is updated when new events arrive. For append, last 10 values are stored in " |
{- "source_field": "string",
- "account_property": "string",
- "update_behavior": "always_latest"
}{- "id": "string",
- "source_field": "string",
- "account_property": "string",
- "update_behavior": "always_latest",
- "created_at": "2019-08-24T14:15:22Z"
}| id required | string |
| source_field required | string |
| account_property required | string |
| update_behavior | string Default: "always_latest" Enum: "always_latest" "set_once" "append" Controls how this field is updated when new events arrive. For append, last 10 values are stored in " |
{- "source_field": "string",
- "account_property": "string",
- "update_behavior": "always_latest"
}| name required | string |
| min_score required | integer |
| max_score required | integer |
{- "name": "string",
- "min_score": 0,
- "max_score": 0
}{- "stage_id": "st_hot",
- "name": "Hot",
- "min_score": 80,
- "max_score": 1000
}| id required | string |
| name required | string |
| min_score required | integer |
| max_score required | integer |
{- "name": "string",
- "min_score": 0,
- "max_score": 0
}Lists configured profile levels within the active OU.
[- {
- "level_id": "string",
- "name": "string",
- "min_score": 0,
- "max_score": 0,
- "org_id": "string",
- "created_by": "string",
- "updated_by": "string"
}
]| name required | string |
| min_score required | integer |
| max_score required | integer |
{- "name": "string",
- "min_score": 0,
- "max_score": 0
}{- "level_id": "string",
- "name": "string",
- "min_score": 0,
- "max_score": 0,
- "org_id": "string",
- "created_by": "string",
- "updated_by": "string"
}| id required | string |
| name required | string |
| min_score required | integer |
| max_score required | integer |
{- "name": "string",
- "min_score": 0,
- "max_score": 0
}Lists configured account levels within the active OU.
[- {
- "level_id": "string",
- "name": "string",
- "min_score": 0,
- "max_score": 0,
- "org_id": "string",
- "created_by": "string",
- "updated_by": "string"
}
]| name required | string |
| min_score required | integer |
| max_score required | integer |
{- "name": "string",
- "min_score": 0,
- "max_score": 0
}{- "level_id": "string",
- "name": "string",
- "min_score": 0,
- "max_score": 0,
- "org_id": "string",
- "created_by": "string",
- "updated_by": "string"
}| id required | string |
| name required | string |
| min_score required | integer |
| max_score required | integer |
{- "name": "string",
- "min_score": 0,
- "max_score": 0
}Updates scoring settings (organization-wide toggles plus per-OU session idle timeout for the active OU).
| allow_negative_scores | boolean |
| abm_enabled | boolean |
| session_timeout_minutes | integer |
{- "allow_negative_scores": true,
- "abm_enabled": true,
- "session_timeout_minutes": 0
}