Skip to main content

Insights API

Overview

Audience insights provide in-depth Reports of audience characteristics, interests, and behaviors to give advertisers a deeper understanding of their target audience and create targeted and personalized advertising strategies.

Voter Level Data (VLD) Reports offer insights about targeting in current or prior political Campaigns. These Reports include ad exposure, engagement data, demographic data, and voting-history details, by voter. This section covers the methods and endpoints for managing VLD Reports.

This page covers the various methods and endpoints for insights details and management, as well as Voter Level Data Reports details and management.

Learn more about Audience and VLD Insights with our Help Center articles.

Authentication

Use the following header parameters for all requests:

Headers
Authentication
string required
Authentication bearer token
See Authentication Guide
X-IAA-OW-ID
integer required
Organization Worskpace ID Header

Get Insights Details

Get a List of Insights

GET /api/v3/ins/insights/list

Get a list of insights available in the database.

Query Parameters
searchField
string
Search results by keyword
pageSize
integer
Maximum number of entries per page, default: 20
pageNo
integer
Number of pages for retrieved data
sortBy
string
Sorts by ascending (+) or descending (-), default: -id
Response 200
{
"success": true,
"data": {
"totalRecords": 1,
"filterRecords": 1,
"insightsData": [
{
"id": 123,
"typeId": 1,
"statusId": 2,
"name": "demo_insights",
"sourceId": 123,
"createdAt": 1687848574780
}
]
}
}

Get Campaign Bidding Insights

GET /api/v3/ins/campaign/bid-insights/{campaignId}

Gets the data required for bidding insights of Campaign by Campaign ID in a given date range (2 weeks maximum), along with the rejection reasons and rejection bids per reason. Also gets total wins during the date range.

Path Parameters
campaignId
integer
Campaign ID
Query Parameters
dateRangeStart
integer
Unix epoch timestamp, in milliseconds
dateRangeEnd
integer
Unix epoch timestamp, in milliseconds
Response 200
{
"success": true,
"data": {
"totalRequests": 100,
"rejectionList": {
"campaignSettings": {
"title": "Campaign Settings",
"rejectedBids": 0,
"description": "Campaign is filtered due to Campaign Settings set in the campaign.",
"subReasonInfo": {}
},
"ioBudget": {
"title": "IO Budget",
"rejectedBids": 0,
"description": null,
"subReasonInfo": {}
},
"inventoryTargeting": {
"title": "Inventory Targeting",
"rejectedBids": 0,
"description": "Campaign is filtered due to Inventory Targeting.",
"subReasonInfo": {}
},
"campaignBidPrice": {
"title": "Campaign Bid Price",
"rejectedBids": 0,
"description": "Campaign is filtered because the bid price is lower than the floor price received from the exchange.",
"subReasonInfo": {}
},
"locationTargeting": {
"title": "Location Targeting",
"rejectedBids": 0,
"description": "Campaign is filtered due to Location Targeting.",
"subReasonInfo": {}
},
"deviceTargeting": {
"title": "Device Targeting",
"rejectedBids": 0,
"description": "Campaign is filtered due to Device Targeting.",
"subReasonInfo": {}
},
"creativeSettings": {
"label": "Creative Settings",
"rejectedBids": 100,
"description": "Campaign is filtered due to non-matching creative dimensions found in the request",
"subReasonInfo": {
"creativeDimension": {
"label": "Creative Dimensions",
"droppedRequests": 100,
"description": "Campaign is filtered due to non-matching creative dimensions found in the request."
}
}
},
"advanceTargeting": {
"title": "Advanced Targeting",
"rejectedBids": 0,
"description": null,
"subReasonInfo": {}
},
"audienceTargeting": {
"title": "Audience Targeting",
"rejectedBids": 0,
"description": "Campaign is filtered due to Audience Targeting.",
"subReasonInfo": {}
},
"bidStrategy": {
"title": "Bid Strategy",
"rejectedBids": 0,
"description": "Campaign is filtered due to bid strategy setting applied in campaign.",
"subReasonInfo": {}
},
"campaignBudget": {
"title": "Campaign Budget",
"rejectedBids": 0,
"description": "Campaign is filtered because the campaign budget is now unavailable for further bidding.",
"subReasonInfo": {}
},
"demographicsTargeting": {
"title": "Demographics Targeting",
"rejectedBids": 0,
"description": "Campaign is filtered due to Demographics Targeting.",
"subReasonInfo": {}
},
"undefined": {
"title": "Undefined",
"rejectedBids": 0,
"description": "Campaign is filtered due to Undefined reasons.",
"subReasonInfo": {}
}
},
"topMainReasons": {
"creativeSettings": 100
},
"topSubReasons": {
"creativeDimension": 100
},
"totalBids": 0,
"lostBids": 0,
"totalWins": 0
}
}

Response 422 (invalid start date)

