What are Unified APIs?
A Unified API gives you one request shape, GET /unified/<api>/<resource>?integrated_account_id=<id>, for every integration that supports it. Instead of learning each platform's API, authentication and data format, you call one API, and Truto translates the call for the platform behind the integrated account.
Skip the reading — fast path for coding agents
truto unified crm contacts -a <integrated_account_id>
/skill truto
What a Unified API does
- Data normalization: Data from different platforms comes back in one format. For example, "leads" from Salesforce, HubSpot, and Pipedrive all get transformed into one standard schema. All kinds of APIs like REST, SOAP, GraphQL are abstracted to use only REST.
- Authentication: Whether a platform uses OAuth, OAuth 2.0, API keys, or basic authentication, Truto handles it, so you call one API for every platform your customers connect.
- Error mapping: Instead of handling different error messages from each platform, you get errors in one consistent shape.
- Multi-resource support: Manage entities like users, tickets, campaigns, or audiences across multiple providers through one common interface.
Real-time by default
Truto's Unified APIs call the provider live on every request, and Truto keeps no copy of the data unless you ask for one with a sync job or SuperQuery. Realtime data model covers what live calls mean for rate limits, filters and latency.
How a Unified API is structured
A Unified API handles the differences between platforms in four parts.
1. Abstraction layer
What Is It?
The abstraction layer converts each platform's API into one common format that your application understands.
What Happens Here?
-
Normalization of Resources:
Different platforms represent similar data in various ways. For instance, Salesforce might use "Leads," HubSpot uses "Contacts," and Pipedrive has "Persons." The abstraction layer converts all these into a single, unified "Lead" object, so you don’t have to juggle different terminologies. -
Data Transformation:
Platforms return data in different shapes. This layer formats a response from Google Ads, Zendesk, or LinkedIn the same way.
Example:{ "id": "0012w000024KwDeAAK", "name": "Truto", "city": "Bangalore" }This standardized format makes it easier to work with data from any integrated platform.
-
Error Normalization:
Each platform has its own set of error codes and messages. The abstraction layer returns them in one format, with the provider's own body kept inraw_response. See Errors.
Example:{ "statusCode": 400, "error": "Bad Request", "message": "Invalid request. The field 'xyz' is not supported.", "truto_is_remote_error": true, "raw_response": { "errorCode": "INVALID_FIELD", "message": "Invalid request. The field 'xyz' is not supported." } }
2. Connectors
What Are They?
Connectors are specialized adapters that link the Unified API to each individual platform. They handle the request and response details of talking to each one.
What Happens Here?
-
Authentication Management:
Each platform may use different authentication methods like OAuth, API keys, or basic authentication. Connectors handle each one.
Example:
Truto’s connector for Salesforce handles OAuth token retrieval and refreshing automatically. -
Platform-Specific Requests:
When you make a request through the Unified API, connectors translate it into the specific format required by each platform’s API.
Example:- Unified API Request:
GET /unified/crm/accounts - Salesforce API Call:
GET /services/data/v57.0/query(a SOQL query onAccount)
- Unified API Request:
3. Sync jobs for historical data
What Are Sync Jobs?
While real-time data is essential, there are times when you need to work with historical data or perform large data imports. Sync jobs handle these scenarios.
What Happens Here?
-
Initial Data Imports:
When you first set up your integration, sync jobs import your existing data in bulk.
Example:
Importing all past leads from HubSpot into your unified CRM system during onboarding. -
Periodic Reconciliation:
Sync jobs can run on a schedule to keep a copy of the data consistent with the source.
Example:
Monthly syncs between your CRM and marketing platforms to reconcile any discrepancies. -
Complementing Real-Time Operations:
Sync jobs work alongside real-time interactions, providing a complete picture by combining current and historical data.
Example:
Having both live campaign data and historical performance metrics available for analysis.
4. Security layer
What Is It?
The security layer protects data in transit and the credentials Truto holds for each integrated account.
What Happens Here?
-
Data Encryption:
Calls between your application and Truto are encrypted in transit with TLS.
Example:
When you send a request to Truto, the data is encrypted during transit, safeguarding it from potential breaches. -
Token Management:
The security layer handles and refreshes authentication tokens for every integrated account.
Example:
Truto ensures OAuth tokens are stored and refreshed securely without exposing sensitive credentials. -
Access Control:
Only authorized users and systems can access or modify your data. Strict access controls prevent unauthorized access and ensure data integrity.
Example:
Every Unified API call needs an API token, and a token can access only its own environment.
Unified APIs in action
Here is one request through all four parts. Your customers run ad campaigns on Google Ads, Meta and LinkedIn, and you want each customer's campaigns in one format:
-
Unified API Request
You make the same request for each customer's integrated account, changing only theintegrated_account_id:GET /unified/ads/campaigns?integrated_account_id=<integrated_account_id> -
Abstraction Layer in Action
Truto’s abstraction layer normalizes the request and prepares it for that account's platform. -
Connectors Translate the Request
- For Google Ads:
POST /v25/customers/{customer_id}/googleAds:search - For Meta Ads:
GET /v18.0/{adaccount_id}/campaigns - For LinkedIn Ads:
GET /rest/adAccounts/{ad_account_id}/adCampaigns?q=search
- For Google Ads:
-
Real-Time Data Fetching
Each call goes live to that account's platform, so you receive the most current campaign data. -
Sync Jobs Keep a Copy Current
The Ads Unified API has no unified webhooks. To pick up campaign changes and keep historical campaign data, schedule a sync job that lists campaigns on acronschedule. -
Security Layer Protects Your Data
All data transfers are encrypted, and only authorized users can access or modify campaign information. -
Error Handling
If LinkedIn returns an error, Truto returns it in its standard error shape:{ "statusCode": 400, "error": "Bad Request", "message": "Invalid request. The field 'xyz' is not supported.", "truto_is_remote_error": true, "raw_response": { "status": 400, "message": "Invalid request. The field 'xyz' is not supported." } } -
Response Mapping for Consistency
Each campaign from LinkedIn is transformed into Truto’s unified format:{ "id": "67890", "name": "Holiday Campaign", "status": "active" } -
Final Response to Your Application
Each account's call returns a list in the same shape, with the provider's raw record inremote_data:{ "result": [ { "id": "67890", "name": "Holiday Campaign", "status": "active", "remote_data": { "id": 67890, "name": "Holiday Campaign", "status": "ACTIVE" } } ], "next_cursor": null, "result_count": 1 }Your application combines each account's
resultinto one list of campaigns.
Next
Install a Unified API in your environment, then call it for an integrated account. Unified API request flow shows each step Truto runs for the call.
curl "https://api.truto.one/unified/crm/contacts?integrated_account_id=<integrated_account_id>" \
-H 'Authorization: Bearer <API token>'truto unified crm contacts -a <integrated_account_id>