Agents

Approve or reject an agent action

The owner's decision on an action awaiting approval (status pending_approval). approve runs it now, through the same checks as any other request (verification, balance, test mode); reject drops it. An SMS or a call can only be approved in the portal (403 forbidden here); rejecting does work here. Approving also needs the action's scope. A paused agent's actions can only be rejected. Repeating the same decision returns the action unchanged; a different decision on an action that was already decided or expired returns 409. Every decision is recorded in the project's audit log.

post/agent-actions/{id}/decide

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/agent-actions/{id}/decide
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: project:write)

Path parameters

idstring uuid required

The id of the agent action.

Request body

decision'approve' | 'reject' required

approve runs the action now; reject drops it.

Response

The action after the decision.

idstring uuid required
run_idstring uuid required
agent_idstring uuid required
type'read_document' | 'update_document' | 'email_owner' | 'email_contact' | 'send_sms' | 'start_call' | 'send_webhook' required
inputobject required

What the agent asked for, like {"to": "+447700900123", "assistant_instructions": "..."}.

status'running' | 'done' | 'simulated' | 'pending_approval' | 'rejected' | 'refused' | 'failed' | 'expired' required

running, done, simulated (test mode), pending_approval (waiting for the owner), rejected (by the owner), refused (by the limits or the rules, see reason), failed (see reason), expired (no decision within 72 hours).

reasonstring nullable required
resultobject nullable required
decided_bystring nullable required
decided_atstring nullable required
expires_atstring nullable required

When a pending action expires.

created_atstring required
executed_atstring nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.