{
"success": false,
"errorObjects": [
{
"error": "Date Range End must be greater than Date Range Start"
}
]
}

Get a List of Eligible Audiences

GET /api/v3/ins/audiences/list

Get a list of eligible audiences which have 10k uniques (minimum).

Query Parameters
searchField
string
Search results by keyword
pageSize
integer
Maximum number of entries per page, default: 20
pageNo
integer
Number of pages for retrieved data
sortBy
string
Sorts by ascending (+) or descending (-), default: -id
Response 200
{
"success": true,
"data": {
"totalRecords": 10,
"filteredRecords": 3,
"insightsData": [
{
"id": 12345,
"audienceName": "audience1",
"matchRate": 58.99,
"uniques": 52432
},
{
"id": 12365,
"audienceName": "audience2",
"matchRate": 78.88,
"uniques": 72786
},
{
"id": 12376,
"audienceName": "audience3",
"matchRate": 34.88,
"uniques": 31122
}
]
}
}

Get Insights Count by Type

GET /api/v3/ins/insights/type-wise-count

Get a count of insights by type ID. See List of Insights Type IDs.

Response 200
{
"success": true,
"data": {
"1": 32,
"3": 20
}
}

Get Matched Audience Details

GET /api/v3/ins/audience/matched/{audienceId}

Get matched audience details by audience ID.

Path Parameters
audienceId
integer
Audience ID
Response 200
{
"success": true,
"data": {
"matchedAudienceData": {
"audienceName": "Data Trust NY 4 Cols",
"matchRate": 90.0,
"uniques": 90,
"createdDate": 1728010319,
"fileTotalCount": 100,
"dataCost": 2.0,
"audienceStatusName": "Ready",
"s3FileName": "1728010319692_DataTrust_NY_4_Cols.csv"
}
}
}

Get Matched Audience File URL

GET /api/v3/ins/audience/matched/download/{audienceId}
Response 200
{
"success": true,
"data": {
"audienceFileUrl": "https://iqm-data-lake-stage.s3.amazonaws.com/CAM-FILES/Client%3D202029/Audience%3D1099461/1728010319692_DataTrust_NY_4_Cols.csv?response-content-disposition=attachment%3Bfilename%3D1728010319692_DataTrust_NY_4_Cols.csv&response-content-type=application%2Foctet-stream&AWSAccessKeyId=ASIAZSYSEW2IDYRQV256&Signature=bg47k4d9Yr6XEp1%2B2AiQpG6UsH8%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEDwaCXVzLWVhc3QtMSJIMEYCIQDZQ0HdONURAdKClNDJtsxRy2Q%2FuhAVl8j8mkg%2BYySOXAIhALLGdASViJ%2BjqGbMUOeNGVzSKJmWlO4Rndg9%2FwYMeFCvKoQECKT%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQAhoMNjU4Nzc4NjY2NjQwIgxTA4EPtZELcoAi5R4q2APj0QWXoTRXCAdw7rbtrcGELFLafSFSWkvl2TlAs%2BIXPNNRwL2y2ymFrmlCOxqFCs9DTWR%2FMRvZMmn7CiN%2ByOPem4C8Rp%2BKE6VSTBeMvQrjQIl1l3S0NxluwzOuBiv%2FA2q0%2F2ehoIPkOOl0ecoghzO8%2FZFVPvVjJkWCnm6c8x2MubJXVYZdiOWd2MHaUmMzsIRlvvl4s30JW9iNnHyOdIyHf6JQ2FbYmKSX4SVEPrv7j7kUv3Vr2iffNE%2BQfGYNtQLr7Yu6yjXpko6N6oZ0BpKsw%2BmwgywN%2FWgPBOQUcwZsexrjBkN9%2BMfRWwOKRS%2F6mn80VYRNV%2F2bA0jDzUBVUmATCjmPFx2tovoveIbb7dwm627ulG0yAkJYx4pvn6OFuFQiZ8YMpWd3e9Hdz44Jm01dGZ%2FluW17THYmmIMOmf3UUSSlxjHm6MuzfULBmspjtAFi5apazS8zUVxwMaK2UfcRkWV%2FQjvziaEHNdaI%2FEStWpzz8E9KRApKtPTsU%2BeXtv2ol1O1Z4GgKOqWRquxqr0qD7rwBX2UjE1Vwp86zcQAxZSj84Uqy%2BqVdh1HUX037Tnpt5DIu9zeHQLHDV2KtH9swuDZyjiNa3z8Mmt%2BSO%2F5wzxOgo8srPyYMIyO3rgGOqQBlVBy4y2GJAjMy2fEyseApwBtfXxXtvcet2hHcTZma1iyMjNL9u92XgsVjHY89iBT4cFAfrTn5c8lswph9%2FKyTm%2FoOQpoxPmkoKD5qs1TCuBFXFXMp4d2Clb%2FUkSmqS01aiEkX1%2FrkAF3klbwrC1%2FUKR6%2BaMAahquyYXskHrlqwBHQ9oizw64rkXNIZeSlbfajnNTVmTkhh3QqyEJw9CYZTNN4hk%3D&Expires=1729596011"
}
}

