API pipeline: Claim an access link

Goal: open an access link someone sent you and get the shared cards into your account, for one of your projects or for one of your agendas; see what is shared with you.

Steps

As a person

  1. Open it.
GET /v0/linked/<token>?project=<your project>
→ {"title": "…", "read": true, "write": true, "execute": false,
   "cards": [{"card_type": "campaign", "nonce": "<card>", "title": "…", "visibility": "Unlisted"}]}

An Ecosystem link needs you signed in and stores the access for one of your projects: the one you pass, or your only project. An Everyone link just shows the cards, nothing is stored.

  1. One shared card: GET /v0/linked/<token>/<card_type>/<card> (same project rule).

As an agenda

POST /v0/my/agendas/<agenda>/claim
{"token": "<token>"}
→ {"agenda": "<agenda>", "cards": [...]}

No project here.

What is shared with you

GET /v0/graph/my/granted
→ {"granted": [{"tile": {…}, "rights": {"read": true, "write": true, "execute": false},
                "via": [{"nonce": "<link>", "title": "…", "owner": "…", "expires_at": "…"}]}], "total": 1}

Use the cards with the usual routes, within the rights you got.

Rules

API surface

Endpoint Purpose FE AI / oracle
GET /v0/linked/{token} Open / claim as a person yes your own scripts
GET /v0/linked/{token}/{card_type}/{nonce} One shared card yes your own scripts
POST /v0/my/agendas/{ident}/claim Claim for an agenda yes yes
GET /v0/graph/my/granted What is shared with you yes yes

Index: API pipelines — index

Mentioned