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

# Update screenshot

> PUT /v1/screenshots/{screenshotId} — update a screenshot's name or options.

## Endpoint

```
PUT https://api.screenshotly.dev/v1/screenshots/{screenshotId}
```

## Headers

| Header         | Required | Description        |
| -------------- | -------- | ------------------ |
| `X-API-Key`    | Yes      | Your API key       |
| `Content-Type` | Yes      | `application/json` |

## Path parameters

<ParamField path="screenshotId" type="string" required>
  The unique ID of the screenshot to update.
</ParamField>

## Request body

<ParamField body="name" type="string">
  A new name for the screenshot.
</ParamField>

<ParamField body="options" type="object">
  Updated options metadata for the screenshot.
</ParamField>

## Response

### 200 OK

```json theme={null}
{
  "success": true,
  "data": {
    "_id": "67b8a1c2d3e4f5a6b7c8d9e0",
    "url": "https://example.com",
    "name": "Updated name",
    "status": "completed",
    "imageUrl": "https://cdn.screenshotly.dev/screenshots/67b8a1c2d3e4f5a6b7c8d9e0.png",
    "options": {
      "format": "png",
      "viewport_width": 1280,
      "viewport_height": 1024
    },
    "metadata": {
      "fileSize": 245760,
      "format": "png",
      "dimensions": { "width": 1280, "height": 1024 }
    },
    "createdAt": "2025-05-14T10:00:00.000Z",
    "updatedAt": "2025-05-14T12:30:00.000Z"
  }
}
```

### Error responses

| Status | Code                                  | Description                   |
| ------ | ------------------------------------- | ----------------------------- |
| 401    | `missing_api_key` / `invalid_api_key` | Invalid or missing API key    |
| 403    | `forbidden`                           | You don't own this screenshot |
| 404    | `not_found`                           | Screenshot ID doesn't exist   |

## Example

```bash theme={null}
curl -X PUT https://api.screenshotly.dev/v1/screenshots/67b8a1c2d3e4f5a6b7c8d9e0 \
  -H "X-API-Key: $SCREENSHOTLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Homepage - May 2025"}'
```