Insights Management

Create Insights for a Given Audience

POST /api/v3/ins/insights/add

Create an insight Report for a given audience ID.

Request Schema
insightsTypeId
integer
Insights Type ID
sourceIds
integer
Source IDs
Request Sample
{
"insightsTypeId": 1,
"sourceIds": [
567895,
925436,
123677
]
}
Response 200
{
"success": true,
"data": {
"invalidSourceIds": [],
"insightsData": [
{
"id": 1213,
"typeId": 1,
"statusId": 2,
"sourceName": "Data Trust NY 4 Cols",
"name": "Data Trust NY 4 Cols_insights",
"sourceId": 1099461,
"createdAt": 1728366883518
}
]
}
}

Delete Insights Record

DELETE /api/v3/ins/insights/delete

Delete records from the database for valid insights IDs passed.

Query Parameters
insightsIds
string
Comma separated insights IDs to delete
Response 200
{
"success": true,
"data": {
"deletedIds": [
35,
34
],
"invalidIds": [
33,
1
]
}
}

Regenerate Insights Report

POST /api/v3/ins/insights/regenerate/{insightsId}

Regenerates an insights Report if the insight fails.

Path Parameters
insightsIds
string
Comma separated insights IDs to regenerate
Response 200
{
"success": true,
"data": "Insights regenerated successfully."
}

Download Insights Report

POST /api/v3/ins/insights/download

Download insights Report for audience (pdf or xlsx) by passing multipart/form-data format.

Query Parameters
insightsId
integer
Insights ID
fileType
string
File type of Report: pdf or xlsx
Request Schema
customLogoFile
string
Multipart/form-data format
Request Sample
{
"customLogoFile": "string"
}
Response 200
{
"success": true,
"data": {
"insightsReportUrl": "https://domain.com/insights.pdf"
}
}

Send Insights Email

POST /api/v3/ins/send-email

Send an attached insights Report file via email.

Query Parameters
id
integer
Insights ID
attachmentType
string
File type of Report: pdf or xlsx
recipientEmails
string
Comma separated string of emails to send insights Report to, up to 15
Request Schema
file
string
Multipart/form-data format
Request Sample
{
"file": "string"
}
Response 200
{
"success": true,
"data": "Insights-1 pdf email sent successfully."
}

Voter Level Data Reports

VLD Resource Properties

Resource Properties
vldId
integer
VLD ID
vldName
string
VLD name
vldStatus
integer
VLD status type ID
ioId
integer
Insertion Order ID
ioName
string
Insertion Order name
ioTypeId
integer
Insertion Order type ID
vldCreatedOn
integer
Unix epoch timestamp of creation date, in milliseconds
vldStartDate
integer
Unix epoch timestamp of start date, in milliseconds
vldEndDate
integer
Unix epoch timestamp of end date, in milliseconds
campaignId
integer
Campaign ID
campaignName
string
Campaign name
campaignStatus
string
Campaign status type
creativeTypeId
integer
Creative type ID
vldReportCreatable
boolean
Indicates if VLD Report can be generated for the given Campaign and date range (true)
vldChargeableImps
integer
The number of chargeable impressions for the requested VLD Report
vldChargedImps
integer
The number of impressions for which the VLD Report is already generated
vldChargeableCost
integer
Cost to generate the VLD Report
vldChargedCost
integer
Cost of VLD Report that is already generated
fundsAvailable
boolean
Indicates if sufficient funds are available in the advertiser's account to generate the VLD Report (true)
effectiveVldRate
integer
Margin rate set by the admin and workspace for generating VLD Report

Get List of VLD Reports

GET /api/v3/ins/vld-reports

Get a list of VLD Reports based on search filters.

Query Parameters
searchField
string
Search results by keyword
noOfEntries
integer
Maximum number of entries per page, default: 200
pageNo
integer
Number of pages for retrieved data
sortBy
string
Sorts by ascending (+) or descending (-), default: -vldId
Response 200
{
"success": true,
"data": {
"totalRecords": 10,
"vldReportDataList": [
{
"vldId": 10,
"vldName": "530667_VLD_Insights_7",
"campaignName": "prod-campaign-21145",
"campaignId": 21145,
"vldStatusId": 3,
"startDate": 1603152000,
"endDate": 1603411200,
"ioId": 5,
"ioName": "Corporate, Inc.",
"isCampaignEligible": false,
"vldCreatedOn": 1721253632,
"creativeTypeId": 11,
"campaignVldTimezoneId": 29,
"ioTypeId": 1
},
{
"vldId": 9,
"vldName": "530667_VLD_Insights_6",
"campaignName": "Campaign-4949",
"campaignId": 4949,
"vldStatusId": 3,
"startDate": 1603152000,
"endDate": 1603411200,
"ioId": 15,
"ioName": "Quinton for Mayor",
"isCampaignEligible": false,
"vldCreatedOn": 1720325578,
"creativeTypeId": 14,
"campaignVldTimezoneId": 29,
"ioTypeId": 1
}
],
"filteredRecords": 10
}
}

