Trigger a stop action on an environment with curl from gitlab-ci.yml possible?

Is it possible to trigger a stop action on an environment (defined in that same gitlab-ci.yml) with curl from gitlab-ci.yml?

Thanks