Axuz Developers

GET /public/shared/{token}

Viewer público multi-mode share.

  • Access: Public (link or signature)
  • Service: https://api-flow.axuz.net

Accepted authentication

No authentication (public route, or protected by link/signature).

— GET /public/shared/{token}. No auth required for mode=public or mode=time. mode=email validates the VERIFIED session identity (signed access_token cookie/Bearer → email from the auth_api; the client-supplied X-User-Email header is ignored — TK-031b). Returns 403 {requires_login, email} when the caller is not authed as the target email.

Parameters

NameInTypeRequiredDescription
tokenpathstringyes

16 bytes hex (2^128 espaço).

X-User-Emailheaderstringno

Obrigatório quando share.mode=email — o browser autenticado forwarda o email confirmado.

Responses

200

OK.

NameTypeRequiredDescription
titlestringyes
documentFlowDocumentyes

Shape enxuta espelhando lib/types.ts:FlowDocument no client. Backend não valida a shape interna (opaco pro storage); os campos abaixo são o mínimo comum consumido pelo editor.

document.nodesarray<FlowNode>yes
document.nodes[].idstringyes
document.nodes[].typestringyes
document.nodes[].positionFlowXYyes
document.nodes[].position.xnumberyes
document.nodes[].position.ynumberyes
document.nodes[].widthinteger | nullno
document.nodes[].heightinteger | nullno
document.nodes[].parentNodestringno
document.nodes[].extentstringno
document.nodes[].dataobjectyes
document.nodes[].styleobjectno
document.edgesarray<FlowEdge>yes
document.edges[].idstringyes
document.edges[].sourcestringyes
document.edges[].targetstringyes
document.edges[].typestringno
document.edges[].dataobjectno
last_updated_atstring<date-time>yes
readonlybooleanyes
shareobjectyes
share.modestringyes

enum: "public", "email", "time"

share.accessstringyes

enum: "view", "interact"

share.expires_atstring<date-time> | nullno

403

Share mode=email e caller não é o target.

NameTypeRequiredDescription
errorstringyes
requires_loginbooleanyes
emailstring<email> | nullno

Email alvo do share.

404

Token inválido, revogado ou view-limit exceeded.

NameTypeRequiredDescription
errorstringyes

410

Share expirou (expires_at < now).

NameTypeRequiredDescription
errorstringyes

429

Rate limit per-token.

NameTypeRequiredDescription
errorstringyes

500

Erro interno. Tente de novo com backoff; reporte o X-Request-Id.

NameTypeRequiredDescription
errorstringyes

Examples

"Try it" is turned off in this reference. Use the examples with your test credential.

curl

curl -sS -X GET 'https://api-flow.axuz.net/public/shared/TOKEN'

Node.js

const res = await fetch("https://api-flow.axuz.net/public/shared/TOKEN", {
  method: 'GET',
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());

Python

import os
import requests

res = requests.request(
    "GET",
    "https://api-flow.axuz.net/public/shared/TOKEN",
    timeout=30,
)
res.raise_for_status()
print(res.json())