Hi, @etam. Sorry about the delay on this issue.
Thank you for providing the example requests and responses. This is really helpful.
For the tailored audience expansion, it turns out, the targeting_type should TAILORED_AUDIENCE_EXPANDED. So, your first request would become:
$ twurl -H ads-api.twitter.com --header "Content-Type: application/json" -X POST -d '[{"operation_type":"Create","params":{"line_item_id":"5q2t0","targeting_type":"TAILORED_AUDIENCE_EXPANDED","targeting_value":"18wy"}}]' "/1/batch/accounts/18ce53uuf0f/targeting_criteria"
(Note: I added --header "Content-Type: application/json" for brevity.)
For the tailored audience exclusion, while POST accounts/:account_id/targeting_criteria lists the tailored_audience_type param and the EXCLUDED_CRM value, the way to create this using the batch end point is slightly different. Instead, use the operator_type param and a value of NE. The exclusion request would become:
$ twurl -H ads-api.twitter.com --header "Content-Type: application/json" -X POST -d '[{"operation_type":"Create","params":{"line_item_id":"5q2t0","targeting_type":"TAILORED_AUDIENCE","targeting_value":"18wy","operator_type":"NE"}}]' "/1/batch/accounts/18ce53uuf0f/targeting_criteria"
The response should look something like the following:
{
"data_type":"targeting_criterion",
"data":[
{
"line_item_id":"5q2t0",
"name":"Custom audience targeting",
"id":"zzzzz",
"tailored_audience_expansion":false,
"operator_type":"NE",
"created_at":"2016-08-10T23:02:49Z",
"targeting_value":"18wy",
"updated_at":"2016-08-10T23:02:49Z",
"tailored_audience_type":"EXCLUDED_CRM",
"deleted":false,
"targeting_type":"TAILORED_AUDIENCE"
}
],
"request":[
{
"params":{
"line_item_id":"5q2t0",
"account_id":"18ce53uuf0f",
"operator_type":"NE",
"targeting_value":"18wy",
"targeting_type":"TAILORED_AUDIENCE"
},
"operation_type":"Create"
}
]
}
I hope this helps!
This is not clear in our documentation. We will update this soon.