Unfortunately deployment environments can still not be created or edited via the REST API. Please watch and vote on the following issue to raise Atlassian's priority regarding this notable and long standing gap (the current low vote count is a bit misleading, insofar there have been related issues before that got resolved as a 'Duplicate' due to sloppy issue triage):
As a workaround, you might want to check into using Bamboo Specs nstead, which support deployment projects and environments in its Java flavor.,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.