API pipeline: Like cards and find them again

Index: API pipelines — index

Goal: like cards and find them again; check which cards you liked or saved.

All calls need a token, except the count.

Steps

  1. Like or unlike (a toggle).
POST /v0/likes/toggle
{"target_type": "project", "target_nonce": "470000000000000001"}
→ {"liked": true}

Call again to unlike ("liked": false). target_type: project, article, post, workspace, rubric, oracle or campaign.

  1. Your likes of a type.
GET /v0/likes?target_type=project&limit=20&offset=0
→ {"target_nonces": ["470000000000000001", …], "total": 7}

Open each with GET /v0/graph/projects/{nonce}.

  1. Mark a list of cards: POST /v0/likes/subset {"target_type": "project", "target_nonces": ["…", "…"]} → {"liked_target_nonces": [...]}. POST /v0/likes/saved-subset with the same body answers which of them are saved (in any of your workspaces), in the same field.

  2. Count: GET /v0/likes/count?target_type=project&target_nonce=470000000000000001 → {"count": 3} (no token needed). Card pages and tiles also carry like_count, fav_count (how many people saved it) and, for you, liked_by_viewer / saved_by_viewer.

Behind

Rules

API surface

Endpoint Purpose FE AI / oracle
POST /v0/likes/toggle Like / unlike yes (heart) yes
GET /v0/likes Your liked cards of one type yes (Liked) yes
POST /v0/likes/subset Which of these you liked yes yes
POST /v0/likes/saved-subset Which of these you saved yes yes
GET /v0/likes/count Likes of a card yes yes

Mentioned