You could use acme-dns, it is a simplified DNS server with a RESTful HTTP API to provide a simple way to automate ACME DNS challenges.
Yesterday I wrote a post regarding this issue Renew using dns-01 challenge - #8 by sahsanu and maybe it could be useful to understand how it works.