1. Create the dataset
Your schema decides whether The Trade Desk will accept the audience, so settle it before you upload anything.Required columns
first_party and third_party_v2 take the same schema. The dataset needs at least one of these identifier columns:
Each identifier column is named after its Rosetta Stone attribute, and the connector matches on that column name. A column holds either a plain string or an object. In the dataset schema, declare a string column with
"type": "string", and declare an object column with "type": "object" and its properties:
Check the schema first
The connector’s validation endpoint takes the schema you plan to use and answers200 with an empty body when The Trade Desk would accept it. It needs no authorization header, and id can be any number:
400, with one entry for each identifier the connector looked for:
Create it
write_mode is overwrite or append. file_config.type is json for JSON Lines, parquet, or flat for CSV.
Record the dataset id from the response.
You do not need to supply UID2. The connector generates UID2 tokens from hashed email addresses automatically.
2. Activate the dataset
3. Upload and ingest your file
Each line of the file is one row that matches the schema you declared in step 1. For the columns The Trade Desk accepts and their shapes, see Supported identifiers and Required columns. You can load a file into a dataset over the API in two ways:- Signed-URL upload. Your integration uploads one file of up to 3 GB, then asks Narrative to ingest it.
- Managed S3 bucket. You write files to an S3 bucket that Narrative manages, and Narrative ingests each batch on its own. Use a managed bucket for files larger than 3 GB, or for files that another system delivers on a schedule.
Choose a file format
The dataset’sfile_config.type sets the format of every file you load into it. Parquet and JSON Lines both hold object columns, which nest properties inside one column:
- Parquet (
parquet) is the most compatible format for connector datasets. It stores nested struct columns and their types natively, and Narrative matches columns to the schema by name at every level. - JSON Lines (
json) holds one JSON object per line. Narrative matches each nested object to the schema by name.
flat) hold only scalar columns, so they can’t carry object columns.
Upload a file with a signed URL
Request an upload URL, then send the file straight to storage:PUT.
Then ingest the file into the dataset, passing that path as source_file:
Write files to a managed S3 bucket
A managed bucket is an S3 bucket that Narrative creates for your company. You write each batch of files into its own folder under the dataset’s path in the bucket, then write an empty_NIO_COMMIT file into that batch folder. Narrative ingests every file in the batch folder when the commit file appears, so you make no upload or ingest request. A file can be as large as S3 accepts.
See Ingesting Files from a Managed S3 Bucket to create the bucket, grant your AWS account access, and lay out the folders.
4. Confirm The Trade Desk accepts the dataset
Before you create a connection, ask Narrative which connector interfaces the dataset satisfies:acceptedlists each interface you can connect the dataset to, by the connector’sapp_idand theinterface_id.errorslists each interface the schema does not satisfy. Itsdetailshold the reason, such as"required property '<column>' not found".
?tags=<tag> to check only the interfaces that carry that tag.
When the interface you want is under errors, the dataset’s schema doesn’t meet what the interface needs, for example a missing column or property. Activation locks the schema, so create a new dataset that fixes what the error names.
For The Trade Desk, look for "app_id": 11 in accepted, 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.
5. Find your connector profile
Your connector profile holds your Brand ID and Sub-Provider ID, and every delivery names it. The connector’s/profiles endpoint returns it:
id. Its status must be enabled. GET /profiles/{profile_id} returns the same record on its own. 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.
6. Register the advertiser
Register each receiving advertiser once. The registration holds the credentials the connector uses to deliver into that advertiser’s seat.200 with the registration:
ttd_id is the advertiser’s ID in The Trade Desk. You use the same value in the next step. id is Narrative’s identifier for the registration, which you use only to read, change, or remove it. See Managing advertiser registrations.
7. Deliver the audience
Create a connection joining the dataset, the profile, and the advertiser:201 with the connection:
type identifies what you are connecting, and quick_settings.type selects the delivery interface.
advertiser_ids takes the advertiser’s Trade Desk ID, the value you registered as ttd_id, not the id Narrative returns for the registration.
data_segment_names is the name the segment carries in the advertiser’s seat. It is free text, not a taxonomy element.
What the connection does describes every field, its allowed values, and its default, along with what the connection does with existing and new rows. historical_data_enabled takes effect when the connection is created.
8. Confirm the connection
first_party connection you created under records. GET /v2/connections/{connection_id} returns it on its own. 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 aftertargeting_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.
Managing advertiser registrations
List your registrations, or read one by itsid:
PUT, for example when the advertiser gives you a new secret key. PUT replaces the whole record, so send all three fields:
Stopping a delivery
Delete the connection to stop delivering the audience:Troubleshooting
Dataset and upload problems
Delivery problems
Getting help
Contact your Narrative relationship manager with your company ID, the dataset ID, the connection 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.Related content
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

