That's against Tesla's terms and would get your code invalidated.
"Good Faith
We introduce programmes such as these in good faith and expect the same good faith in return. Please note that we may withhold awards where we believe customers are acting in bad faith or otherwise acting contrary to the intent of this programmes. To be clear, commercializing, advertising, publishing, mass distributing or selling referral codes is not appropriate, and we will not honor such codes. We cannot cover every nefarious scenario, nor will we attempt to, but we do promise to be fair and reasonable."