Approve or deny an agent's action

POST
/v1/person-requests/{id}/answer

A member of the team decides on an action an agent may not run without a person's OK. approve lets it run (the platform runs it, or, for the customer's own tool, tells the agent to call it again); deny ends it. No answer in time is no. You cannot edit what it would do. Only one answer counts: the second gets 409 answered. If the customer has left (a call that ended, a closed conversation) nothing runs and the answer is 410 customer_gone. An action that needs an admin answers 403 needs_admin to a member.

Requires an API key with the workspace:write scope.

Authorization

apiKey
headerAuthorizationBearer <token>

A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.

Path Parameters

id*string

The request id.

Request Body

application/json
  1. body
decision*string

Either approve (the action may run) or deny (it does not). You cannot change what it would do.

Value in"approve""deny"
note?string

Optional: a short note kept with the decision for the team. The agent and the customer never read it.

Length1 <= length <= 500

Response Body

The decision was recorded; the action runs (or not) after it, and the agent is told

application/json
  1. response
requestId*string
Formatuuid
status*"answered"
Value in"answered"
decision?string
Value in"approve""deny"
Example Request
curl -X POST "https://api.vlayers.ai/v1/person-requests/$PERSON_REQUEST_ID/answer" \  -H "Authorization: Bearer $VOICELAYER_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "decision": "approve"  }'
Example Response
{  "requestId": "0192f5b0-7c3e-7a51-9b2d-4e8f1a6c3d21",  "status": "answered",  "decision": "approve"}