Not found redirect

Overview

Read or change the 404 response. Routes use /wp-json/aam/v2 on a standard WordPress installation.

Endpoints

Method Route Input Purpose
GET /redirect/not-found — Get redirect.
POST /redirect/not-found type, redirect_page_id, redirect_url, http_status_code, callback Set redirect.
DELETE /redirect/not-found — Reset redirect.

The Input column lists route-specific parameters. A path parameter in {braces} is required. WordPress validates body and query parameters against the registered route schema.

Parameter guide

The route table shows which operation uses each parameter. Path parameters are required; other requirements depend on the operation.

Parameter Type Meaning
callback string Custom callback function.
http_status_code number HTTP Status Code.
redirect_page_id number Existing page ID to redirect to.
redirect_url string Valid URL to redirect to.
type string Redirect type.

Access level and authorization

Most routes accept access_level=role&role_id=editor, access_level=user&user_id=42, access_level=visitor, or access_level=default. This selects whose rules you read or change. A path ID or body value selects the target.

Required permission: aam_manager and aam_manage_404_redirect. See Authentication and Error handling.

Example

GET /wp-json/aam/v2/redirect/not-found?access_level=visitor
Authorization: Basic <base64 username:application-password>

This reads the 404 response configured for visitors.