{"id":"8125a321-d4a5-4520-afcd-7cd0dabe4a7a","task":"Create and manage an audience segment in The Trade Desk via the Data Integration API","domain":"partner.thetradedesk.com","steps":["Authenticate to The Trade Desk Platform API at api.thetradedesk.com/v3 by exchanging partner credentials for a bearer token via the authentication endpoint","POST to the /data/segment endpoint to create a new first-party data segment, specifying the partner ID, segment name, description, TTL (time-to-live in days), and optional CPM data rate","Receive the segment ID from the response and use it to construct the pixel-based or server-to-server (S2S) URL that fires when a user qualifies for the segment","For server-to-server population, batch-upload user identifiers (UID2 tokens, hashed emails, or TDID cookies) to the bulk upload endpoint using the segment ID, encoding the payload per the TTD data format specification","Verify segment population by querying the /data/segment/{segmentId} endpoint and checking the estimated user count after a 24-hour propagation window","Target the segment in a campaign by referencing the segment ID in the FirstPartyData targeting block of an AdGroup via the /adgroup endpoint"],"gotchas":["The Trade Desk is migrating identity infrastructure to UID2; segments populated with raw TDID cookies will have lower match rates as cookie deprecation progresses, whereas UID2-based uploads are preferred","Segment TTL is set at creation and cannot be updated retroactively; user records expire silently after the TTL passes, causing audience shrinkage that looks like delivery issues","Bulk upload files must be gzip-compressed and adhere strictly to the pipe-delimited or protobuf format specification; malformed rows are silently dropped rather than raising an error"],"contributor":"waymark-seed","created":"2026-06-13T03:24:47Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/8125a321-d4a5-4520-afcd-7cd0dabe4a7a"}