# Screenshots

> Capture any page, any size.

Render a web page to an image. Creating screenshots requires an active subscription or trial.

## List screenshots

```http
GET /v1/screenshots
```

Returns a cursor-paginated list of your screenshots.

- **Auth:** Bearer token
- **Token abilities:** `api_requests`
- **Gates:** logApiRequest
- **Credits:** Free — no credits consumed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `cursor` | query | string | No | Cursor token from meta.next_cursor. |

### Responses

**200** — A page of screenshots.

```json
{
    "data": [
        {
            "uuid": "a1b2c3",
            "url": "https://example.com",
            "image_url": "https://snapsbrew.com/storage/screenshots/a1b2c3.png",
            "width": 1330,
            "height": 780,
            "created_at": "2026-05-01T12:00:00Z"
        }
    ],
    "meta": {
        "previous_cursor": null,
        "next_cursor": null
    }
}
```

### Examples

*Curl*

```bash
curl https://snapsbrew.com/api/v1/screenshots \
  -H 'Authorization: Bearer <your-token>'
```

## Get a screenshot

```http
GET /v1/screenshots/{screenshotUuid}
```

Returns a single screenshot.

- **Auth:** Bearer token
- **Token abilities:** `api_requests`
- **Gates:** logApiRequest
- **Credits:** Free — no credits consumed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `screenshotUuid` | path | string | Yes | UUID of the screenshot. |

### Responses

**200** — The screenshot.

```json
{
    "data": {
        "id": "a1b2c3",
        "url": "https://example.com",
        "image_url": "https://snapsbrew.com/storage/screenshots/a1b2c3.png",
        "width": 1330,
        "height": 780,
        "created_at": "2026-05-01T12:00:00Z"
    }
}
```

**404** — Screenshot not found in your company.

```json
{
    "message": "Not found."
}
```

### Examples

*Curl*

```bash
curl https://snapsbrew.com/api/v1/screenshots/<uuid> \
  -H 'Authorization: Bearer <your-token>'
```

## Create a screenshot

```http
POST /v1/screenshots
```

Captures a web page. Defaults to a 1330x780 viewport when width/height are omitted.

- **Auth:** Bearer token
- **Token abilities:** `api_requests`
- **Gates:** logApiRequest, hasActiveSubscription
- **Credits:** Requires available credits (canCreateSnap); returns 417 when exhausted.

### Request body

Content-Type: `application/json`

| Field | Type | Required | Validation | Description |
| --- | --- | --- | --- | --- |
| `url` | string | No | url | Page to capture. Validated as a URL when present. |
| `width` | integer | No | integer | Viewport width. Defaults to 1330. |
| `height` | integer | No | integer | Viewport height. Defaults to 780. |

### Responses

**200** — Screenshot created.

```json
{
    "data": {
        "id": "a1b2c3",
        "url": "https://example.com",
        "image_url": "https://snapsbrew.com/storage/screenshots/a1b2c3.png",
        "width": 1330,
        "height": 780,
        "created_at": "2026-05-01T12:00:00Z"
    }
}
```

**401** — No active subscription or trial.

```json
{
    "message": "Unauthenticated."
}
```

**417** — Monthly credit quota exhausted.

```json
{
    "message": "You have reached your snap quota."
}
```

### Examples

*Curl*

```bash
curl -X POST https://snapsbrew.com/api/v1/screenshots \
  -H 'Authorization: Bearer <your-token>' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com","width":1330,"height":780}'
```
