Unable to delete A record through API

I’m trying to use the API to create and delete A records for my zone. The token is created with DNS:Edit permission on the relevant zone.

Creation works fine, but deletion fails with this message:

{"success":false,"errors":[{"code":10000,"message":"DELETE method not allowed for the api_token authentication scheme"}]}

The doumentation indicates that the permission needed is: #dns_records:edit given that my token has that permission and given the error message I get the feeling that something else is wrong.

Any ideas why it won’t delete?

because the recordID you passed to deleteRecord is blank/null. especially when you are using weak typed programming language.