Skip to main content
This guide shows you how to build an automated integration that uploads an audience to Narrative and delivers it to The Trade Desk (TTD). Everything here runs unattended: a person signs in once to create an API key, and the integration uses that key from then on. For the connector’s full settings reference, identifier requirements, and status vocabularies, see The Trade Desk Connector.

Choose a delivery model first

The Trade Desk Connector supports two delivery models, and the choice changes almost every step below. First-party delivers into one advertiser’s own TTD seat: light setup, no taxonomy, no metering, and no further control once the data lands. Third-party lists your audience in TTD’s marketplace: a taxonomy that TTD reviews before anything activates, pricing per element, and usage reporting from TTD. Read First-party and third-party delivery before you commit, because third-party setup is measured in weeks and first-party in minutes. The rest of this guide covers third-party delivery and notes where first-party differs.

Prerequisites

Before you begin, you need:
  • An API key, created under Settings → API Keys with read and write on datasets, uploads, connections, jobs, mappings, attributes, and installations. See API Keys for the procedure and the Permissions Reference for what each resource covers.
  • A TTD Brand ID, from your Trade Desk account representative or your Narrative relationship manager. Both delivery models require it — it identifies your organization to TTD and is stored on your connector profile.
  • For first-party delivery only, the Advertiser ID and secret key of the receiving seat, from whoever owns it.
Two things to know about the key. Create it from a shared team account rather than a personal login, so your integration does not break when someone changes roles. And keys expire in at most 365 days, so plan on annual rotation.

Two hosts

Audience data lives on the main Narrative API. Taxonomy management lives on the Trade Desk connector’s own service. Both accept the same credential: Authorization: Bearer <your API key>. Confirm both before you build anything:
Both must return your company ID.
API keys contain characters that shells mangle. Read the key from a file or an environment variable rather than pasting it inline.

1. Create the dataset

Your schema decides whether The Trade Desk will accept the audience, so settle it before you upload anything. The dataset must carry at least one identifier the connector recognizes, and each one is an object with a value property inside it. See Supported identifiers for the full list.
write_mode is overwrite or append. file_config.type is json for JSON Lines, parquet, or flat for CSV. Both fields are required. The dataset comes back pending. Record its ID.
You do not need to supply UID2. The connector generates UID2 tokens from hashed email addresses automatically.

2. Activate the dataset

Activation locks the schema. You cannot change it afterward, so activate only once the shape is settled.

3. Upload your file

Request an upload URL, then send the file straight to storage:
The upload URL is valid for 30 minutes and carries its own signature, so send no authorization header with the PUT.
Keep the path from the response. Narrative assigns its own storage path, which will not match the one you requested, and the next step needs Narrative’s path rather than yours.

4. Ingest the file

Ingestion runs in the background. Watch the record count on the dataset to know when it has finished:
The count moves from zero to your row count, typically within a couple of minutes.

5. Confirm The Trade Desk accepts the dataset

Look for {"app_id": 11, "interface_id": "third_party_v2"} in the accepted list. third_party_v2 is the interface to target for new third-party integrations — see Delivery interfaces for the alternatives and why. If TTD appears under rejected instead, the response tells you what is missing:
That is a schema problem. Because the schema is locked at activation, fixing it means creating a new dataset. This endpoint returns 404 until the dataset is activated.

Mapping identifiers

Mapping your identifier column to a Rosetta Stone attribute is not required for The Trade Desk to accept the dataset — acceptance is decided by your schema alone. Map anyway: normalized attributes make the dataset usable across other destinations and Narrative features. Mapping needs a data sample first:
value is a reserved keyword in mapping expressions, so quote it. Attribute IDs for the common mobile identifiers: mobile_id_unique_identifier is 68, apple_idfa is 69, android_advertising_id is 70.

6. Find your connector profile

Your profile holds your Brand ID and backs every delivery.
Record the profile ID. Its status must be enabled. If you have no profile yet, create one in the Narrative UI under Objects → Installed Apps → Trade Desk Connector and enter your Brand ID there.

7. Build your taxonomy

Third-party only. Skip to Deliver the audience for first-party delivery.
The Trade Desk organizes marketplace data into a hierarchy of taxonomy elements. Folders group; leaf elements are what buyers actually purchase. Every audience you sell attaches to a leaf element, and that element carries the price and the access rules. Create a folder:
Then the sellable element, with your dataset attached and a rate card:
Each entry in data_rates sets a price and who gets it: Every rate carries cpm_rate, percent_of_media_cost_rate, and a rate_type of cpm, percent_of_media_cost, or hybrid. A rate of $0 is valid. Elements with no rate card inherit from their parent. Naming. Display names accept up to 256 characters, but stay under 50 so they read well in TTD’s interface. Avoid tabs and the characters ', ", and ^. Elements you create are drafts. Nothing reaches The Trade Desk until you synchronize, and you can revise (PUT) or remove (DELETE) an element at any time before it goes live.

8. Synchronize and wait for approval

Synchronization moves through pending, in_progress, and completed. If it fails, the response carries per-element detail. Once synchronized, The Trade Desk reviews your taxonomy. Watch each element’s sync status and compliance status:
An element must be approved before it can be sold. Narrative re-checks review status with TTD every 30 minutes, so a decision on their side can take up to half an hour to appear — poll on that cadence, because anything faster tells you nothing new. See Element status and approval for both status vocabularies and what each value means.
Your first taxonomy submission is reviewed by The Trade Desk, and that review takes weeks rather than days. Ask your Narrative relationship manager about expected turnaround for elements you add later, because that answer decides whether your integration has to tolerate a long pending state for every new audience or only the first one.

9. Deliver the audience

Create a connection joining the dataset, the profile, and an approved taxonomy element:
Both type fields are required. The outer one identifies what you are connecting; the inner one selects the delivery model. Always send them. targeting_time_to_live_in_minutes is how long a delivered identifier stays active in TTD before expiring, and it defaults to 90 days. The clock rides on every record, so each delivery renews it — keep your refresh cadence shorter than this value or members will lapse between deliveries. See Audience membership duration for the full behavior.
historical_data_enabled decides whether data already in the dataset is delivered or only rows written after the connection is created. It cannot be changed once the connection exists.
Your source dataset must refresh at least every 90 days.

First-party delivery

For first-party, skip the taxonomy entirely. Register the receiving advertiser once:
Then create the connection with first-party settings:
advertiser_ids takes the advertiser’s Trade Desk ID — the same value you supplied as ttd_id above, not the identifier Narrative returns for the registration record. Supplying the wrong one causes the delivery to fall back to third-party behavior without raising an error.

10. Confirm delivery

Each element reports statistics.received_ids, the identifiers Narrative sent, and statistics.active_ids, the subset The Trade Desk matched. The gap between them is your match rate.

Adding audiences later

Once your taxonomy is approved, adding an audience is steps 1 through 5, then a connection pointing at an approved element. No new taxonomy work, provided you reuse an element that already exists.

Troubleshooting

Getting help

Contact your Narrative relationship manager with your company ID, the dataset ID, and the failing request and response. For Trade Desk review status and Brand ID questions, your TTD account representative is the faster path.

The Trade Desk Connector

Full settings reference, identifiers, and status vocabularies

Connector Interfaces

Why a dataset connects to an interface rather than a connector

Structuring Audiences

Organize datasets for delivery

API Keys

Create and rotate keys for programmatic access