---
title: "Your Own Unified API: Build It on Truto or Build the Whole Layer?"
slug: build-your-own-unified-api-on-truto-vs-in-house
date: 2026-12-03
author: Roopendra Talekar
categories: [Guides, Engineering]
excerpt: "What a team builds and maintains when it writes its own unified API layer, and which of those parts Truto's Pro add-on already runs."
tldr: "Build the model, not the layer. On Truto you define your own unified model and its JSONata mappings, and Truto runs them with a mapping editor, version history, per-customer overrides, CLI validate and apply, token refresh, pagination and logs. In-house, you build and maintain each of those parts yourself. Your own models come with the Pro add-on, $499 a month."
canonical: https://truto.one/blog/build-your-own-unified-api-on-truto-vs-in-house/
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://truto.one/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Your Own Unified API: Build It on Truto or Build the Whole Layer?


A unified API has two halves. One half is the model: the resources and fields your product needs, and the mapping from each app's API to them. That half is yours, because nobody else knows your product's data. The other half is the layer that runs the model for every customer. That half is the same for every team, and it is most of the work.

On Truto you write the first half and Truto runs the second. This post lists each part of the layer, what Truto already runs, and what you would build and maintain in-house. For the step-by-step build with a coding agent, read [How a Coding Agent Builds Your Own Unified API on Truto](https://truto.one/blog/coding-agent-builds-custom-unified-api-on-truto/).

## When to build your own model

Truto has pre-built unified APIs for categories such as CRM, HRIS, ATS, accounting and ticketing. Use one of them when its fields fit your product. Build your own model when they do not, for example:

- Your product needs a few fields from each app, in a shape that matches your own database.
- Your category has no pre-built unified API on Truto.
- You need a custom method that combines data from two of an app's endpoints.

You can also call each app's own API through the [Proxy API](https://truto.one/proxy-api/), and your agents can use each account's [MCP server](https://truto.one/mcp/). A unified model is one option next to them, not a replacement.

## What you build in-house, and what Truto runs

| Part | On Truto | In-house |
| --- | --- | --- |
| Schema | Resources with a JSON schema each | Your own model registry and API |
| Mapping runtime | JSONata with Truto's functions | Code per app, or your own engine |
| Editor and tests | Dashboard editor and CLI tests | An internal admin tool |
| Versions | History and restore built in | Your own history and rollback |
| Overrides | Environment and account overrides | Per-tenant config and merge code |
| Deploys | Validate and apply, no deploy | CI and a release per change |
| Auth | Each connected account's tokens | OAuth apps, token store, refresh |
| Paging and 429s | Next cursor; 429 passed back | Code per API |
| Logs | Every unified call logged | Your own logging and search |

The sections below give the detail and the source for each row.

## The schema layer

In-house, you design the model, store it, and serve an API for it. On Truto, you create a unified API in the dashboard or with `truto unified-models create`. Each resource has a JSON schema, and each method is `list`, `get`, `create`, `update`, `delete` or a custom name. The name sets the path, so a model called `my-crm` answers at `/unified/my-crm`. See [Creating Unified APIs on Truto](https://truto.one/docs/guides/unified-apis/creating-unified-apis/).

## The mapping runtime

In-house, each app gets its own adapter code, or you build an engine that runs mapping rules. On Truto, every mapping is a JSONata expression. A method can have a query mapping, a request body mapping, a response mapping, an error mapping and header mappings. Before and after steps fetch more data or keep state between calls. Mappings can use Truto's own JSONata functions, such as `$mapValues`, `$firstNonEmpty` and `$dtFromIso`. See [Mapping bindings and functions](https://truto.one/docs/guides/unified-apis/mapping-bindings/).

Each mapping maps one integration to your model. You map HubSpot, Salesforce and Pipedrive to the same `my-crm` model, and your code calls one path for all three.

## The mapping editor and tests

In-house, someone builds an admin tool to edit and test mappings, or every change goes through a pull request. On Truto, the dashboard has a mapping editor. Each mapping tab has an example input and its result, and Code View shows the whole configuration as YAML. On your machine, `truto unified test-mapping` runs a response mapping against a sample response, and `truto jsonata eval` runs any expression. On a live call, `truto_response_format=debug` shows the request Truto sent and the app's raw response. See [Test and debug a mapping](https://truto.one/docs/guides/unified-apis/creating-unified-apis/#test-and-debug-a-mapping).

## Version history and rollback

In-house, you store each version of each mapping and build a way to compare and restore them. On Truto, **History** in the mapping editor compares and restores earlier versions of a mapping. The **Version history** menu item does the same for the whole unified API. See [Overriding Unified API mappings](https://truto.one/docs/guides/unified-apis/override/).

## Per-environment and per-customer overrides

In-house, enterprise customers with custom fields need per-tenant config and code that merges it with the default mapping. On Truto, an environment override changes a mapping for every connected account in one environment. An integrated account override changes it for one connected account, and only needs the fields you add or change. **Import from other Environment** copies overrides between environments. See [Overriding Unified API mappings](https://truto.one/docs/guides/unified-apis/override/) and [3-Level API Mapping](https://truto.one/blog/3-level-api-mapping-per-customer-data-model-overrides-without-code/).

## Testing and deploying mapping changes

In-house, a mapping change is a code change: tests, review, a build and a release. On Truto, mappings are configuration that Truto runs. The [Truto CLI](https://truto.one/cli/) checks and pushes them:

- `truto unified-mappings validate` checks a mapping file against the model's schema, with no LLM calls and no writes.
- `truto unified-mappings apply` checks every mapping again, compares it with the live version, and writes only what passes. `--dry-run` shows the change first.
- With a test account, apply runs read tests against it after the write. It never writes to the app.

A saved change can take up to about 23 minutes to reach API calls, because each connection caches mappings. `POST /integrated-account/refresh-mapping-cache` applies it sooner. See [Unified mappings build](https://truto.one/docs/cli/unified-mappings/).

## Built by a coding agent

In-house, your coding agent writes adapter code that your team then owns. On Truto, `truto unified-mappings build` is an agent loop. It reads the integration's Proxy API, makes read-only sample calls through a connected account or reads the app's docs, and writes the JSONata for each method. When it cannot tell which endpoint or field is right, it asks a question instead of guessing. The output is a mapping file that you validate and apply. Truto's agent skills (`truto-unified-mappings` and `truto-jsonata`) teach Claude Code and Cursor the same steps. See [Setting up Truto with a coding agent](https://truto.one/docs/getting-started/#setting-up-truto-with-a-coding-agent).

## Auth, paging and rate limits

In-house, you register OAuth apps, store tokens, refresh them before they expire, and write paging code for each API. On Truto, a call to your own model runs through the connected account, and Truto refreshes its tokens. A `list` call returns the records with `next_cursor` for the next page. See [How a Unified API call flows](https://truto.one/docs/guides/unified-apis/unified-apis-flow/).

Truto does not retry rate-limited calls for you. When the app returns a 429, Truto passes it back with ratelimit headers and, when it has one, `Retry-After`. Your code decides when to retry. See [Rate limits](https://truto.one/docs/api-reference/overview/rate-limits/).

## Logs, sync jobs and no code to host

In-house, you add logging, a place to search it, and jobs that copy data on a schedule. On Truto:

- Truto logs every unified call. Read the logs in the dashboard, with `GET /log` or with `truto logs`. See [Viewing logs](https://truto.one/docs/guides/logs/viewing-logs/).
- Sync jobs (RapidBridge) read your own unified resources by the name `your-model/resource`. See [Creating a RapidBridge sync job](https://truto.one/docs/guides/rapid-bridge/creating-rapid-bridge/).
- You host no integration code. Your model, mappings and overrides are configuration that Truto runs for every customer.

## What a custom model does not do

- **MCP tools.** On a per-account MCP server, each Proxy API method that has a description is a tool. Your unified model does not add tools there. See [/mcp](https://truto.one/mcp/).
- **Instant changes.** See [Testing and deploying mapping changes](#testing-and-deploying-mapping-changes).
- **Retries.** See [Auth, paging and rate limits](#auth-paging-and-rate-limits).

## What it costs

Building your own unified models is part of the [Pro add-on](https://truto.one/pricing/), $499 a month. The Free plan includes a 30-day trial of Pro. Unified calls cost the same as other API calls, $5 per 100,000, and connections are free. Calls on Truto's managed Google and QuickBooks apps are priced separately. Truto's pre-built unified APIs are a separate add-on, $499 per category a month. See [pricing](https://truto.one/pricing/).

## Next step

Follow the build end to end in [How a Coding Agent Builds Your Own Unified API on Truto](https://truto.one/blog/coding-agent-builds-custom-unified-api-on-truto/), or start with [Creating Unified APIs on Truto](https://truto.one/docs/guides/unified-apis/creating-unified-apis/) in the docs.
