# Stop a runtime session **POST /api/v1/projects/{id}/workspaces/{workspace_id}/runtime-sessions/{session_id}/stop** Starts releasing the agent and tool sandbox capacity reserved for a runtime session, then returns immediately with status stopping. This does not delete the conversation session, messages, or execution records. Repeating the request while release is in progress returns the same accepted state without starting another release. Returns 404 when the workspace has no reserved or releasing runtime for the session. Retry-After suggests when to list runtime sessions again. Release continues in the background. ## Servers - https://agentengine.mongodb.com: https://agentengine.mongodb.com () ## Authentication methods - Bearer auth ## Parameters ### Path parameters - **id** (string) Project ID - **workspace_id** (string) Workspace ID - **session_id** (string) Runtime session ID ## Responses ### 406 Unsupported or malformed API version, an operation unavailable in the selected published contract, or an unacceptable representation (including unsupported media-type parameters or excluded SSE). Existing authentication, authorization, and rate-limit failures take precedence. #### Body: application/json (object) - **badRequestDetail** (object) Optional validation details defined by the standard error schema; API negotiation errors do not emit this field. - **detail** (string) Human-readable error details. - **error** (integer) HTTP status code. - **errorCode** (string) Machine-readable error code. - **parameters** (array[string]) Request parameter names associated with the error; omitted when none apply. - **reason** (string) HTTP status reason phrase. ### 202 Accepted #### Headers - **Retry-After** (string) Seconds to wait before polling the runtime-session list #### Body: application/json (object) - **session_id** (string) - **status** (string) ### 400 Bad Request #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 401 Unauthorized #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 403 Forbidden #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 404 Not Found #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 425 Workspace orchestration engine is not ready #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 500 Internal Server Error #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 502 Bad Gateway #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) [Powered by Bump.sh](https://bump.sh)