# Retrieve a request log

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

Returns the `RequestLog` object. Answers `404` with the code `resource_missing` when nothing has this ID in this organisation and mode.

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

Operation ID: `request_logs_retrieve`.

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A request log ID (`rlog_…`). |

### 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 `RequestLog`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | A request log ID (prefix `rlog_`). |
| `object` | `"request_log"` | — |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `request_id` | `string` | The request's X-Request-Id (`req_…`), as error bodies and the X-Request-Id header show it. |
| `created` | `string` | When the request arrived. |
| `method` | `string` | — |
| `path` | `string` | The path without the query string. |
| `query` | `object \| null` | The query string as an object (redacted), or null. |
| `route` | `string \| null` | The matched route template, e.g. `/v1/calls/:id` (null when no route matched). |
| `operation_id` | `string \| null` | The OpenAPI operationId of the route, e.g. `calls_create`. |
| `api_version` | `string \| null` | The API version the response was rendered in. |
| `status` | `integer` | The HTTP status of the response. |
| `error_code` | `string \| null` | The error code (`error.code`) of an error response. |
| `latency_ms` | `integer` | Time to answer, in milliseconds (streams: how long they stayed open). |
| `key_id` | `string \| null` | The API key that made the request. |
| `ip` | `string \| null` | — |
| `user_agent` | `string \| null` | — |
| `idempotency_key` | `string \| null` | — |
| `request_body` | `any` | The request body, redacted (secrets, tokens, passwords and header values masked) and cut to 8 KB; null when there was none. |
| `response_body` | `any` | The response body of errors and POSTs, redacted and cut to 8 KB; null otherwise. |

Example:

```json
{
  "api_version": "2026-11-01",
  "created": "2026-11-03T09:14:22.135Z",
  "error_code": "parameter_invalid",
  "id": "rlog_4Gk2LmN9pQ4rS6tV8wX0yZ",
  "idempotency_key": "8e0f3a2c-5d1b-4c7e-9f6a-2b4d8c1e7a90",
  "ip": "203.0.113.7",
  "key_id": "key_3fT9kq2ZpLr8YwVbN1cX0a",
  "latency_ms": 42,
  "livemode": false,
  "method": "POST",
  "object": "request_log",
  "operation_id": "calls_create",
  "path": "/v1/calls",
  "query": null,
  "request_body": {
    "assistant_id": "asst_8tRPaZp5hLMbrGqdJ9AmNa",
    "to": "+97250000000"
  },
  "request_id": "req_7Pq2Rk9sT1uV3wX5yZ8aBc",
  "response_body": {
    "error": {
      "code": "parameter_invalid",
      "message": "to must be an E.164 number",
      "param": "to",
      "type": "invalid_request_error"
    }
  },
  "route": "/v1/calls",
  "status": 400,
  "user_agent": "morevoice-node/0.4.0"
}
```

### 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 requestLog = await mv.requestLogs.retrieve("rlog_7Hk2Lm9Qp");
console.log(requestLog);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

request_log = client.request_logs.retrieve("rlog_7Hk2Lm9Qp")
print(request_log)
```

**cURL**

```sh
curl https://api.morevoice.ai/v1/request_logs/rlog_7Hk2Lm9Qp \
  -H "Authorization: Bearer $MOREVOICE_API_KEY"
```
