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
- 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.
- 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}.
Mark a list of cards:
POST /v0/likes/subset{"target_type": "project", "target_nonces": ["…", "…"]}→{"liked_target_nonces": [...]}.POST /v0/likes/saved-subsetwith the same body answers which of them are saved (in any of your workspaces), in the same field.Count:
GET /v0/likes/count?target_type=project&target_nonce=470000000000000001→{"count": 3}(no token needed). Card pages and tiles also carrylike_count,fav_count(how many people saved it) and, for you,liked_by_viewer/saved_by_viewer.
Behind
- Saving is not a like: a card is saved when it is in one of your workspaces. API pipeline: Collect cards in workspaces
Rules
- 400
unsupported target_type: <type>. - 401 without a token (except
count).
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 |