---
title: "Execute command in sandbox"
method: POST
path: "/sandbox/{sandbox_id}/exec"
tags: ["sandbox"]
---

# Execute command in sandbox

`POST /sandbox/{sandbox_id}/exec`

Execute a shell command in the specified sandbox

## Path parameters

- `sandbox_id` string, required

## Request body

- HandlerExecCommandReq
  - `command` string, required

## Response `200`

OK

- object
  - `code` integer
  - `error` string
  - `msg` string
  - `data` HttpclientSandboxCommandOutput
    - `exit_code` integer
    - `stderr` string
    - `stdout` string

## Changes

> 50 revisions in range; 1 could not be searched.

- **2026-01-17** `557175c1ac01` — 1 info
  - endpoint added
- **2025-11-12** `a1c1bcb0e2ee` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/memodb-io/apis/acontext-api/changes/sandbox/:sandbox_id/exec/post.md)

---

[API](https://skmtc.dev/memodb-io/apis/acontext-api.md) · [All operations](https://skmtc.dev/memodb-io/apis/acontext-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/memodb-io/acontext-api/revisions/c8775333b1ed/schema)
