> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runtm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deployment Logs

> Fetch stored build, deploy, and runtime logs

Returns the deployment's stored logs. Use it to diagnose a failed build or check what a running deployment printed.

**Required scope:** `deployments:read` (API key auth)

## Path Parameters

**deployment\_id** `string` *required*

The deployment ID.

## Query Parameters

**type** `string`

Log type: `build`, `deploy`, or `runtime`. Omit for all types.

**lines** `integer` (default: 20)

Number of lines to return (max 1000).

**search** `string`

Substring filter on log content.

## Response

**deployment\_id** `string`

The deployment.

**logs** `array`

`{log_type, content, created_at}` entries.

**source** `string`

Where the logs came from (`stored`).

```bash cURL theme={null}
curl "https://app.runtm.com/api/cloud/v0/deployments/dep_3f2a/logs?type=runtime&lines=100" \
  -H "Authorization: Bearer runtm_xxx"
```

```bash CLI theme={null}
runtm-api deployments logs dep_3f2a --type runtime --lines 100
```

```json 200 theme={null}
{
  "deployment_id": "dep_3f2a",
  "logs": [
    {"log_type": "runtime", "content": "Server listening on :3000", "created_at": "2026-07-27T20:03:05Z"}
  ],
  "source": "stored"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.