# Retrieve an agent's status

`GET https://api.morevoice.ai/v1/agents/{id}/status`

A user's presence as a human agent: available, busy on a call, in wrap-up, away or offline, and the queues they answer. `id` is the user's ID.

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `agents_retrieve_status`.

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A user ID (`usr_…`). |

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |

## Responses

### 200 OK

OK Returns `AgentStatus`.

| Field | Type | Description |
| --- | --- | --- |
| `object` | `"agent_status"` | — |
| `user_id` | `string` | A user ID (prefix `usr_`). |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `status` | `"available" \| "busy" \| "wrap_up" \| "away" \| "offline"` | `available` and `away` are chosen by the agent; `busy` and `wrap_up` follow their calls; `offline`: not signed in. |
| `since` | `string \| null` | When the status began (null while offline). |
| `ringing` | `boolean` | A queue call is ringing the agent right now. |
| `call` | `object \| null` | The call the agent is on. |
| `call.call_id` | `string` | A call ID (prefix `call_`). |
| `call.direction` | `"inbound" \| "outbound"` | — |
| `call.queue_id` | `string \| null` | `q_…` ID. |
| `call.started` | `string` | An ISO-8601 timestamp in UTC. |
| `wrap_up_until` | `string \| null` | — |
| `queue_ids` | `string[]` | Enabled queues the agent answers. |

Example:

```json
{
  "call": {
    "call_id": "call_5Fh7Jk9Lm1Np3Qr5St7Vx9",
    "direction": "inbound",
    "queue_id": "q_4Gk2LmN9pQ4rS6tV8wX0yZ",
    "started": "2026-11-03T09:12:05.000Z"
  },
  "livemode": true,
  "object": "agent_status",
  "queue_ids": [
    "q_4Gk2LmN9pQ4rS6tV8wX0yZ"
  ],
  "ringing": false,
  "since": "2026-11-03T09:12:05.000Z",
  "status": "busy",
  "user_id": "usr_2Lm8Pq4Rt6Vx0Zb3Nd5Fh7",
  "wrap_up_until": null
}
```

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID exists in this organisation and mode. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

const agentStatus = await mv.agents.retrieveStatus("usr_7Hk2Lm9Qp");
console.log(agentStatus);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

agent_status = client.agents.retrieve_status("usr_7Hk2Lm9Qp")
print(agent_status)
```

**cURL**

```sh
curl https://api.morevoice.ai/v1/agents/usr_7Hk2Lm9Qp/status \
  -H "Authorization: Bearer $MOREVOICE_API_KEY"
```
