You probalby want an API. You can browse the available APIs by navigating to Platform->Developer toolkit. PnP is categorized under the "Site Management" category. If I understand your request, I think "Delete device by Id from PnP" fits the bill.
/onboarding/pnp-device/${id}