Verita Recommendation & Notification Service API (1.1.0)

Download OpenAPI specification:

License: Apache 2.0

Discovery and signaling layer for the Verita platform. Handles personalized and trending feeds, user/topic subscriptions, notifications, and behavioral interaction tracking for the recommendation engine.

Feed endpoints return a postIds list. The frontend fetches card data by calling GET /api/v1/posts/cards?ids=... in content-service.

Internal

Delete all recommendation-service data owned by a user

Internal endpoint called by user-service during account deletion. Removes user-owned recommendation, subscription, notification, and interaction data. The operation is idempotent.

Authorizations:
bearerAuth
path Parameters
userId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "status": 0,
  • "error": "string",
  • "message": "string"
}

List a user's topic subscriptions (internal)

Internal endpoint called by content-service's scheduled digest job. Returns topic IDs subscribed by the requested user. Gated by X-Internal-Service-Token (ADR-0007), not a user JWT.

Authorizations:
bearerAuth
path Parameters
userId
required
string <uuid>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List platform-wide trending topics (internal)

Internal endpoint called by content-service's daily digest job to seed the public digest (ADR-0018/0019). Returns the most-subscribed topic IDs across the platform, most popular first. Gated by X-Internal-Service-Token (ADR-0007), not a user JWT.

query Parameters
limit
integer [ 1 .. 50 ]
Default: 8

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Discovery

Get personalized post feed for the logged-in user

Returns posts ranked by the personalization algorithm based on the user's topic subscriptions and behavioral history. Topic filter is intentionally absent — the personal feed is already scoped to subscribed topics.

Uses cursor-based pagination for stable infinite scroll: pass the nextCursor from the previous response to load the next batch. Omit cursor for the first request.

Authorizations:
bearerAuth
query Parameters
cursor
string

Opaque cursor from the previous response. Omit for the first page.

size
integer [ 1 .. 50 ]
Default: 20

Responses

Response samples

Content type
application/json
{
  • "postIds": [
    ],
  • "nextCursor": "string"
}

Get globally trending content

Returns posts ranked by engagement score (likes, comments, views, recency). Supply topic to browse trending posts within a topic — this is the ranked alternative to GET /api/v1/posts?topic= in content-service. Authenticated requests populate isLikedByMe; unauthenticated requests return false.

Uses cursor-based pagination for stable infinite scroll: pass the nextCursor from the previous response to load the next batch. Omit cursor for the first request.

query Parameters
topic
string
Example: topic=LLMs

Filter by topic name (case-insensitive).

cursor
string

Opaque cursor from the previous response. Omit for the first page.

size
integer [ 1 .. 50 ]
Default: 20

Responses

Response samples

Content type
application/json
{
  • "postIds": [
    ],
  • "nextCursor": "string"
}

Subscriptions

Follow another user

Authorizations:
bearerAuth
path Parameters
userId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "status": 0,
  • "error": "string",
  • "message": "string"
}

Unfollow a user

Authorizations:
bearerAuth
path Parameters
userId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "status": 0,
  • "error": "string",
  • "message": "string"
}

List topics the current user is subscribed to

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Subscribe to a topic

Authorizations:
bearerAuth
path Parameters
topicId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "status": 0,
  • "error": "string",
  • "message": "string"
}

Unsubscribe from a topic

Authorizations:
bearerAuth
path Parameters
topicId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "status": 0,
  • "error": "string",
  • "message": "string"
}

Notifications

Retrieve notification history

Authorizations:
bearerAuth
query Parameters
unreadOnly
boolean
Default: false
page
integer >= 0
Default: 0
size
integer [ 1 .. 50 ]
Default: 20

Responses

Response samples

Content type
application/json
{
  • "content": [
    ],
  • "page": 0,
  • "size": 0,
  • "totalPages": 0,
  • "totalElements": 0,
  • "hasNext": true
}

Mark a specific notification as read

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "status": 0,
  • "error": "string",
  • "message": "string"
}

Mark all notifications as read

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "status": 0,
  • "error": "string",
  • "message": "string"
}

Interactions

Signal user interaction for the recommendation engine

Records implicit behavioral signals (dwell, scroll, clicks, shares) for the personalization model. Populate durationSeconds for DWELL events and scrollDepth (0–100) for SCROLL events.

Authorizations:
bearerAuth
Request Body schema: application/json
required
postId
required
string <uuid>
interactionType
required
string
Enum: "CLICK" "VIEW" "DWELL" "SCROLL" "SHARE"
durationSeconds
integer or null >= 0

Seconds in viewport. Relevant for DWELL events.

scrollDepth
integer or null [ 0 .. 100 ]

Scroll percentage reached (0–100). Relevant for SCROLL events.

object or null

Responses

Request samples

Content type
application/json
{
  • "postId": "1d33c5d7-f0cb-41cc-a647-907f16832fc3",
  • "interactionType": "CLICK",
  • "durationSeconds": 0,
  • "scrollDepth": 100,
  • "metadata": { }
}

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "status": 0,
  • "error": "string",
  • "message": "string"
}