Skip to main content
POST
Authenticate with Authorization: Bearer sk_live_... on https://api.agent37.com.

Path parameters

string
required
The instance id, returned when you create an instance.

Behavior and errors

POST /v1/instances/{id}/stop halts the container. The agent stops doing work (no cron, no heartbeats, no responses) and status becomes stopped. The data stays intact, CPU and memory are released back to the host, and the disk stays reserved on that host. Stop also works on a sleeping instance, and the difference is intent: a sleeper wakes on any request, a stopped instance stays down until an explicit start. Stopping a sleeper discards its checkpoint (the data stays) and its URLs stop waking it. There are two exceptions. While the sleep checkpoint is being written, stop returns 409 try_again; the window is tens of seconds on a large instance, so retry with backoff. A sleeper that has been moved to cold storage after a long idle stretch cannot be stopped: stop returns 400 invalid_request saying the instance is parked in cold storage. Wake it first, with start or any request to its URL, or delete it. Stopping an already stopped instance returns the same ack again; any other state returns 400. See Instance lifecycle for disk persistence and boot hooks. Retrieve the instance object for its full representation.