# API Documentation?

**URL:** <https://discourse.pi-hole.net/t/api-documentation/48398>\
**Category:** General\
**Tags:** web\
**Created:** [July 20, 2021, 11:09pm UTC](https://discourse.pi-hole.net/t/api-documentation/48398 "2021-07-20T23:09:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BaconErie](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/b/f05b48/32.png) [@BaconErie](https://discourse.pi-hole.net/u/BaconErie)\
**Post date:** [July 20, 2021, 11:09pm UTC](https://discourse.pi-hole.net/t/api-documentation/48398/1 "2021-07-20T23:09:36Z")

</div>

I have been trying to find documentation for the Pi-hole web API. I have seen this [FAQ post](https://discourse.pi-hole.net/t/pi-hole-api/1863) documenting the API however it doesn't look like it documents any blacklist/whitelist editing functionality.

I have also seen this [post](https://discourse.pi-hole.net/t/api-question/29982/13) which suggests a new RESTful API that does include blacklist/whitelist editing, however the post also says that the new API is under development, and I am not sure if it is still under development or if it has been released.

Does anyone know the Web API documentation for Pi-Hole version 5.3.1, whether it be one of the above or something different?

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [July 21, 2021, 8:25am UTC](https://discourse.pi-hole.net/t/api-documentation/48398/2 "2021-07-21T08:25:27Z")

</div>

The new RESTful style API will be released with Pi-hole 6 at some stage.

The most reliable source for the current state is probably the `api.php` code on GitHub.

That said, you should be able to add and delete domains by something like:  
`api.php?list={type}&{action}={domain}&auth={token}`  
where `{action}` could be `add` or `sub` in order to add or remove a domain from a list of a given `[type}` (see also [API / Blacklist-Whitelist / Einträge per API (de-)aktivieren](https://discourse.pi-hole.net/t/api-blacklist-whitelist-eintrage-per-api-de-aktivieren/47301)).

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [July 28, 2021, 8:27am UTC](https://discourse.pi-hole.net/t/api-documentation/48398/4 "2021-07-28T08:27:42Z")

</div>

Closed on July 28, 2021, 8:27am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
