---
title: "(Deprecated, please use /execute_async) Synchronously execute a shell command on a Devbox"
method: POST
path: "/v1/devboxes/{id}/execute_sync"
tags: ["Devbox", "Devbox-ShellTools"]
deprecated: true
---

# (Deprecated, please use /execute_async) Synchronously execute a shell command on a Devbox

`POST /v1/devboxes/{id}/execute_sync`

> **Deprecated.**

Execute a bash command in the Devbox shell, await the command completion and return the output. Note: attach_stdin parameter is not supported for synchronous execution.

## Path parameters

- `id` string, required

## Request body

- DevboxCreateExecutionParameters
  - `command` string, required — The command to execute via the Devbox shell. By default, commands are run from the user home directory unless shell_name is specified. If shell_name is specified the command is run from the directory based on the recent state of the persistent shell.
  - `shell_name` string, nullable — The name of the persistent shell to create or use if already created. When using a persistent shell, the command will run from the directory at the end of the previous command and environment variables will be preserved.
  - `attach_stdin` boolean, nullable — Whether to attach stdin streaming for async commands. Not valid for execute_sync endpoint. Defaults to false if not specified.

## Response `200`

OK

- DevboxExecutionDetailView
  - `devbox_id` string, required — Devbox id where command was executed.
  - `stdout` string, required — Standard out generated by command.
  - `stderr` string, required — Standard error generated by command.
  - `exit_status` integer, required — Exit status of command execution.
  - `shell_name` string, nullable — Shell name.

## Changes

- **2026-05-27** `d3ddb452754c` — 2 breaking
  - the request property `attach_stdin` became not nullable
  - the request property `shell_name` became not nullable
- **2025-10-15** `436b4f5c7426` — 1 info
  - added the new optional request property `attach_stdin`
- **2025-09-29** `1749c364b895` — 1 info
  - endpoint deprecated

[Change history](https://skmtc.dev/runloopai/apis/runloop-api/changes/v1/devboxes/:id/execute_sync/post.md)

---

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