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.
Authenticate
Section titled “Authenticate”Use a dedicated user and an application password bound to a Raqvio Agent Guardrails agent (see the quick start), with HTTP Basic authentication.
Run an ability
Section titled “Run an ability”POST /wp-json/wp-abilities/v1/abilities/{ability-name}/runThe body is { "input": { … } }. Read-only abilities are called with GET and the input as query parameters.
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"}}'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"Responses
Section titled “Responses”| 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.