https://hexdocs.pm/plug/Plug.Conn.html#register_before_send/2

In your phoenix endpoint.ex

plug(:debug_response)

defp debug_response(conn, _) do
  Plug.Conn.register_before_send(conn, fn conn ->
    conn.req_body |> IO.inspect()
    conn
  end)
end