aam_api_route_is_denied_filter

Purpose

Override a REST route deny result.

Callback

Example

add_filter('aam_api_route_is_denied_filter', function ($result, $identifier, $resource) {
    return $identifier === '/myapp/private' ? true : $result;
}, 10, 3);

Denies the exact /myapp/private identifier and keeps AAM’s decision for every other resource.

See the complete hook list.