API Reference
The NewsDesk REST API provides programmatic access to events, entities, relationships, and paths. All requests and responses use JSON.
Authentication
All API endpoints (except /health) require a Bearer JWT obtained via Google OAuth. Include it in every request.
Authenticate via Google OAuth. Creates a new user account if one doesn't exist. Returns a JWT for subsequent requests.
| Parameter | Type | Description |
|---|---|---|
| google_token* | string | Google OAuth ID token |
| user_info | object | Required for new users (must include company and position). Ignored for returning users. |
google_token or missing user_info for new usersRefresh a valid (non-expired) JWT with a new expiry.
Entity Reference Format
Entity references follow the pattern {type}___{Name_With_Underscores} (three underscores as separator).
Error Handling
{"success": false, "error": "..."} instead. See per-endpoint documentation.Events
Retrieve full event data including summary, bookkeeping, and deduplicated actions.
error field contains the literal string "None" on success (not JSON null).Get a summarized view: top 5 actions, top 5 entities, description, and market impact. Lighter than the full event endpoint.
Entities
Retrieve entity data including relationships, actions, and events. POST variant allows passing relationship display settings in the request body.
Retrieve secondary data (Wikipedia summary, market fundamentals). Call after the main entity page loads for faster initial render. fundamentals is only populated for entities with stock tickers.
Get live price data: 60-day hourly candles and 1-year daily candles.
Get current data for multiple entities in a single request.
Search entities using FTS5 full-text search across names, aliases, and tickers. Results capped at 50.
| Parameter | Type | Description |
|---|---|---|
| query* | string | Search term |
| types | string[] | Filter by entity type prefix. Omit to search all types. |
Relationships
Get filtered and sorted relationships for an entity. Primary endpoint for the relationship browser.
| Parameter | Type | Description |
|---|---|---|
| maxNumberOfRelsToDisplay | int | Max relationships to return. Default: 50 |
| sortingMetric | string | "relImportanceMetric" or "lastUpdateTime" |
| filters.counterpartyTypes | string[] | Filter by counterparty entity type prefixes |
| filters.direction | string[] | ">" (outgoing) and/or "<" (incoming) |
| filters.minImportance | float | Minimum importance threshold |
| filters.maxImportance | float | Maximum importance threshold |
Get comprehensive relationship data between two entities, including actions, processed attributes, and timeseries sentiment data.
timeseries is null if no actions exist. Pass ?debug=true for verbose timeseries output.Paths
Find chains of relationships connecting two entities, optionally through required waypoints.
| Parameter | Type | Description |
|---|---|---|
| entity_a* | string | Start entity reference |
| entity_b* | string | End entity reference |
| max_steps | int | Max path length (1–10). Default: 4 |
| firstNPaths | int | Max paths to return. -1 for all (up to 100). Default: 1 |
| settings.entitiesInBetween | string[] | Waypoints the path must pass through |
| settings.filters | object | Same filter options as relationship filtering |
type is "path" for multi-hop paths or "relationship" for direct connections. segments only populated when waypoints are specified.entity_a/entity_b, or max_steps/firstNPaths out of rangeStreetQuery
Execute complex graph or chain queries. Define conditional graph patterns to find matching sets of entities. Supports "graph" (nodes with roles + edges) and "chain" (linear entity-relationship steps) query types.
Feeds
Feeds and search share the same filter structure. All filter fields are optional.
Load initial dashboard data. Returns saved feed configurations and current feed data.
Update saved feed configurations and return refreshed feed data.
Refresh feed data using current saved configurations. No changes to feed settings.
Search
Search for events using the feed configuration object. Results sorted by semantic similarity if a text query is provided, otherwise by most recently updated. Capped at 100 events.
Saved Items
All saved item endpoints are per-user. Items are stored as key references (no data snapshots) and enriched with live data on retrieval. No pagination — all saved items are returned.
Get saved events with enriched data. If an event no longer exists, data.missing will be true.
Save an event.
Remove a saved event.
Get saved entities with enriched metadata, types, and activity metrics.
Save an entity.
Remove a saved entity.
Get saved relationships with enriched importance, processing status, and action count. Keys are canonically sorted: entityA:::entityB (alphabetical).
Save a relationship.
entityA or entityBRemove a saved relationship. Entities must be in canonical (alphabetical) order — use the key from GET /api/saved-relationships.
Get saved paths with enriched display names and computed metrics.
Save a path. Minimum 2 entities required.
Remove a saved path. The path_id is entity1:::entity2:::entity3.
User Settings
Get user's general settings (theme, layout preferences, etc.).
Update settings. Merges with existing — send only the fields you want to change.
Get your action log with pagination. Returns most-recent-first.
| Query Param | Type | Description |
|---|---|---|
| limit | int | Max entries. Default: 100 |
| offset | int | Skip entries. Default: 0 |
Messages & Feedback
In-app messaging between users and admins.
Get your full message history (chronological).
Send a feedback message. At least one of content or attachment required.
Get count of unread admin replies.
Mark all admin replies as read.
List all user conversations. unread_count reflects user messages the admin hasn't read.
Get full message thread for a user. Auto-marks user messages as read.
Reply to a user.
Get messaging analytics: totals, top pages (10), top users (10), daily volume (30 days).
Analytics
All analytics endpoints require admin role. Data is based on user action logs from the last 30 days. Results are cached for 60 seconds.
Dashboard summary: total users, total actions, actions today/this week, and 5 most recently active users.
Per-user breakdown: total actions, actions today, last active timestamp, and top 3 endpoints per user.
Single user drilldown: daily counts (30 days), endpoint breakdown by category, and last 50 actions.
Feature/endpoint usage across all users. Top 20 endpoints returned, grouped by category.
Most-viewed objects (entities, events, relationships) across all users. Top 30 per category. Pass ?user_id=... to filter to a specific user.
Health & Status
Health check.
Get current database status with live counts. last_update is "never" if no events exist.