DELETE host using API

I am trying to find a means to remove hosts from telegraf using the API. I’ve tried a variety of syntax similar to:

curl -i -XPOST 'http://localhost:8086/query?db=telegraf' --data-binary @/tmp/myinflux.txt
{"results":[{"statement_id":0}]}

myinflux.txt:

q=DELETE FROM system WHERE host = 'web001'

I can do this successfully via influx cli:

> use telegraf
Using database telegraf
> DELETE FROM system WHERE host = 'web001'

What is wrong with the API command?

Has anyone done removal of data with the API?