# Approve or deny an agent's action

Source: https://docs.vlayers.ai/reference/conversations/answer-person-request

`POST /v1/person-requests/{id}/answer` · scope `workspace:write`

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.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | The request id. Example: `"0192f5b0-7c3e-7a51-9b2d-4e8f1a6c3d21"` |
| `decision` | body | "approve" \| "deny" | yes | Either `approve` (the action may run) or `deny` (it does not). You cannot change what it would do. |
| `note` | body | string | no | Optional: a short note kept with the decision for the team. The agent and the customer never read it. |

## Request

cURL:

```bash
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"
  }'
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { status } = await voicelayer.conversations.answerPersonRequest('<person-request-id>', {
  decision: 'approve'
});
console.log(status);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.conversations.answer_person_request(
    "<person-request-id>",
    decision="approve",
)
print(result.status)
```

## Response `200`

```json
{
  "requestId": "0192f5b0-7c3e-7a51-9b2d-4e8f1a6c3d21",
  "status": "answered",
  "decision": "approve"
}
```
