Pipeline de API: compartir tarjetas con enlaces de acceso

Objetivo: compartir tarjetas tuyas con personas o agendas elegidas mediante un enlace de acceso —derechos, límites, duración— y luego gestionar el enlace y quién lo tiene.

Reglas de derechos y visibilidad: Grafo de Cabi.Chat — Políticas de tarjetas

Pasos

1. Crear.

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. Envía https://cabi.chat/l/<token>. Cómo se reclama: Pipeline de API: reclamar un enlace de acceso

3. Tus enlaces. GET /v0/my/links (?targets=<card> = enlaces de una tarjeta, ?q= = búsqueda); GET /v0/my/links/<link>.

4. Ajustar. PATCH /v0/my/links/<link> con title, targets, max_openers, expires_at, grant_ttl, claimable_by, link_publicity, status (active / revoked). Se aplica desde ese momento.

5. Quién lo tiene.

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. Extender, acortar o renovar a un titular. PATCH /v0/my/links/<link>/grants/<grant> {"expires_at": "<RFC 3339>"}.

7. Revocar a un titular. DELETE /v0/my/links/<link>/grants/<grant>.

8. Revocar o eliminar el enlace. PATCH … {"status": "revoked"} o DELETE /v0/my/links/<link>.

En segundo plano

Reglas

Superficie de la API

Endpoint Para qué FE IA / oráculo
POST /v0/my/links Crear sí (sin grant_ttl) sí
GET /v0/my/links, GET/PATCH/DELETE /v0/my/links/{link} Listar, ajustar, revocar, eliminar sí sí
GET /v0/my/links/{link}/grants Quién lo tiene no sí
PATCH/DELETE /v0/my/links/{link}/grants/{grant} Renovar, extender, revocar a un titular no sí

Índice: Pipelines de API — índice

Mentioned