CloudCLI API Documentation
CloudCLI Documentation
  1. Environments
  • CloudCLI API Documentation
  • Environments
    • List environments
      GET
    • Get environment
      GET
    • Create environment
      POST
    • Delete environment
      DELETE
    • Get SSH credentials
      GET
    • Start environment
      POST
    • Stop environment
      POST
  • Agents
    • Execute AI agent
      POST
    • AI Agent models
      GET
  • Schemas
    • Schemas
      • AgentModels
      • Environment
      • CreateEnvironmentRequest
      • SSHCredentials
      • AgentExecuteRequest
      • Error
  1. Environments

Stop environment

POST
https://cloudcli.ai/api/v1/environments/{id}/stop
Gracefully stop a running CloudCLI environment. The container is paused and SSH and HTTPS access are disabled, but all data on /workspace/ is preserved on the server disk. You can restart the environment any time with POST /environments/{id}/start and get back exactly as you left it.
Running processes in the container receive a graceful shutdown signal before the container is stopped. Stopped environments consume no CPU or memory and don't count against your running-hours quota (if relevant), so stopping is the right tool when you're pausing work overnight or over a weekend rather than deleting outright. Persistent storage remains attached to the same server; the environment returns to that same host on the next start.

Request

Authorization
API Key
Add parameter in header
X-API-KEY
Example:
X-API-KEY: ********************
or
Path Params

Responses

🟢200OK
application/json
Environment stopping
Body

🟠400Bad Request
🟠404Not Found
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://cloudcli.ai/api/v1/environments//stop' \
--header 'X-API-KEY: <api-key>'
Response Response Example
200 - Example 1
{
    "message": "Environment stopped successfully",
    "status": "stopped"
}
Modified at 2026-04-24 15:33:46
Previous
Start environment
Next
Execute AI agent
Built with