---
search:
  tags:
    - Operations
    - POST
seo:
  description: >-
    For a browser extension saving the page someone is looking at: the rendered
    HTML,… Reference for the POST /v1/page-snapshots/upload endpoint in the Teak
    API.
sidebar:
  label: Upload the page a link was saved from
  badge: POST
title: Upload the page a link was saved from
type: openapi-operation
---
For a browser extension saving the page someone is looking at: the rendered HTML, gzipped, becomes the link's saved copy, so pages behind a sign-in or built by scripts are kept as they were seen. Teak keeps a private copy of each link's page either way; without a snapshot it fetches the page itself.

`POST /v1/page-snapshots/upload`

**Request body** (`application/json`)

- `bytes` (integer, required) — The gzipped page's exact size in bytes; at most 20971520 (20 MiB).

Request body example:

```json
{
  "bytes": 0
}
```

**Responses**

- `200` — A signed URL. PUT the gzipped page to uploadUrl with Content-Type: application/gzip and exactly \`bytes\` bytes, then pass fileKey as pageSnapshotKey to POST /v1/cards
- `400` — INVALID\_INPUT: \`bytes\` is missing or not a whole number
- `413` — PAGE\_SNAPSHOT\_TOO\_LARGE: over 20 MiB gzipped
- `429` — RATE\_LIMITED: 60 snapshots a minute; \`retryAt\` and Retry-After say when to try again

Response example, 200:

```json
{
  "expiresIn": 0,
  "fileKey": "string",
  "maxFileSize": 0,
  "method": "PUT",
  "uploadUrl": "http://example.com"
}
```
