Hi, @azPHPguru. Thanks for your question. Sounds like you’re doing all the right things—e.g., using the GET accounts/:account_id/tailored_audiences endpoint to find the ID and following the example.
Did you only see the INVALID_PARAMETER error? Or did you also get:
{
"code": "MISSING_PARAMETER",
"message": "Tailored audience type is required in tailored audience targeting.",
"parameter": ""
}
With tailored audience targeting criteria, in addition to specifying the targeting_type and the targeting_value, you must also include tailored_audience_type. Below is an example request for adding tailored audience targeting to a line item.
$ twurl -X POST -H ads-api.twitter.com "/1/accounts/xxxxx/targeting_criteria?line_item_id=aaaa&targeting_type=TAILORED_AUDIENCE&targeting_value={tailored_audience_id}&tailored_audience_type=WEB"
Please let us know if adding tailored_audience_type resolves this issue. Thanks!