Found a couple of inconsistencies with the TON upload docs (specifically used in the tailored audience flow).
https://dev.twitter.com/rest/ton/resumable
Docs denote the header location as Location: /1.1/ton/bucket/{bucket}/SzFxGfAg_Zj.mp4
The actual header location in the response looks something like this (for ta_partner bucket used for tailored aud list uploads): /ta_partner/{bucket}/SzFxGfAg_Zj.mp4.
Directly using this header in POST accounts/:account_id/tailored_audience_changes request (https://dev.twitter.com/ads/reference/post/accounts/%3Aaccount_id/tailored_audience_change) results in a 400 with error {"code":"INVALID_PARAMETER","message":"Expected valid file path, got \"\/ta_partner\/{bucket}\/SzFxGfAg_Zj.mp4\" for input_file_path","parameter":"input_file_path"}*.
The header location returned from the initialization request and used for the subsequent chunk uploads look like this: /1.1/ton/data/ta_partner/{bucket}/SzFxGfAg_Zj.mp4?resumable=true&resumeId=406297.
I looked at the pattern of this path and tacked the /1.1/ton/data prefix to the original header location and tried using that in the input_file_path request param to POST accounts/:account_id/tailored_audience_changes: /1.1/ton/data/ta_partner/{bucket}/SzFxGfAg_Zj.mp4 – which worked and returned a 201.
It looks like there is an actual bug with the final returned location header in the TON resumable upload flow, which omits the required /1.1/ton/data prefix in the file path. And a discrepancy in the twitter api docs where the sample response looks different from what is actually returned (or what the location should look like). The single upload docs page response is also wrong https://dev.twitter.com/rest/ton/single-chunk