What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

PUT asks a server to create or replace the state of a resource at a URI the client already knows. POST asks the target resource to process the submitted content according to its own rules. That distinction—not “update versus create”—is the useful way to choose between them. PUT is idempotent by HTTP semantics; POST is not guaranteed to be, which matters when a request may need to be retried.

PUT and POST mean different things

HTTP methods describe the intent of a request. The method alone does not tell you the payload format, the exact operation an API performs, or whether a particular endpoint accepts that method. Those details depend on the resource and the service’s implementation.

RFC 9110, the HTTP Semantics standard published in June 2022, defines POST as asking the target resource to process the enclosed representation according to that resource’s own semantics. PUT asks that the target resource’s state be created or replaced with the state defined by the enclosed representation.

Question PUT POST
What is the request asking? Create or replace state at the target resource. Process the submitted content according to the target resource’s rules.
Who identifies the target URI? Usually the client, which already knows the URI whose state it wants to set. The client identifies the processing or collection resource; the server may choose a URI for a new resource.
Is it idempotent by HTTP semantics? Yes. Not guaranteed.
Can it create a resource? Yes, at the target URI. Yes, among other possible uses.
Can every endpoint use it? No. The resource determines which methods it implements or allows. No. The resource determines how it processes the request.

When should you use PUT?

Use PUT when the client knows the URI of the resource and the request means, in effect, “make the resource at this URI have this state.” The client supplies the target URI; it is not asking the server to decide where a new resource should live.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For example, an API might let a client set the state of a profile at a known URI such as /profiles/42. That is an illustration of the method’s semantics, not a claim that every profile API accepts PUT or uses that URL structure.

PUT can create as well as replace

The shorthand “PUT updates” is incomplete. If the target has no current representation, PUT can request that one be created there. RFC 9110 requires an origin server to return 201 Created when a successful PUT creates the representation. A successful PUT that replaces an existing representation is a different case, so do not assume every successful PUT returns 201.

A successful PUT describes intended state, not every future observation

A successful PUT indicates that the server accepted the requested state at the target. A later GET should return an equivalent representation, but concurrent changes or server-side dynamic processing can affect what a later request observes.

Rank #2
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

When should you use POST?

Use POST when the request means “process this submission according to the target resource’s rules.” That can include creating a resource, but creation is only one possible POST use. RFC 9110 also gives examples such as submitting form fields to a data-handling process, posting a message to a forum or blog, and appending data to an existing representation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

POST is often sent to a collection or processing resource when the server will choose a URI for a newly created resource. If the server selects the URI after receiving a state-changing request, RFC 9110 says that service should use POST. This is a semantic guideline, not a universal URL pattern: individual APIs define their own endpoints and supported methods.

Idempotency: why it changes retry decisions

A method is idempotent when multiple identical requests have the same intended effect on the server as one request. Under HTTP semantics, PUT is idempotent. POST is not guaranteed to be idempotent.

Suppose a connection fails after a client sends a request but before the client receives the response. The client may not know whether the server applied the request. Repeating an identical PUT is generally suitable because it has the same intended effect as the first request. RFC 9110 advises against automatically retrying a non-idempotent request unless the client has another way to know that repeating it is safe or that the original request was not applied.

Idempotent does not mean “nothing else changes”

The guarantee concerns the request’s intended effect, not every incidental server-side effect. A server may log each attempt or update revision history even when repeated PUT requests leave the resource in the same intended state.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

POST is not guaranteed to duplicate work

Because POST is not guaranteed idempotent, clients should not assume that repeating it is harmless. But that does not mean every POST creates a duplicate when repeated: a particular endpoint may be designed to tolerate repeats. Check the API’s documented behavior before configuring automatic retries.

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

How to choose in an API design

  1. Identify the target. Is the client setting state at a URI it knows, or submitting content to a resource that will decide how to process it?
  2. Match the method to that intent. Choose PUT for creating or replacing state at the known target. Choose POST for resource-specific processing, which may include creation, form handling, posting a message, or appending data.
  3. Define retry behavior. PUT’s idempotency makes repeating an identical request generally appropriate after an uncertain network outcome. Treat POST as unsafe to retry automatically unless the endpoint’s documented semantics or another safeguard establishes that repetition is safe.
  4. Document the endpoint contract. State which methods the resource accepts, what the representation means, and how the service responds. Standard method definitions do not require a particular endpoint to implement both methods.

Do not choose a method just because an operation is described as an “update” or “create.” Ask whether the request sets state at a known target or delegates processing to the target. A service might use POST for a repeat-safe operation or reject PUT entirely; the method’s standardized meaning and the endpoint’s actual contract both matter.

Common misconceptions

  • “PUT is update; POST is create.” PUT can create a representation at its target URI. POST can create a resource, but it can also perform other kinds of processing.
  • “PUT has no side effects.” Idempotency concerns the intended effect of repeating the request. Logging or revision history may still change with each attempt.
  • “POST always creates a duplicate if repeated.” POST is not guaranteed idempotent, but an individual endpoint may define repeat-safe behavior.
  • “A method definition guarantees an endpoint supports it.” It does not. The resource’s implementation determines which methods it accepts and what it does with them.
  • “PUT always returns 201.” RFC 9110 requires 201 when a successful PUT creates the representation; that does not describe every successful replacement.

Common implementation and troubleshooting questions

The endpoint rejects PUT or POST

Confirm the API’s documented method for that resource. A standardized definition does not force every endpoint to accept the method. Do not switch methods simply to get past an error without checking whether the new method expresses the operation you intend.

A retry might have repeated an operation

First determine whether the client received a response and whether the endpoint documents repeat-safe behavior. PUT is idempotent by HTTP semantics, so an identical retry has the same intended effect. For POST, do not assume the first request failed just because its response was lost; use the service’s documented safeguards or establish that the request was not applied before retrying.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The status code differs from what you expected

For PUT, distinguish creating a previously absent representation from replacing an existing one: the standard requires 201 Created when the successful PUT creates the representation, not for every successful PUT. For other response details, consult the API’s contract rather than inferring a universal status-code rule from the method name.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Screenshot capture as an example of method choice

ScreenshotNeo is a website screenshot API and MCP server for developers. Its screenshot endpoint uses a GET request, so it is not an example of choosing PUT or POST: the method should follow the endpoint’s documented semantics. The API’s supported parameters and response details are in the ScreenshotNeo documentation.

For a screenshot capture, the provided cURL example is:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

The equivalent Python example is:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

And in Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo removes known consent banners, newsletter popups, and chat widgets before capture; those cleanup steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers indicating the page verdict and billing status. It also offers an MCP server for AI agents. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. Learn about ScreenshotNeo or sign up for 1,000 free screenshots a month, with no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.