Upload a Matched audience
Upload a Matched audience with this in-depth tutorial using IQM's API.
Get started uploading a Matched audience with the following endpoints:
POSTGET
POST
GET
About IQM Matched audience
The Audience API allows you to upload an audience for matching in XLSX or CSV format. Once uploaded and processed, the Matched audience can be used for advertising campaign targeting.
More resources
- Matched audience Help Center article
- Audience API guidelines
Before you begin
To upload a Matched audience, the following are required:
- An account on the IQM platform
- See Getting started section to create an account and request a Client ID and Client Secret
- CSV or XLSX file for matching
File requirements for audience matching:
- CSV or XLSX file for audience matching with maximum 1GB or 5M records
- Without Voter ID / Email / Phone / Address in the file
- One of the following system field combinations is required for matching
- First Name, Last Name, Zip, State
- Last Name, Street Address, Zip, State
- Street Address, Zip, State
- Other fields are optional and can be added along with the above fields
- One of the following system field combinations is required for matching
- With Voter ID / Email / Phone / Address in the file
- Only one of these fields is required - Voter ID or Email or Phone, or Address. The preferred format for full address is Street, City, Zip, and State
- Other fields are optional and can be added along with one of the above fields
- Healthcare audiences match on other identifiers, such as NPI, phone, or email. To see the column combinations available for your audience type, use Matched column combinations
Upload a Matched audience using the IQM API
This tutorial covers how to create a Matched audience.
The minimum requirements to perform this task are: logging in with authentication credentials, selecting columns for matching, and uploading an audience. Once these steps are accomplished, more can be learned about IQM's API through the guidelines pages.
- Log in
- Optional if you have already logged in and have a token
- Get audience request properties
- Optional if you already know desired/supported columns
- Upload a Matched audience
- Upload the audience with parameters from the previous steps
- Check audience status
- A Matched audience requires processing and approval before it can be used for targeting
Authentication
Use the following header parameters for all requests after logging in:
| Headers | |
|---|---|
Authorization string required | Bearer followed by the access_token from the login response. See Sign up and authenticate. |
X-IAA-OW-ID integer required | Organization Workspace ID header. |
Step 1: Log in
POSTTo log in, send the Authorization: Basic header with your Base64-encoded Client ID and Client Secret, and send the request body as form data (application/x-www-form-urlencoded). The response contains an OAuth access token.
To find the Organization Workspace IDs that you have access to, use Get list of accessible Organizations.
For further information see OAuth token.
| Headers | |
|---|---|
Authorization string required | Basic followed by your Base64-encoded client_id:client_secret. See Sign up and authenticate. |
Content-Type string required | application/x-www-form-urlencoded. Send the request body as form data. |
| Request schema | |
|---|---|
grant_type string required | password for login. See OAuth Grant Types. |
username string required | User account email. |
password string required | User account password. |
- JSON
curl -i --location 'https://api.iqm.com/api/v3/ua/oauth/token' \
--header 'accept: application/json, text/plain, */*' \
--header 'Authorization: Basic <base64 of client_id:client_secret>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username=user@iqm.com' \
--data-urlencode 'password=<your password>'
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIn0...",
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiSldUIn0...",
"scope": "read write",
"token_type": "bearer",
"expires_in": 86399
}
More responses
{
"success": false,
"errorObjects": [
{
"error": "Bad Credentials or invalid grant type"
}
]
}
{
"error": "Client details are not provided."
}
Step 2: Get audience request properties
GETGET
GET
GET
GET
To upload a Matched audience, you need to gather some information about your audience and file to fill in the required parameters for the upload endpoint. These include:
| Parameter | Description |
|---|---|
| Audience subtype ID Healthcare vertical | The Audience subtype ID for the Matched audience being uploaded. |
| Column IDs for matching | A list of Column IDs for matching which correspond to the columns in the file being uploaded. |
| Data format ID | The Data format ID corresponds to the type of identifiers being uploaded. |
| Data partner ID | The Data partner ID corresponds to the source of the data being uploaded and is used for reporting purposes. |
| Column combination ID All verticals | The Column combination ID corresponds to the combination of columns being used for matching. |
The column-list, data-partners, and column-combinations endpoints require the audienceTypeId query parameter (1 for Matched audiences), and accept an optional audienceSubtypeId for Healthcare subtypes. For example, GET /api/v3/audience/static/column-list?audienceTypeId=1 returns the columns shown in the response sample. Each column's dataFormatIds lists the data formats it accepts; columns without dataFormatIds don't take a dataFormatId.
- JSON
{
"success": true,
"data": [
{
"id": 1,
"name": "Voters_ID",
"order": 1,
"displayName": "Voter ID"
},
{
"id": 2,
"name": "Email",
"order": 3,
"displayName": "Email",
"dataFormatIds": [1, 2, 3, 4, 5, 6]
},
{
"id": 5,
"name": "Voters_FirstName",
"order": 6,
"displayName": "First Name"
}
]
}
Step 3: Upload a Matched audience
POSTCreate a Matched audience by uploading a file with user data. The metadata is sent as a JSON string in the audienceRequest form data field, and the file is uploaded as multipart/form-data in the file form data field.
| Request schema | |
|---|---|
audienceRequest form data required | Audience metadata details. |
file multipart/form-data required | File to be uploaded. |
audienceRequest properties
audienceName string required | Audience name. | |||||||
fileRowCount integer required | Number of rows in the file. | |||||||
fileColumnCount integer required | Number of columns in the file. | |||||||
audienceSubtypeId integer | Audience subtype ID. Healthcare audiences only. Omit it for Political audiences, which don't support subtypes. | |||||||
consentGiven boolean | Confirms that patients consented to the use of their data. Must be true for the Healthcare Patient subtype (6). Omit it for every other subtype. | |||||||
columnMappings array of objects required | Array of column mapping objects. | |||||||
| ||||||||
columnId integer | Column ID. |
fileColumnName string | File column name. |
dataFormatId integer | Data format ID. |
dataPartnerId integer
columnCombinationId integer required
audienceRequest sample object for Political Matched audience
{
"audienceName": "matched-audience-example-fs",
"fileRowCount": 5,
"fileColumnCount": 1,
"columnMappings": [
{
"columnId": 1,
"fileColumnName": "l2-voter-id"
}
],
"dataPartnerId": 2,
"columnCombinationId": 1
}
audienceRequest sample object for Healthcare Matched audience
{
"audienceName": "Revamped Healthcare Matched Audience 02",
"dataPartnerId": 7,
"audienceSubtypeId": 3,
"columnMappings": [
{
"columnId": 18,
"fileColumnName": "NPI_ID"
}
],
"fileRowCount": 19,
"fileColumnCount": 1,
"columnCombinationId": 14
}
POST /api/v3/audience/matched HTTP/1.1
Host: api.iqm.com
Authorization: Bearer 0ed52da8-24ab-44b1-bc88-7ea03a090d24
X-IAA-OW-ID: <owId>
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="audienceRequest"
Content-Type: application/json
{"audienceName":"HCP NPI Audience","dataPartnerId":7,"audienceSubtypeId":3,"columnCombinationId":14,"fileRowCount":1200,"fileColumnCount":1,"columnMappings":[{"columnId":18,"fileColumnName":"NPI_ID"}]}
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="hcp-npi-list.csv"
Content-Type: text/csv
[Binary CSV file data]
------WebKitFormBoundary7MA4YWxkTrZu0gW--
{
"success": true,
"data": {
"audienceId": 1183883,
"message": "HCP NPI Audience audience created successfully"
}
}
Step 4: Check audience status
GETBefore the audience can be used for campaign targeting it has to be processed and approved. Once the audienceStatusId is 3 (Ready), the audience can be targeted. Use the audienceId returned in the last step with this endpoint to get audience details.
For further information see Matched audience details.
| Path parameters | |
|---|---|
audienceId integer required | Matched audience ID. |
Response properties
audienceId integer | Audience ID. | ||||||
audienceName string | Audience name. | ||||||
audienceTypeId integer | Audience type ID. Always 1 (Matched audience). | ||||||
audienceSubtypeId integer | Audience subtype ID. Returned only for Healthcare audiences. | ||||||
audienceStatusId integer | Audience status ID. | ||||||
cpm number | Data cost (CPM) charged if the audience is used in a campaign. | ||||||
owId integer | Organization Workspace ID of the audience owner. | ||||||
createdByUowId integer | Created by User Organization Workspace ID. | ||||||
createdAt integer | Unix epoch creation date, in milliseconds. | ||||||
reach integer | Audience reach (matched unique users). 0 until the file is matched. | ||||||
columnMappings array of objects | Mappings between the file's columns and matching columns. | ||||||
| |||||||
columnId integer | Column ID. |
fileColumnName string | Column name in the uploaded file. |
dataFormatId integer | Data format ID of the column values. null for columns that don't take a data format. |
s3FileName string
s3Url string
fileRowCount integer
matchRate number
dataPartnerId integer
modifiedAt string
approvalAccess boolean
editAccess boolean
- JSON
{
"success": true,
"data": {
"audienceId": 1183883,
"audienceName": "HCP NPI Audience",
"audienceTypeId": 1,
"audienceSubtypeId": 3,
"audienceStatusId": 2,
"cpm": 0.0,
"owId": 204995,
"createdByUowId": 298904,
"createdAt": 1793041168166,
"reach": 0,
"columnMappings": [
{
"columnId": 18,
"fileColumnName": "NPI_ID",
"dataFormatId": null
}
],
"s3FileName": "1793041168171_hcp-npi-list.csv",
"s3Url": "s3://<bucket>/AUDIENCE/UPLOAD/HCP/Client=204995/Audience=1183883/1793041168171_hcp-npi-list.csv",
"fileRowCount": 5,
"dataPartnerId": 7,
"modifiedAt": "2026-10-26T18:59:36.081+00:00",
"approvalAccess": false,
"editAccess": true
}
}