Skip to main content

Trade Desk & Index Exchange Integration

AudienceGPT supports two major programmatic advertising platforms beyond LiveRamp: The Trade Desk (API-based segment management) and Index Exchange (file-based segment uploads). This guide covers setup, credentials, naming formats, and activation workflows for both platforms.


Trade Desk

Overview

The Trade Desk integration uses the Taxonomy Provider API v3 to create, update, and deactivate audience segments on The Trade Desk marketplace. Authentication uses a Bearer token (API key) rather than OAuth.

Prerequisites

  1. A Trade Desk Partner account with Taxonomy Provider access
  2. An API key from the Trade Desk partner portal
  3. Your Provider ID (identifies your data provider account)
  4. Optionally, a Brand ID for Data Alliance connections (e.g. "dav2delvrai")
  5. The activations auth scope in AudienceGPT

Connection Configuration

Create an outbound connection with the following settings:

FieldValueDescription
Namee.g. "Trade Desk Production"Display name
PlatformtradedeskPlatform identifier
DirectionoutboundPush destination
Auth TypebearerUses API key as Bearer token

Credentials

CredentialDescription
api_keyTrade Desk API key (used as Bearer token)
provider_idYour Trade Desk Provider ID
brand_id(Optional) Brand ID for Data Alliance connections

Connection Config (JSONB)

Config KeyTypeDefaultDescription
api_base_urlstringhttps://partners.thetradedesk.com/api/v3Trade Desk API base URL
default_cpmnumber--Default CPM price for segments
currencystring"USD"Currency code

Example Configuration

{
"api_base_url": "https://partners.thetradedesk.com/api/v3",
"default_cpm": 3.00,
"currency": "USD"
}

Authentication

All Trade Desk API requests use a simple Bearer token:

Authorization: Bearer <api_key>
Content-Type: application/json

No OAuth flow is needed -- the API key is sent directly with each request.

Segment Operations

Create Segment

POST /taxonomy/segment

Request body:

{
"ProviderId": "your-provider-id",
"SegmentName": "Business Technology > Cloud Computing > AWS Migration",
"Description": "Professionals actively researching AWS cloud migration...",
"BuyableStatus": true,
"Cpm": 3.00,
"Currency": "USD"
}

If a brand_id is configured, a BrandId field is included automatically.

Key constraints:

FieldLimitNotes
SegmentName255 charactersTruncated automatically
Description500 charactersTruncated automatically

Update Segment

PUT /taxonomy/segment

The update body includes ProviderId, SegmentId, SegmentName, Description, and optionally BrandId and Cpm.

Deactivate Segment

PUT /taxonomy/segment

Deactivation sends BuyableStatus: false along with ProviderId and SegmentId.

Get Segment

The Trade Desk API returns segments in a hierarchical tree structure. AudienceGPT searches the tree recursively to find a specific segment by ID:

GET /providers/{providerId}/segments

Koa NLP-Optimized Naming

Trade Desk's Koa AI platform processes segment names using NLP to help buyers find relevant audiences. The default Trade Desk output template generates names optimized for Koa discovery:

Parent Category > Subcategory > Topic Name

For example:

Business Technology > Cloud Computing > AWS Migration Services
Koa Optimization Tips
  • Lead with the most specific topic information
  • Avoid abbreviations that Koa may not recognize
  • Include relevant category context for disambiguation
  • Keep names descriptive but under the 255-character limit

Description Format

Trade Desk descriptions have a 500-character limit -- more generous than LiveRamp's 245 characters. Descriptions are generated from configurable templates and include segment-type-aware prefixes (B2B/B2C).

Testing the Connection

The test endpoint verifies the API key and Provider ID by fetching the provider's segment tree:

GET /providers/{providerId}/segments

A successful response confirms authentication and provider access.

Retry Behavior

SettingValue
Max retries3
BackoffExponential (1s, 2s, 4s)
API timeout30 seconds
Retried errors429 (rate limit), 5xx (server errors)

Index Exchange

Overview

Index Exchange uses a file-based integration model. Unlike Trade Desk and LiveRamp, which have REST APIs for segment management, IX segments are registered and updated by uploading file pairs (metadata JSON + gzipped data) via SFTP or S3.

Prerequisites

  1. An Index Exchange account with audience upload access
  2. SFTP credentials (host, username, password) or S3 access (bucket, IAM role ARN)
  3. Your IX Account ID and Advertiser Account ID
  4. Knowledge of the match key type for your data (IP, URL, device ID, etc.)

Connection Configuration

FieldValueDescription
Namee.g. "Index Exchange SFTP"Display name
PlatformindexexchangePlatform identifier
DirectionoutboundPush destination
Auth TypeheaderUses SFTP credentials

Credentials (SFTP)

CredentialDescription
sftp_hostSFTP server hostname
sftp_usernameSFTP username
sftp_passwordSFTP password
sftp_port(Optional) SFTP port, defaults to 22

Connection Config (JSONB)