Get List of Campaigns Eligible for VLD Reports

GET /api/v3/ins/vld/campaigns

Get a list of Campaign IDs by status eligible for VLD Report generation.

Response 200
{
"success": true,
"data": {
"running": [
12345,
12543
],
"paused": [
54321,
34521
],
"expired": [
33452,
22453
]
}
}

Generate VLD Report

POST /api/v3/ins/vld-report

This API calculates the cost for the impressions for the Voter Level Data Reports based on the impressions and mark up charged on the organization and then creates the VLD Reports with the following endpoint:

Request Schema
vldStartDate
integer
Unix epoch timestamp of start date, in milliseconds
vldEndDate
integer
Unix epoch timestamp of end date, in milliseconds
campaignId
integer
Campaign ID
Request Sample
{
"campaignId": 12345,
"vldStartDate": 1722311000,
"vldEndDate": 1722315000
}
Response 200
{
"success": true,
"data": {
"vldReportCreated": true,
"campaignId": 1,
"campaignName": "Campaign Name",
"campaignStatus": "running",
"vldStartDate": 1722311000,
"vldEndDate": 1722315000,
"vldChargeableImps": 1000,
"vldChargedImps": 100,
"vldChargeableCost": 1000,
"vldChargedCost": 100,
"fundsAvailable": true
}
}

Get Cost Assessment for VLD Report

POST /api/v3/ins/vld-reports/computation

Calculates the cost for the impressions for the VLD Report based on impressions and the mark up charged on the organization with the following endpoint:

Request Schema
campaignId
integer
Campaign ID
vldStartDate
integer
Unix epoch timestamp of start date, in milliseconds
vldEndDate
integer
Unix epoch timestamp of end date, in milliseconds
Request Sample
{
"campaignId": 1,
"vldStartDate": 1722311000,
"vldEndDate": 1722315000
}
Response 200
{
"success": true,
"data": {
"vldReportCreated": true,
"campaignId": 1,
"campaignName": "Campaign Name",
"campaignStatus": "running",
"vldStartDate": 1722311000,
"vldEndDate": 1722315000,
"vldChargeableImps": 1000,
"vldChargedImps": 100,
"vldChargeableCost": 1000,
"vldChargedCost": 100,
"fundsAvailable": true
}
}

Download VLD Insight Report

POST /api/v3/ins/vld-report/download

Get a download link for a VLD insight Report in CSV or XLSX format.

Request Schema
fileTypeId
integer
File type ID
XLSX: 1
CSV: 2
vldId
integer
VLD ID
Response 200
{
"success": true,
"data": {
"vldReportUrl": "https://tem.domain.s3.amazonaws.com/vld-campaigns/ds/2024-08-20/503481_Insights_1.xlsx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240820T112818Z&X-Amz-"
}
}

Delete VLD Report

DELETE /api/v3/ins/vld-report

Deletes VLD Reports that are not marked as deleted and have a 'failed' status, requires user authorization and checks if the provided VLD IDs are valid. Use the following endpoint:

Query Parameters
vldId
integer
VLD ID
Response 200
{
"success": true,
"data": {
"message": "255944_VLD_Insights_2 deleted successfully"
}
}

Get More Insights Details

Get List of Insights Types

GET /api/v3/ins/static/insights/type/list

Get a list of insights types by ID.

Payment Term IDs
1Audience Insights
3 Voter Level Data
Response 200
{
"success": true,
"data": {
"totalRecords": 2,
"filteredRecords": 2,
"insightsTypeData": [
{
"id": 1,
"name": "audiences",
"label": "Audience Insights",
"order": 1
},
{
"id": 3,
"name": "voter_level_data",
"label": "Voter Level Data",
"order": 3
}
]
}
}

Get List of Insights Status

GET /api/v3/ins/static/insights/status/list

Get a list of insights status types.

Insights Status IDs
1Processing
2Ready
3 Failed
Response 200
{
"success": true,
"data": {
"totalRecords": 3,
"filterRecords": 3,
"insightsStatusData": [
{
"id": 1,
"name": "processing",
"label": "Processing",
"order": 1
},
{
"id": 2,
"name": "ready",
"label": "Ready",
"order": 2
},
{
"id": 3,
"name": "failed",
"label": "Failed",
"order": 3
}
]
}
}