What does HTTP status code 307 mean?
The 307 Temporary Redirect status code indicates that the resource is temporarily located at a different URI and the client must reuse the original HTTP method (e.g. POST) when making the redirected request.
When to use it in APIs
Use when redirecting write operations (POST, PUT, DELETE) temporarily, ensuring the client resubmits the actual payload.
How it compares to other codes
- 302 Found: Allows clients to change the method from POST to GET, whereas 307 strictly forbids it.