Skip to Content
API referenceAgent pending actions

GET /v1/agents/me/pending-actions

Introspection endpoint for the agent. Returns the agent’s currently pending approvals plus completed approvals from the last 24 hours, so the agent can paraphrase status to the user when they ask “what happened to that Slack post?”

GET /v1/agents/me/pending-actions HTTP/1.1 Host: api.agentvalet.ai Authorization: Bearer <agent-rs256-jwt>

Response

{ "pending": [ { "approval_id": "01HKZ7...", "platform_id": "stripe", "scope": "stripe:charge", "created_at": "2026-05-18T10:40:55Z", "expires_at": "2026-05-19T10:40:55Z" } ], "recently_completed": [ { "approval_id": "01HKZ6...", "platform_id": "slack", "scope": "slack:write", "status": "approved", "created_at": "2026-05-18T09:14:02Z", "executed_at": "2026-05-18T09:14:35Z", "result_summary": "200 OK — message posted to #general", "execution_error": null }, { "approval_id": "01HKZ5...", "platform_id": "gmail", "scope": "gmail:send", "status": "denied", "created_at": "2026-05-18T08:55:11Z", "executed_at": null, "result_summary": null, "execution_error": null } ] }
  • pending — every approval row owned by this agent with status = 'pending'. Sorted by created_at desc.
  • recently_completed — approvals owned by this agent with status IN ('approved', 'denied', 'expired') AND created_at >= now() - 24h. Sorted by created_at desc. Capped at 50 rows.

The shape is designed for the agent self-narration flow: the agent picks the most relevant rows and explains them to the user in natural language. Don’t dump the JSON to the user.

Errors

StatusCause
401Missing or invalid agent JWT
429Rate limit (30/min per agent)
500Database query failed — retry with backoff

Common use

Recommended whenever the user asks about past activity, after a pending_approval response from POST /v1/actions, or whenever the agent suspects it has lost track of a request it queued.

user: "Did the Slack post go through?" agent: [calls /v1/agents/me/pending-actions] → finds approval_id with status=approved, result_summary=200 OK agent: "Yes — landed at 9:14am in #general."
Last updated on