Skip to main content

Sharing and Embed

This reference covers the authenticated and public endpoints used by the sharing system.

Endpoint Groups

GroupBase
Share contexts/api/v1/share-contexts
Dashboard shares/api/v1/dashboards/:id/shares, /api/v1/dashboard-shares
External email auth/api/v1/share-auth
Authenticated external portal/api/v1/share-portal
Public token shares/api/v1/public/shares/:token
Embed generation (authenticated)/api/v1/embed
Embed consumption (public)/api/embed
Sharing audit/analytics/api/v1/share-events, /api/v1/share-analytics

1) Share Contexts

All endpoints require internal JWT (Authorization: Bearer <access_token>).

MethodEndpointDescription
GET/api/v1/share-contextsList company contexts
GET/api/v1/share-contexts/:idGet a context
POST/api/v1/share-contextsCreate context
PUT/api/v1/share-contexts/:idUpdate context
PUT/api/v1/share-contexts/:id/grantsUpdate context grants
DELETE/api/v1/share-contexts/:idDelete context
GET/api/v1/share-contexts/:id/membersList members
POST/api/v1/share-contexts/:id/membersAdd member (internal_user, group, external_email)
DELETE/api/v1/share-contexts/:id/members/:memberIdRemove member

Example: add external email member

{
"member_type": "external_email",
"email": "customer@company.com"
}

2) Dashboard Shares

These also require internal JWT.

MethodEndpointDescription
GET/api/v1/dashboards/:id/sharesList dashboard shares
POST/api/v1/dashboards/:id/sharesCreate share (link or embed)
GET/api/v1/dashboard-sharesList company shares (paginated)
PUT/api/v1/dashboard-shares/:shareIdUpdate share
DELETE/api/v1/dashboard-shares/:shareIdRevoke share
GET/api/v1/dashboards/:id/share-filter-candidatesList eligible filters for share policies
GET/api/v1/dashboards/:id/embed-parameter-candidatesList eligible embed parameters

Create payload (POST /api/v1/dashboards/:id/shares)

{
"name": "External customers",
"share_type": "link",
"share_context_id": "65f0f4d7b3f0b902f7f7e123",
"expires_at": "2026-12-31T23:59:59.000Z",
"embed_options": {
"allowed_origins": ["https://portal.customer.com"],
"hide_header": true,
"hide_controls": false
},
"share_filter_policies": [
{
"filter_slug": "status",
"filter_kind": "multi_select",
"mode": "selectable",
"allowed_values": ["Active", "Pending"]
}
]
}

3) External Email Authentication (share-auth)

Public endpoints (no internal JWT).

MethodEndpointDescription
POST/api/v1/share-auth/requestRequest one-time login code
POST/api/v1/share-auth/verifyVerify code and receive share_access / share_refresh tokens
POST/api/v1/share-auth/refreshRefresh external tokens
POST/api/v1/share-auth/logoutStateless logout

Request code

{
"company_slug": "acme",
"email": "customer@company.com"
}

Verify code

{
"company_slug": "acme",
"email": "customer@company.com",
"code": "1234-5678"
}

Verify response

{
"access_token": "eyJ...",
"refresh_token": "eyJ...",
"access_token_expires_in": 600,
"refresh_token_expires_in": 604800,
"user": {
"id": "...",
"email": "customer@company.com",
"status": "active"
}
}

4) Authenticated External Portal (share-portal)

Requires external token (Authorization: Bearer <share_access_token>).

MethodEndpointDescription
GET/api/v1/share-portal/contextsList accessible contexts
GET/api/v1/share-portal/:company_slug/contextsList contexts scoped by company slug
GET/api/v1/share-portal/dashboards?context_id=...List dashboards for a context
GET/api/v1/share-portal/:company_slug/dashboardsList dashboards for company (aggregated across contexts)
GET/api/v1/share-portal/dashboards/:id?context_id=...Get dashboard
GET/api/v1/share-portal/:company_slug/dashboards/:dashboard_slug?context_id=...Get dashboard by slug
GET/api/v1/share-portal/dashboards/:id/filters/:filter_slug/options?context_id=...&search=...Resolve filter options
GET/api/v1/share-portal/:company_slug/dashboards/:dashboard_slug/filters/:filter_slug/options?context_id=...&search=...Resolve filter options by slug
POST/api/v1/share-portal/dashboards/:id/executeExecute dashboard
POST/api/v1/share-portal/:company_slug/dashboards/:dashboard_slug/executeExecute dashboard by slug

Execute body

{
"context_id": "65f0f4d7b3f0b902f7f7e123",
"parameters": {
"status": ["Active"]
}
}

5) Public Token Shares (/api/v1/public)

No authentication required.

MethodEndpointDescription
GET/api/v1/public/shares/:token/resolveResolve token and return requires_auth
GET/api/v1/public/shares/:token/filters/:filter_slug/options?search=...Resolve filter options (select/multi_select)
POST/api/v1/public/shares/:token/executeExecute share when requires_auth=false

Execute body

{
"parameters": {
"period_start": "2025-01-01",
"period_end": "2025-12-31"
}
}

6) Embed

6.1 Embed token/embed URL generation (internal JWT)

MethodEndpointDescription
POST/api/v1/embed/dashboards/:idGenerate dashboard embed
POST/api/v1/embed/visualizations/:idGenerate visualization embed

Supported body:

{
"fixed_params": { "region": "south" },
"allowed_params": ["seller_id"],
"required_params": ["region"],
"expires_in": 3600
}

6.2 Public stateless embed endpoints

MethodEndpointDescription
GET/api/embed/d/:token/infoDashboard metadata
GET/api/embed/d/:token/filters/:filter_slug/options?search=...Dynamic filter options for embed
POST/api/embed/d/:token/executeExecute dashboard
GET/api/embed/v/:token/infoVisualization metadata
POST/api/embed/v/:token/executeExecute visualization

7) Sharing Audit and Analytics

Internal JWT required.

MethodEndpointDescription
GET/api/v1/share-eventsList sharing/auth events
GET/api/v1/share-events/:idGet event details
GET/api/v1/share-analyticsReturn aggregated analytics

Dynamic multi_select Filter Options

All 3 modes (public, portal, and embed) expose an options endpoint for select and multi_select filters.

Response:

{
"filter_slug": "status",
"options": [
{ "label": "Active", "value": "Active" }
],
"source": "dynamic"
}
  • source=static: static options from dashboard config.
  • source=dynamic: options loaded from filter SQL.
  • source=policy: options restricted by share policy.

Frequent Errors

error_codeWhereMeaning
AUTH_REQUIREDpublic/shares/:token/*Share requires external login
INVALID_CONTEXT_IDshare-portal/*Missing/invalid context_id
FILTER_DISABLED_BY_POLICY*/filters/:filter_slug/optionsFilter unavailable due to policy
DB_QUERY_ERROR*/filters/:filter_slug/optionsDynamic options SQL failed
SHARE_FILTER_POLICY_VIOLATIONshare-portal .../executeParameters violate share policy
TOKEN_INVALIDpublic/embed/portalInvalid or expired token