Reach estimate query fails if placement type is passed in the body


The placement_type value is a required parameter on the Ads API request to get a reach estimate. In my testing, I’ve found that requests are rejected by the server if this parameter value is passed in the body of the request. A 400 Bad Request is returned. The request is accepted if this parameter is pass as a URL query parameter. This is either a bug in Twitter’s implementation of this request, or else the documentation should be updated to reflect that this parameter must be passed as a URL parameter.


@dodnert this is expected behavior and by design right now.

The only Ads API endpoints that accept parameters in the request body are the PUT and POST batch API endpoints. All other endpoints expect all params to be on the query string. The documentation for every endpoint demonstrates this clearly in the example request provided below the parameters table where we only use the query string.

For example, here’s the request example we provide for reach estimate:


Most resource URLs feature one or more in-line parameter. Many URLs also take explicitly declared parameters on the query string or, for POST or PUT requests, in the body.

Related Documentation:

In the next major release of the API we’ll begin supporting more complex JSON request bodies rather than relying on the query string for everything, but for the time being nearly all endpoints are restricted to the query string only.