Skip to content
This repository was archived by the owner on Nov 30, 2026. It is now read-only.

Send an idempotency key with POST and PATCH requests - #313

Closed
ryangjchandler wants to merge 1 commit into
mainfrom
idempotency-keys
Closed

ryangjchandler wants to merge 1 commit into
mainfrom
idempotency-keys

Conversation

@ryangjchandler

Copy link
Copy Markdown
Contributor

Laravel Cloud's API now accepts an Idempotency-Key header on POST and PATCH endpoints. When it sees a key again within 24 hours, it returns the first successful response instead of repeating the work.

Each request object gets one key and keeps it. This prevents nothing yet, because the CLI never resends a request. The protection takes effect once we add retries on timeouts and connection errors, or a way for callers to pass their own key.

Laravel Cloud's API now accepts an Idempotency-Key header on POST and
PATCH endpoints and replays the first successful response for a repeated
key instead of doing the work twice. The key lives on the request, so
sending the same request again reuses it.

Amp-Thread-ID: https://ampcode.com/threads/T-a513dd7f-59e4-4e07-9182-e5e678b2cd13
Co-authored-by: Ryan Chandler <ryan@laravel.com>
@ryangjchandler
ryangjchandler marked this pull request as ready for review November 26, 2026 16:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants