---
title: "Save an account creation draft"
method: PUT
path: "/api/drafts/{id}"
---

# Save an account creation draft

`PUT /api/drafts/{id}`

## Request

- Base URL: `https://api.peelaway.io`
- URL: `https://api.peelaway.io/api/drafts/{id}`
- Auth: API key in cookie `better-auth.session_token`

Browser-session endpoint; API keys are rejected. Use revision 0 to create and the last returned revision to update. A stale revision returns 409 without overwriting. Configuration contains styleId (immutable style version UUID or null), prompt, aspectRatio, outputCount (1–10), creation settings (model peelaway-p1, quality max, visibility private or public), and optional submission checkpoint. Checkpointed images must belong to this account. Omit file to retain it, use null to clear it, or send base64 data and name for a JPG, PNG, or WebP up to 10MB. Saving never submits generation or spends credits.

## Request body

- object
  - `revision` integer, required
  - `configuration` object, required
  - `file` object, nullable
    - `data` string, byte, required
    - `name` string, required

## Response `200`

id, userId, and the saved revision

## Other responses

- `400`: Invalid configuration or image
- `401`: Sign in required
- `403`: Browser session required
- `404`: Checkpointed image not accessible
- `409`: Revision conflict; reopen before editing
- `413`: Image or request exceeds size limit

---

[API](https://skmtc.dev/peelaway/apis/peelaway-image-api.md) · [All operations](https://skmtc.dev/peelaway/apis/peelaway-image-api/llms.txt) · [OpenAPI document](https://skmtc.dev/peelaway/apis/peelaway-image-api/revisions/8ce45533c9d0?raw)
