DataPI.

What would you like to understand?

Preparing search…
    All results and search filters →

    Architecture

    Machine API versus browser session API

    Which endpoints are public contracts, which are dashboard-only, and how the Next.js BFF forwards the session cookie.

    Start with your marketing task

    After sign-in, Home offers Analyze, Discover, Campaigns, Tracking, and Saved work. Paste a public profile, post link, hashtag, or topic. DataPI previews the target and asks you to resolve ambiguous platform or input types. Collection begins only after you select Analyze. You do not create or paste an API token in the dashboard. API tokens are for external integrations.

    Tasks, evidence, and external API equivalents

    TaskWhat you provide and receiveMachine API
    AnalyzeA public target → editable preview → explicit collection → dated evidence, supported metrics, and coverage warnings. Live sources vary by platform and target type.POST /v1/experience/preview; POST /v1/experience/runs; GET /v1/experience/runs/{run_id}
    CampaignsA name, dates, timezone, up to 20 targets, and include/exclude phrases → a saved workspace and distinct sampled posts with per-target coverage. Results do not imply reach, sales, or ROI.POST /v1/experience/campaigns; POST /v1/experience/campaigns/{campaign_id}/runs
    TrackingA live analysis or campaign and frequency → scheduled observations. Samples cannot be tracked. Workspace permissions are checked again when work executes.POST /v1/experience/schedules; GET /v1/experience/schedules

    Read coverage before making a decision

    Surface ownership

    SurfaceHost and baseAudienceCredential
    Machine APIapi.datapi.ir/v1Server-side integrations and public contractsWorkspace bearer token
    Browser workspace APIapp.datapi.ir/api/v1The signed-in dashboard onlyHttpOnly session cookie
    Next.js BFFapp.datapi.ir/api/machineDashboard API explorer onlyBearer token supplied per request, never persisted

    Why the split exists

    The browser session cookie is scoped to app.datapi.ir and is never accepted by the machine host. The machine API uses workspace bearer tokens only. This prevents a stolen browser cookie from becoming a server credential and keeps browser mutations subject to same-origin/Origin checks. The dashboard BFF is a proxy, not an additional public API: it forwards only the cookie and allowlisted headers over the private network.

    Do not build a public client against /api/v1

    Related pages

    Runtime contract snapshot: DataPI API v1.0.0 · 75 HTTP operations documented of 265 runtime operations · 40 catalog operations · 11 available at capture. Captured: . Source: https://api.datapi.ir/v1/contracts.