---
title: "Update a draft"
method: PATCH
path: "/entries/drafts/{draftId}"
tags: ["Entry drafts"]
---

# Update a draft

`PATCH /entries/drafts/{draftId}`

## Request

- Base URL: `https://whatareyoudo.ing/api/v1`
- URL: `https://whatareyoudo.ing/api/v1/entries/drafts/{draftId}`
- Auth: HTTP bearer

At least one field is required; a body with none is rejected.

## Path parameters

- `draftId` string, uuid, required

## Request body

- UpdateEntryDraftRequest
  - `occurredAt` string, date-time
  - `content` DraftContent, nullable
    - `format` 'plain' | 'markdown'
    - `body` string
    - `title` string, nullable
    - `mood` string, nullable
    - `location` string, nullable
    - `tags` string[]
    - `coverMediaAssetId` string, uuid, nullable
  - `media` MediaRef[]
    - `mediaAssetId` string, uuid, required
    - `caption` string, nullable

## Response `200`

OK

- object
  - `data` EntryDraft, required
    - `id` string, uuid, required
    - `diaryId` string, uuid, required
    - `entryId` string, uuid, nullable, required
    - `occurredAt` string, nullable, required
    - `content` DraftContent, nullable, required
      - `format` 'plain' | 'markdown'
      - `body` string
      - `title` string, nullable
      - `mood` string, nullable
      - `location` string, nullable
      - `tags` string[]
      - `coverMediaAssetId` string, uuid, nullable
    - `media` MediaRef[], nullable, required
      - `mediaAssetId` string, uuid, required
      - `caption` string, nullable
    - `createdAt` string, required
    - `updatedAt` string, required
  - `meta` object, required
    - `requestId` string, required

## Other responses

- `404`: No such draft
- `422`: No fields to update

---

[API](https://skmtc.dev/whatareyoudo/apis/whatcha-api.md) · [All operations](https://skmtc.dev/whatareyoudo/apis/whatcha-api/llms.txt) · [OpenAPI document](https://skmtc.dev/whatareyoudo/apis/whatcha-api/revisions/48dd8a54abea?raw)
