# agent_test_call_failed (/errors/agent_test_call_failed)

| HTTP status | Type | Code |
| --- | --- | --- |
| 400 | `invalid_request_error` | `agent_test_call_failed` |

## What it means [#what-it-means]

The test call was refused before dialing: for example the agent is missing required values, the number cannot place calls, or the free test-call allowance is used up. The message says why.

## How to handle it [#how-to-handle-it]

Fix the request before sending it again; retrying the same request returns the same error. `error.param` names the offending field when there is one.

## Example response [#example-response]

```json
{
  "detail": "The test call could not be placed.",
  "error": {
    "type": "invalid_request_error",
    "code": "agent_test_call_failed",
    "message": "The test call could not be placed.",
    "param": null,
    "docUrl": "https://docs.callmitra.ai/errors/agent_test_call_failed",
    "requestId": "req_3f9c2a7d1b8e4c6a9f0e2d4b6a8c0e1f"
  }
}
```

Branch on `error.code`; it never changes once published. The `message` text can change. See [Errors](/errors) for the envelope.

## Returned by [#returned-by]

- `POST /api/v1/agents/{agent_id}/test-call` — Place a test call