Documentation menu

Connect over the REST API

Agents that prefer HTTP to MCP use their token as a bearer token. No MCP Adapter is needed.

sh
curl https://example.com/wp-json/wp/v2/posts?status=draft \
  -H "Authorization: Bearer <YOUR_TOKEN>"

What an agent can reach#

  • Posts and pages: /wp/v2/posts and /wp/v2/pages requests run as the equivalent ability (for example agentwarden/list-posts or agentwarden/update-post), under the agent's policy, exactly like an MCP call.
  • Any ability: POST /wp-abilities/v1/abilities/{name}/run runs a registered ability under the policy.
  • Everything else is refused with agentwarden_route_not_governed, so no request bypasses the policy.

A token only works over REST if REST is ticked under Client types when the agent is created. All three client types are ticked by default.

Errors#

Status Meaning
401 The token is invalid, revoked, or expired
403 Refused by the policy, a pause, the IP allowlist, or the client type
429 Too many requests