I'm seeing an error when trying to delete a resource using unregisterResource() method in APS PHP runtime:

Internal Server Error: Request to APS controller failed: "{ "error": "APS::Util::Exception", "message": "Application of specified resource does not match: given `2ed15c55-8bd0-42c3-86e7-6c042d5b8251` expected `1e95d486-d5eb-4129-a491-d998b97e3656`." } ". 


unregisterResource() can delete only resources that belong to the application itself.


Use unprovisionResource() to delete POA resources (domains, dns records etc).

More on PHP runtime

Internal content

Link on internal Article