# savePagePdf

Save a PAGE as a PDF file in Library ("turn this into a PDF", "give it to me as a PDF"): printed now as you see it, saved where the files you make for this person go (their chosen folder, else My files). Returns the new file and its `path`. A snapshot: later edits to the page do not change it. Only a page prints; for anything else make a page of it first.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "savePagePdf", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `itemId`: `ID!` (required)

## Response (data, an example)

```json
{
  "spacesMutation": {
    "savePagePdf": {
      "id": "<ID>",
      "spaceId": "<ID>",
      "spaceName": "…",
      "parentId": "<ID>",
      "name": "…",
      "fileType": "…",
      "sizeBytes": 0,
      "path": [
        {
          "id": "<ID>",
          "name": "…"
        }
      ]
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "savePagePdf",
    "variables": {
      "itemId": "<itemId>"
    }
  }'
```