Config KeyTypeDescription
account_idstringIX account ID (used as ownerAccount_id in meta files)
advertiser_account_idstringAdvertiser account ID for meta files
match_keystringMatch key type: ip, url, deviceid, uid, appbundle, contentid, or postalcode
upload_methodstringsftp or s3
s3_bucketstring(S3 only) S3 bucket name
s3_role_arnstring(S3 only) IAM role ARN for S3 access
default_cpmnumberDefault CPM price
currencystringCurrency code

Example Configuration (SFTP)

{
"account_id": "12345",
"advertiser_account_id": "67890",
"match_key": "ip",
"upload_method": "sftp",
"default_cpm": 1.50,
"currency": "USD"
}

Example Configuration (S3)

{
"account_id": "12345",
"advertiser_account_id": "67890",
"match_key": "deviceid",
"upload_method": "s3",
"s3_bucket": "my-ix-uploads",
"s3_role_arn": "arn:aws:iam::123456789:role/ix-upload-role",
"default_cpm": 1.50,
"currency": "USD"
}

File Format

Each segment upload consists of two files:

Meta File (JSON)

The meta file follows IX's v1.2 schema:

{
"meta_version": "1.2",
"audienceName": "Technology > Cloud Computing > AWS Migration",
"audienceID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"advertiserAccount_id": "67890",
"ownerAccount_id": 12345,
"exportTimestamp": "2026-02-25 14:30:00"
}

Data File (Gzip)

The data file contains one match-key value per line, gzip-compressed:

192.168.1.1
10.0.0.1
172.16.0.1

The file is uploaded to a folder determined by the match_key configuration.

Segment Lifecycle

Index Exchange segments work differently from API-based platforms:

OperationHow It Works
CreateUpload meta JSON + data .gz to SFTP/S3
UpdateUpload new files with the same audienceID
DeactivateStop refreshing data files; segments expire naturally
Get statusNot available via API; tracked internally by AudienceGPT
Natural Expiration

IX segments expire when data files are not refreshed. There is no explicit deactivation API. Ensure your refresh schedule keeps segments active.

Match Key Types

The match key determines which SFTP folder receives the uploaded files:

Match KeyDescriptionExample Values
ipIP addresses192.168.1.1
urlPage URLshttps://example.com/page
deviceidMobile device IDs (IDFA/AAID)A1B2C3D4-E5F6-...
uidUser IDs / cookiesuser_abc123
appbundleApp bundle identifierscom.example.app
contentidContent identifiersarticle_12345
postalcodePostal/ZIP codes10001

Testing the Connection

The connection test validates that all required fields are present:

  • SFTP host is configured
  • SFTP username and password are provided
  • Account ID and Advertiser Account ID are set
note

A full SFTP connectivity test (establishing an SSH connection) is planned for a future release. Current validation ensures configuration completeness.


Shared Concepts

Push Workflow

Both Trade Desk and Index Exchange follow the same client-orchestrated push architecture used by all AudienceGPT outbound connections:

  1. Create push run -- POST /api/connections/{id}/push/run
  2. Push batches -- POST /api/connections/{id}/push/run/{runId}/push (25 segments per batch)
  3. Poll status -- GET /api/connections/{id}/push/run/{runId}/status

Stale Detection

Stale detection works identically for all platforms. The system compares:

  • Pushed name vs. the current template-generated name for the connection's output template
  • Engine version at push vs. the topic's current engine version

Stale segments appear in the Data Hygiene dashboard (/hygiene) and can be refreshed individually or in bulk.

Output Templates

Both Trade Desk and Index Exchange naming formats are driven by configurable output templates. Administrators can customize path fields, separators, description templates, and character limits via Admin > Output Templates.

See the Output Templates admin guide for full customization options.


Troubleshooting

Trade Desk Errors

ErrorCauseResolution
Trade Desk returned 401Invalid API keyVerify the API key in connection credentials
Trade Desk returned 403Insufficient permissionsEnsure your account has Taxonomy Provider access
Failed to create Trade Desk segment: 400Invalid request bodyCheck Provider ID and segment data
Trade Desk API did not return a segment IDUnexpected API responseThe API response format may have changed; check Trade Desk documentation

Index Exchange Errors

ErrorCauseResolution
SFTP host is requiredMissing configurationSet the sftp_host in connection credentials
SFTP username is requiredMissing credentialProvide SFTP username
IX account ID is requiredMissing configSet account_id in connection config
Advertiser account ID is requiredMissing configSet advertiser_account_id in connection config

General Push Errors

ErrorCauseResolution
Duplicate name already active on connectionName collisionTwo topics generated the same platform name; review template output
Connection not foundInvalid connection IDVerify the connection exists and belongs to your organization
Run is completed, cannot pushStale runCreate a new push run

API Reference

EndpointMethodDescription
/api/connectionsPOSTCreate a TTD or IX connection
/api/connections/{id}GET/PUT/DELETEManage connection
/api/connections/{id}/testPOSTTest connection
/api/connections/{id}/push/runPOSTStart push run
/api/connections/{id}/push/run/{runId}/pushPOSTPush next batch
/api/connections/{id}/push/run/{runId}/statusGETPoll run status
/api/activationsGETList activations
/api/activations/{id}/deactivatePOSTDeactivate segment
/api/activations/{id}/refreshPOSTRefresh stale segment

For complete request/response schemas, see the API Reference.