---
title: "Get build logs"
method: GET
path: "/api/v1/deployments/{id}/logs"
tags: ["Deployments"]
---

# Get build logs

`GET /api/v1/deployments/{id}/logs`

## Request

- Base URL: `https://previewdrop.dev`
- URL: `https://previewdrop.dev/api/v1/deployments/{id}/logs`
- Auth: HTTP bearer

Returns the raw build log for a deployment as a single string.

**When to poll logs**

Poll this endpoint while `status` is `building` or `deploying`. The build log is also included in the main `GET /api/v1/deployments/{id}` response, so you only need this dedicated endpoint if you want to fetch logs without the full deployment object.

**Caching**

If the build worker is unreachable (e.g. the container has already been destroyed after `expired` or `stopped`), the last persisted log is returned. The `log` field is an empty string `""` if no log is available yet.

## Path parameters

- `id` string, uuid, required

## Response `200`

OK

- LogsResponse
  - `log` string, required: Full build log text. Empty string if no log is available yet.
  - `hints` object[]: Actionable diagnostics for failed deployments. Only present when the deployment status is `failed`.
    - `id` string, required
    - `severity` 'error' | 'warn' | 'tip', required
    - `title` string, required
    - `detail` string, required

## Other responses

- `401`: Missing or invalid API key.
- `404`: The requested deployment does not exist or does not belong to your workspace.
- `429`: You have exceeded the rate limit. Check the `Retry-After` header for when to resume. The limit value reflects the specific endpoint's cap (10, 60, or 120 req/60s — see Rate Limits in the overview).

---

[API](https://skmtc.dev/previewdrop/apis/previewdrop-api.md) · [All operations](https://skmtc.dev/previewdrop/apis/previewdrop-api/llms.txt) · [OpenAPI document](https://skmtc.dev/previewdrop/apis/previewdrop-api/revisions/0742e253496b?raw)
