Capabilities

Overview

List, create, rename, or remove capabilities. Routes use /wp-json/aam/v2 on a standard WordPress installation.

Endpoints

Method Route Input Purpose
GET /capabilities fields, list_all Get list.
PATCH /capabilities slug, ignore_format, is_granted Create capability.
PATCH /capability/{capability} capability, slug, ignore_format, globally Update capability.
DELETE /capability/{slug} slug, globally Delete capability.

PATCH rows also accept POST and PUT because WordPress registers them as editable routes. 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
capability string Existing capability slug.
fields string List of additional fields to return.
globally boolean Whether to rename this capability in every registered role.
ignore_format boolean Bypass the recommended by WP core standard.
is_granted boolean Grant this cap to current access level.
list_all boolean List all capabilities or not.
slug string Capability slug.

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_capabilities. See Authentication and Error handling.

The capability slug is the target. PATCH /capability/{capability} updates it; DELETE /capability/{slug} removes it.

Example

GET /wp-json/aam/v2/capabilities?access_level=role&role_id=editor
Authorization: Basic <base64 username:application-password>

This lists capabilities in the Editor role context.