Skip to content

Abilities REST API

Any HTTP client can run abilities through the WordPress Abilities REST API. Raqvio Agent Guardrails governs these calls on the rest channel.

Use a dedicated user and an application password bound to a Raqvio Agent Guardrails agent (see the quick start), with HTTP Basic authentication.

POST /wp-json/wp-abilities/v1/abilities/{ability-name}/run

The body is { "input": { … } }. Read-only abilities are called with GET and the input as query parameters.

Terminal window
curl -u "agent-user:abcd efgh ijkl mnop qrst uvwx" \
-H "Content-Type: application/json" \
-X POST "https://your-store.example/wp-json/wp-abilities/v1/abilities/raqvio-ag/order-create-refund/run" \
-d '{"input":{"id":1234,"amount":"25.00","reason":"Damaged item"}}'
Terminal window
curl -u "agent-user:abcd efgh ijkl mnop qrst uvwx" \
"https://your-store.example/wp-json/wp-abilities/v1/abilities/raqvio-ag/get-my-permissions/run"
Outcome HTTP status Body
Allowed and succeeded 200 The ability’s output
Denied 403 {"code":"raqvio_ag_denied","message":"Blocked by Raqvio Agent Guardrails: …"}
Kill switch on 403 {"code":"raqvio_ag_blocked", …}
Needs approval (Pro) 202 {"code":"raqvio_ag_approval_required", "data":{"approval_id":N, "poll_ability":"raqvio-ag/get-approval-status", …}}

See Responses & errors for all codes.