Sharing & identity API

Share resources with grants, list teams, and identify the token under /api/grants, /api/orgs, and /api/whoami.

Share charts, sheets, and dashboards with teams or people, and discover the identity and teams a token can act on.

#Identify the token

GET /api/whoami — the calling token's user, org (tenant), org role, seat, scopes, and team memberships. Unlike /api/me (browser-only), this is available to a service-account token — call it first to learn your orgId and check your scopes.

#Teams

GET /api/orgs/{orgId}/teams — the org's teams (each with your role). Use a team id as granteeTeamId below, or as teamId when creating a team-scoped resource.

#Grants

  • GET /api/grants?resourceType=&resourceId= — the grants on a resource.
  • POST /api/grants — share a resource with a team or person at view or edit. Requires the write scope and org-admin or the owning team's lead. For a dashboard, set cascadeChartsPermission to also grant its underlying charts — otherwise the recipient opens the dashboard with empty tiles.
  • DELETE /api/grants/{grantId}?resourceType=&resourceId= — revoke a grant (manage).
# share a dashboard with a team, and its charts at view
curl -X POST https://flax-analytics.com/api/grants \
  -H "Authorization: Bearer flax_pat_..." \
  -H "Content-Type: application/json" \
  -d '{"resourceType":"dashboard","resourceId":"dsh_1","granteeTeamId":"team_1",
       "permission":"view","cascadeChartsPermission":"view"}'