Skip to main content
This guide shows you how to build an unattended integration that uploads an audience to Narrative and delivers it into one advertiser’s own seat at The Trade Desk (TTD). A person signs in once to create an API key, and the integration uses that key from then on. First-party delivery needs no taxonomy and no review by TTD. To list an audience in TTD’s marketplace instead, see Third-party delivery via the API. First-party and third-party delivery compares the two models. Before you start, complete the prerequisites and set up API access.

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.
A signed-URL upload supports a single file of up to 3 GB. For larger files, or for files that another system delivers on a schedule, write them to a managed bucket instead: see Ingesting Files from a Managed S3 Bucket. That replaces this step and the next one.
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 The Trade Desk ("app_id": 11) in the accepted list, under the interface your delivery model uses: first_party for first-party, third_party_v2 for third-party. See Delivery interfaces for what each interface does. If The Trade Desk 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. Register the advertiser

Register each receiving advertiser once. The registration holds the credentials the connector uses to deliver into that advertiser’s seat.
ttd_id is the advertiser’s ID in The Trade Desk. You use the same value in the next step.

8. Deliver the audience

Create a connection joining the dataset, the profile, and the advertiser:
Both type fields are required. The outer one identifies what you are connecting, and the inner one selects the delivery interface. Always send them. advertiser_ids takes the advertiser’s Trade Desk ID, the value you registered as ttd_id, not the identifier Narrative returns for the registration record. A delivery to an advertiser the connector cannot resolve fails with an error naming that advertiser. data_segment_names is the name the segment carries in the advertiser’s seat. It is free text, not a taxonomy element. 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. 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.
See First-party connection settings for every field.

9. Confirm the connection

The response lists the first_party connection you created. Once delivery runs, the segment appears in the advertiser’s seat under the name you gave it in data_segment_names, as though the advertiser had uploaded it themselves.

Keeping the audience current

Write new data to the dataset. The connection keeps running, so new rows reach the advertiser’s seat without further calls. Refresh the dataset more often than the membership duration. Members that no delivery renews expire after targeting_time_to_live_in_minutes, and your source dataset must refresh at least every 90 days. advertiser_ids takes a list, so one connection can deliver the audience to several registered advertisers.

Troubleshooting

Dataset and upload problems

Delivery problems

Getting help

Contact your Narrative relationship manager with your company ID, the dataset ID, and the failing request and response. For questions about the advertiser’s seat or credentials, the advertiser’s TTD account representative is the faster path.

Third-party delivery via the API

List an audience in TTD’s marketplace instead

The Trade Desk Connector

Full settings reference, identifiers, and status vocabularies

Connector Interfaces

Why a dataset connects to an interface rather than a connector

API Keys

Create and rotate keys for programmatic access