# Audiences

4 LinkedIn Ads tools, each with its inputs, hosted support and CLI command.

## upload_audience_csv

Cleans a CSV and uploads it as a matched audience. It normalizes column names, drops non-matcher columns, hashes emails, and converts company domains to website URLs. Contact and company lists are both supported.

Clean a CSV at csvPath and upload it as a matched-audience DMP segment. Auto-detects contact (email) vs company (account) lists, normalizes column names, drops non-matcher columns, hashes emails, and converts company domains to website URLs. Requires the Audiences product; matching takes up to 48h.

LinkedIn Ads. Local only. Reads a CSV path on the server, not on your machine.

CLI:

```
adwarp audience upload -n <name> -f <csv> [-t contact|company]
```

| Input | Type | What it is |
| --- | --- | --- |
| `accountId` | string |  |
| `name` (required) | string |  |
| `csvPath` (required) | string | Path to the CSV file on the server |
| `type` | contact \| company | Force the list type; auto-detected if omitted |

## audience_from_salesforce

A SOQL query to a matched audience. See [Salesforce](./salesforce.md).

Build a matched audience from a Salesforce SOQL query that selects an email column. Closes the loop: flagged accounts/contacts -> DMP segment. Requires the local `sf` CLI to be authenticated.

LinkedIn Ads. Local only. Needs your local `sf` CLI.

CLI:

```
adwarp audience from-salesforce -n <name> -q "<SOQL>" [--email-field <column>]
```

| Input | Type | What it is |
| --- | --- | --- |
| `accountId` (required) | string |  |
| `name` (required) | string | Audience/segment name |
| `soql` (required) | string | SOQL selecting an email column, e.g. SELECT Email FROM Contact WHERE ... |
| `emailField` | string | Email column name if not 'Email' |

## audience_from_hubspot

A HubSpot list, or a CRM search by property filters, to a matched audience of contacts or companies. Pass `dryRun` first to see the counts and a masked sample. Local only. See [HubSpot](./hubspot.md).

Build a matched audience from HubSpot contacts or companies. Pass exactly 1 source: a HubSpot listId (its members), or filters for a CRM search (all ANDed). Reads every page, cleans the records like a CSV upload, and uploads only SHA256 email hashes for contacts (name and website for companies). Pass dryRun=true first: it returns counts and a masked sample and uploads nothing. Needs a HubSpot private app token on this machine (ADWARP_HUBSPOT_TOKEN or ~/.adwarp/hubspot.json); matching takes up to 48h.

LinkedIn Ads. Local only. Not registered on the hosted endpoint. Run it on the local MCP server or the CLI.

CLI:

```
adwarp audience from-hubspot -n <name> (--list <id> | --filter <prop>:<op>:<value> ...) [-t contact|company] [--dry-run]
```

| Input | Type | What it is |
| --- | --- | --- |
| `accountId` | string | LinkedIn ad account id; defaults to config defaultAccountId |
| `name` (required) | string | Audience/segment name |
| `type` | contact \| company | contact or company. With listId it defaults to the list's object type; with filters it defaults to contact. |
| `listId` | string | HubSpot list id (the ILS list id). Pass this or filters, not both. |
| `filters` | object[] | CRM search filters, all ANDed (HubSpot allows up to 6 per group). Pass this or listId, not both. |
| `dryRun` | boolean | Return counts and a masked sample without uploading anything |

## get_audience_status

Matching status and resolved size.

Check a DMP segment's matching status and resolved size.

LinkedIn Ads. Hosted.

CLI:

```
adwarp audience status <segmentId>
```

| Input | Type | What it is |
| --- | --- | --- |
| `segmentId` (required) | string |  |

Canonical page: https://adwarp.dev/docs/tools/audiences
Last updated: 2026-10-18
