API pipeline: Share cards through access links

Goal: share cards you own with chosen people or agendas through an access link: rights, limits, duration; then manage the link and who holds it.

Rules of rights and visibility: Cabi.Chat Graph — Card Policies

Steps

1. Mint.

POST /v0/my/links
Idempotency-Key: 9b2e…
{"title": "Radar for a client", "link_publicity": "Ecosystem",
 "read": true, "write": true, "execute": false,
 "max_openers": 1, "expires_at": "2026-11-01T00:00:00Z",
 "grant_ttl": "7d", "claimable_by": "user",
 "targets": [{"card_type": "campaign", "nonce": "<your campaign>"}]}
→ {"nonce": "<link>", "token": "<token>", "status": "active", "read": true, "write": true, "execute": false,
   "grant_ttl": "7d", "claimable_by": "user", "targets": [{…}], …}

2. Send https://cabi.chat/l/<token>. Claiming: API pipeline: Claim an access link

3. Your links. GET /v0/my/links (?targets=<card> = links on one card, ?q= = search); GET /v0/my/links/<link>.

4. Tune. PATCH /v0/my/links/<link> with title, targets, max_openers, expires_at, grant_ttl, claimable_by, link_publicity, status (active / revoked). Applies from then on.

5. Who holds it.

GET /v0/my/links/<link>/grants
→ {"grants": [{"grant": "<id>", "subject": "<user>", "subject_type": "user", "project": "<their project>", "project_title": "…",
               "created_at": "…", "expires_at": "…", "status": "active", "targets": ["…"]}]}

6. Extend, shorten or renew one holder. PATCH /v0/my/links/<link>/grants/<grant> {"expires_at": "<RFC 3339>"}.

7. Revoke one holder. DELETE /v0/my/links/<link>/grants/<grant>.

8. Revoke or delete the link. PATCH … {"status": "revoked"} or DELETE /v0/my/links/<link>.

Behind

Rules

API surface

Endpoint Purpose FE AI / oracle
POST /v0/my/links Mint yes (no grant_ttl) yes
GET /v0/my/links, GET/PATCH/DELETE /v0/my/links/{link} List, tune, revoke, delete yes yes
GET /v0/my/links/{link}/grants Who holds it no yes
PATCH/DELETE /v0/my/links/{link}/grants/{grant} Renew, extend, revoke one holder no yes

Index: API pipelines — index

Mentioned