Skip to main content

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:

POST
GET
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​

Before you begin​

To upload a Matched audience, the following are required:

  1. An account on the IQM platform
    • See Getting started section to create an account and request a Client ID and Client Secret
  2. CSV or XLSX file for matching
info

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
  • 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.

  1. Log in
    • Optional if you have already logged in and have a token
  2. Get audience request properties
    • Optional if you already know desired/supported columns
  3. Upload a Matched audience
    • Upload the audience with parameters from the previous steps
  4. 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​

POST

To 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.
Request sample
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>'
Response 200
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIn0...",
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiSldUIn0...",
"scope": "read write",
"token_type": "bearer",
"expires_in": 86399
}
More responses
Response 401
{
"success": false,
"errorObjects": [
{
"error": "Bad Credentials or invalid grant type"
}
]
}
Response 403
{
"error": "Client details are not provided."
}

Step 2: Get audience request properties​

GET
GET
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:

ParameterDescription
Audience subtype ID
Healthcare vertical
The Audience subtype ID for the Matched audience being uploaded.
Supported values
1Practitioner
2D2C
3HCP
4NP/PA
5RN
6Patient
Column IDs for matchingA list of Column IDs for matching which correspond to the columns in the file being uploaded.
Data format IDThe Data format ID corresponds to the type of identifiers being uploaded.
Supported values
1Raw
2Hashed (MD5)
3Hashed (SHA1)
4Hashed (SHA256)
5Hashed (SHA512)
6Hashed (other)
Data partner IDThe Data partner ID corresponds to the source of the data being uploaded and is used for reporting purposes.
Supported values
7Healthlink ID
8Data360 ID
10IQVIA ID
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.

Response 200 (column-list)
{
"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​

POST

Create 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.
Supported values
1Practitioner
2D2C
3HCP
4NP/PA
5RN
6Patient
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.
columnMappings object properties
columnId
integer
Column ID.
fileColumnName
string
File column name.
dataFormatId
integer
Data format ID.
Supported values
1Raw
2Hashed (MD5)
3Hashed (SHA1)
4Hashed (SHA256)
5Hashed (SHA512)
6Hashed (other)
dataPartnerId
integer
Data partner ID. Required for HCP audiences and for the Voter ID column combination; omit it for other combinations.
Supported values
7Healthlink ID
8Data360 ID
10IQVIA ID
columnCombinationId
integer required
Column combination ID.

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--
cat > audienceRequest.json <<'EOF'
{"audienceName":"HCP NPI Audience","dataPartnerId":7,"audienceSubtypeId":3,"columnCombinationId":14,"fileRowCount":1200,"fileColumnCount":1,"columnMappings":[{"columnId":18,"fileColumnName":"NPI_ID"}]}
EOF

curl -X POST https://api.iqm.com/api/v3/audience/matched \
-H "Authorization: Bearer 0ed52da8-24ab-44b1-bc88-7ea03a090d24" \
-H "X-IAA-OW-ID: <owId>" \
-F 'audienceRequest=@audienceRequest.json;type=application/json' \
-F 'file=@/path/to/hcp-npi-list.csv;type=text/csv'
Response 200
{
"success": true,
"data": {
"audienceId": 1183883,
"message": "HCP NPI Audience audience created successfully"
}
}

Step 4: Check audience status​

GET

Before 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.
Supported values
1Practitioner
2D2C
3HCP
4NP/PA
5RN
6Patient
audienceStatusId
integer
Audience status ID.
Supported values
1Processing
2Pending
3Ready
4Rejected
5Deleted
6Failed
7Fetching data
8Data fetched
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.
columnMappings object properties
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
Stored name of the uploaded file.
s3Url
string
S3 location of the uploaded file.
fileRowCount
integer
Number of rows in the uploaded file.
matchRate
number
Percentage of file records that were matched. Returned once the file is matched.
dataPartnerId
integer
Data partner ID. Returned only when a data partner was set.
Supported values
7Healthlink ID
8Data360 ID
10IQVIA ID
modifiedAt
string
Last modified date (ISO 8601 format).
approvalAccess
boolean
Indicates if the user can approve or reject the audience.
editAccess
boolean
Indicates if the user has edit access for the audience.
Response 200
{
"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
}
}
Have a question?
Was this page helpful?