Skip to Content
API referenceAgent pending actions
Open in Claude Open in ChatGPT

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": "7c1e4b2a-9d3f-4e8a-b6c5-2f0a1d9e8b34", "platform_id": "stripe-live", "scope": "write", "created_at": "2026-05-18T10:40:55Z", "expires_at": "2026-05-18T10:50:55Z" } ], "recently_completed": [ { "approval_id": "3a9f0c2e-6b41-4d7a-8e15-c2b7d4f60a91", "platform_id": "slack", "scope": "chat:write", "status": "approved", "created_at": "2026-05-18T09:14:02Z", "decided_at": "2026-05-18T09:14:33Z", "executed_at": "2026-05-18T09:14:35Z", "result_summary": "Completed (HTTP 200)", "execution_error": null }, { "approval_id": "e2d4b6a8-1c3f-4a5e-9b7d-0f2e4c6a8b13", "platform_id": "microsoft-outlook", "scope": "Mail.Send", "status": "denied", "created_at": "2026-05-18T08:55:11Z", "decided_at": "2026-05-18T08:56:02Z", "executed_at": null, "result_summary": null, "execution_error": null } ] }
  • pending — approval rows 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.
  • The two lists together are capped at 50 rows (newest first).
  • decided_at — when a person approved or denied it; null for a row that expired without a decision.
  • result_summary — Completed (HTTP <status>) for a 2xx replay, Upstream returned HTTP <status> otherwise, null if nothing ran.

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="Completed (HTTP 200)" agent: "Yes — landed at 9:14am in #general."
Last updated on