# Data plane

> Source: https://truto.one/docs/cli/data-plane/

Data-plane commands call third-party services **through** Truto using credentials on an integrated account. Every call requires an account ID via `-a, --account` (except `capabilities` when targeting an integration).

## Unified API

Normalized resources across integrations (consistent field names).

```bash
# List CRM contacts
truto unified crm contacts -a <account-id>

# Get one record
truto unified crm contacts <contact-id> -m get -a <account-id>

# Create
truto unified crm contacts -m create -a <account-id> -b '{"first_name":"Jane"}'

# Query params (comma-separated key=value)
truto unified crm contacts -a <account-id> -q "limit=10,status=active"

# Stdin body
echo '{"first_name":"Test"}' | truto unified crm contacts -m create -a <account-id> --stdin
```

**Arguments:** `<model>` (e.g. `crm`, `ats`), `<resource>` (e.g. `contacts`), optional `[id]`

:::callout{type="info"}
Use **unified** when you want Truto's normalized schema across vendors. Use **proxy** for integration-specific fields or APIs not in the unified model.
:::

## Proxy API

Raw integration resources without normalization.

```bash
truto proxy tickets -a <account-id>
truto proxy tickets T-42 -m get -a <account-id>
truto proxy tickets -m create -a <account-id> -b '{"subject":"Bug report"}'

# Custom method → POST /proxy/tickets/custom-action
truto proxy tickets -m custom-action -a <account-id> -b '{"key":"value"}'
```

## Custom API

User-defined custom endpoints on Truto:

```bash
truto custom /my-endpoint -a <account-id>
truto custom /my-endpoint -m POST -a <account-id> -b '{"key":"value"}'
truto custom /my-endpoint -a <account-id> -H "X-Custom-Header=value"
```

## Batch

Multiple operations in one request (same resource format as sync jobs):

```bash
truto batch requests.json

truto batch -b '{"integrated_account_id":"<id>","resources":[
  {"resource":"contacts","method":"list"},
  {"resource":"companies","method":"list"}
]}'

cat batch.json | truto batch --stdin
```

Each entry: `resource`, `method`, optional `query`, `body`, `id`, `persist` (set `persist: true` on proxy resources to include results in the response).

## Capabilities

Discover proxy and unified methods for an integration or account:

```bash
truto capabilities hubspot
truto capabilities <account-id> --methods list,get --resource contacts
```

See [Admin resources — Capabilities](/docs/cli/admin-resources#capabilities).

## Discovering methods on an account

Before calling unified or proxy, list what an account supports:

```bash
truto accounts tools <account-id>
truto accounts tools <account-id> --methods list --tags contacts,deals
```

## Next steps

- [Power features](/docs/cli/power-features) — bulk `export`, `diff`
- [Examples](/docs/cli/examples) — proxy and unified walkthroughs
