I believe the API at api.php
and the telnet API in pihole-FTL are two different things. The telnet API link above is for the latter. You are asking about the former and I don't think any documentation exists. There are scattered posts containing info and links to the source. Note recent changes since then, such as requiring authorisation on the API calls.
Edit: actually I'm not sure they are different or whether api.php
ultimately pulls from the same pihole-FTL API. Can anyone clarify the API workflows and what documentation does and doesn't exist?