Create environment variable via API

Yeah but does it work? here’s my recent post: Environment variable rest api does not appear to work hopefully I am doing something wrong and can get a tip on what I might be doing wrong?