# Create, Update and Delete: POST, PUT, PATCH and DELETE

A FastAPI resource is finished with four routes that change it, POST that answers 201 with the new item, PUT that replaces a whole item, PATCH that changes only the fields sent with model_dump(exclude_unset=True), and DELETE that answers 204 with no body, each answering 404 when the item isn't there.

![Cheat sheet: Create, Update and Delete: POST, PUT, PATCH and DELETE](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/508ef48f87124a3fbf5d8f3078019f65.webp)

- Category: FastAPI
- Level: Journeyman
- Tags: 204 No Content, CRUD, DELETE (HTTP), fastapi, PATCH, PUT, rest-api
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/fastapi-rest-create-update-delete-cheat-sheet
