Analytics
Heap
API integration
Ship Analytics features without building the integration. Full Heap API access via Proxy and 7 MCP-ready tools for AI agents — extend models and mappings to fit your product.
Talk to usUse Cases
Why integrate with Heap
Common scenarios for SaaS companies building Heap integrations for their customers.
Enrich Heap with Server-Side Billing Events
Subscription and billing platforms can push backend events like upgrades, downgrades, and payment failures into their customers' Heap workspaces, so Product teams can correlate revenue outcomes with frontend behavior.
Close the Loop on Email and Campaign Attribution
Marketing automation and lifecycle tools can stitch email identities to anonymous Heap visitors and log server-side campaign events, giving mutual customers a true end-to-end funnel from email click to in-product activation.
Sync Customer Health and Firmographics for Account-Level Analysis
CRM, CS, and data enrichment tools can bulk-sync account traits (ARR, plan tier, health score) and user traits (role, title) into Heap, unlocking B2B cohort analysis and letting PMs filter sessions by at-risk or high-value accounts.
Automate GDPR/CCPA Deletion Workflows
Privacy and trust platforms can programmatically submit bulk user deletion requests to Heap and poll for completion, delivering zero-touch Right to Be Forgotten compliance with auditable proof for mutual customers.
What You Can Build
Ship these features with Truto + Heap
Concrete product features your team can ship faster by leveraging Truto’s Heap integration instead of building from scratch.
Server-Side Event Forwarding
Pipe backend events (payments, API usage, email engagement) into a customer's Heap workspace using create_a_heap_event, keyed to either a known identity or anonymous user_id.
Identity Stitching on Form Submit
Automatically call update_a_heap_identity_by_id when a lead fills out a form or logs in, merging anonymous browsing history into the known user profile.
Nightly Account Trait Sync
Schedule bulk update_a_heap_account_by_id jobs to refresh firmographics, plan tier, MRR, and health scores so Heap's account objects stay aligned with your source of truth.
User Profile Enrichment
Push custom user traits like role, lifecycle stage, or feature entitlements into Heap via update_a_heap_user_by_id, auto-creating profiles for identities Heap hasn't seen yet.
Automated Right-to-Be-Forgotten Pipeline
Batch deletion requests through create_a_heap_user_deletion and run background polling against get_single_heap_user_deletion_by_id to confirm completion and generate audit logs.
Self-Serve Heap Connection Flow
Let end users connect their Heap workspace through a managed auth flow using create_a_heap_auth, so your product can start writing events and traits without customers hand-managing API keys.
SuperAI
Heap AI agent tools
Comprehensive AI agent toolset with fine-grained control. Integrates with MCP clients like Cursor and Claude, or frameworks like LangChain.
create_a_heap_event
Send a custom server-side event to Heap, such as backend order/transaction info or events not capturable client-side. Returns an empty JSON object on success. Requires app_id and event; you must supply either identity or user_id, but not both.
update_a_heap_identity_by_id
Identify a Heap user by mapping an anonymous SDK user_id to a known identity such as an email, migrating all associated events to that identity. Returns an empty JSON object on success. Requires app_id, user_id, and identity. Heap allows only 1 identity per user_id and at most 10 user_ids per identity in a one-month window; extra calls are ignored.
update_a_heap_user_by_id
Attach custom key-value properties to an identified Heap user from your servers; unknown identities are created as new users and existing properties are overwritten by name. Returns an empty JSON object on success. Required: app_id, identity.
update_a_heap_account_by_id
Attach or update custom account properties for one or more accounts in Heap. Returns a plain-text 'OK' success acknowledgment with no structured body. Required: app_id, plus either account_id and properties (single-account update) or accounts (bulk update).
create_a_heap_auth
Create a temporary Heap auth token by exchanging API credentials via HTTP Basic Authentication. Returns: access_token.
create_a_heap_user_deletion
Submit up to 10,000 users for deletion from Heap. Returns: deletion_request_location, deletion_request_id, status, access_token. Required: users — each entry needs user_id or identity. Deletion is asynchronous; poll the deletion status endpoint with the returned deletion_request_id.
get_single_heap_user_deletion_by_id
Get the status of a user deletion request in Heap by id. Returns: deletion_request_id, status, access_token. Required: id — the deletion_request_id returned when the deletion was submitted.
Why Truto
Why use Truto’s MCP server for Heap
Other MCP servers give you a static tool list for one app. Truto gives you a managed, multi-tenant MCP infrastructure across 800+ integrations.
Auto-generated, always up to date
Tools are dynamically generated from curated documentation — not hand-coded. As integrations evolve, tools stay current without manual maintenance.
Fine-grained access control
Scope each MCP server to read-only, write-only, specific methods, or tagged tool groups. Expose only what your AI agent needs — nothing more.
Multi-tenant by design
Each MCP server is scoped to a single connected account with its own credentials. The URL itself is the auth token — no shared secrets, no credential leaking across tenants.
Works with every MCP client
Standard JSON-RPC 2.0 protocol. Paste the URL into Claude, ChatGPT, Cursor, or any MCP-compatible agent framework — tools are discovered automatically.
Built-in auth, rate limits, and error handling
Tool calls execute through Truto’s proxy layer with automatic OAuth refresh, rate-limit handling, and normalized error responses. No raw API plumbing in your agent.
Expiring and auditable servers
Create time-limited MCP servers for contractors or automated workflows. Optional dual-auth requires both the URL and a Truto API token for high-security environments.
How It Works
From zero to integrated
Go live with Heap in under an hour. No boilerplate, no maintenance burden.
Link your customer’s Heap account
Use Truto’s frontend SDK to connect your customer’s Heap account. We handle all OAuth and API key flows — you don’t need to create the OAuth app.
We handle authentication
Don’t spend time refreshing access tokens or figuring out secure storage. We handle it and inject credentials into every API request.
Call our API, we call Heap
Truto’s Proxy API is a 1-to-1 mapping of the Heap API. You call us, we call Heap, and pass the response back in the same cycle.
Unified response format
Every response follows a single format across all integrations. We translate Heap’s pagination into unified cursor-based pagination. Data is always in the result attribute.
FAQs
Common questions about Heap on Truto
Authentication, rate limits, data freshness, and everything else you need to know before you integrate.
How do end users authenticate their Heap account?
Truto handles the Heap connection through create_a_heap_auth, which captures the credentials needed to write events, identities, users, and accounts into the end user's Heap workspace. Your product never has to store or rotate Heap API keys directly.
What are the limits on identity mapping?
Heap enforces strict identity rules: each anonymous user_id can be mapped to only 1 identity, and a single identity can accept a maximum of 10 user_ids within a rolling 30-day window. Integrators should design identity stitching logic to respect these limits and handle rejections gracefully.
Can I send events for users who aren't yet identified?
Yes. create_a_heap_event requires either a known identity (e.g., email) or an anonymous user_id generated by Heap's web SDK. This lets you log backend events for both logged-in users and anonymous visitors tied to a browser session.
How are user and account updates handled if the record doesn't exist yet?
update_a_heap_user_by_id will automatically create a new user profile when called with an identity Heap hasn't seen before. update_a_heap_account_by_id supports bulk property updates and returns a simple 'OK' acknowledgment, making it ideal for nightly firmographic syncs.
Is user deletion synchronous?
No. create_a_heap_user_deletion accepts up to 10,000 users per request and is processed asynchronously. You'll receive a deletion_request_id that must be polled via get_single_heap_user_deletion_by_id until the status resolves — Truto makes it straightforward to orchestrate this polling loop.
Can I read analytics data (events, funnels, reports) back from Heap?
The current tool inventory is write-focused — sending events, updating identities, users, and accounts, and managing deletions. If you need read access to Heap data, Truto builds integrations on request, so reach out and we can scope additional endpoints.
From the Blog
Heap integration guides
Deep dives, architecture guides, and practical tutorials for building Heap integrations.
Heap
Get Heap integrated into your app
Our team understands what it takes to make a Heap integration successful. A short, crisp 30 minute call with folks who understand the problem.