Can't add requestBody to GET call in OpenAPI 3.0

Originally posted by abonstrom on December 23, 2021

I have an existing API endpoint with a GET operation. The GET operation takes several parameters and I currently have those parameters being sent in the body of the request.

OpenAPI 3.0 no longer supports the requestBody object on GET requests (as seen here https://swagger.io/docs/specification/describing-request-body/), is there any way I can describe this API operation using OpenAPI 3.0 or does someone know of a workaround?

Originally posted by rickyxurq on January 10, 2022

GET call does not support request body according to HTTP definition (https://httpwg.org/specs/rfc7231.html#GET). Parameters should be passed with ‘query parameter’ or ‘path parameter’. (https://swagger.io/docs/specification/describing-parameters/)

Originally posted by abonstrom on January 10, 2022

Thank you rickyxurq !

Having the parameters in the query or path were not an option for us, so we turned the operation into a POST call instead.

Originally posted by FaimMedia on February 10, 2026

A payload within a GET request message has no defined semantics; sending a payload body on a GET request might cause some existing implementations to reject the request.

No where is it stated a request body can’t be used with a GET request, so it’s weird this is a limitation to the specs. Elasticsearch API for example uses it exactly like this.