---
title: "Run a command with prepared dependencies and declared credentials, saving declared state with a revision check"
method: POST
path: "/local/environments/run"
tags: ["environments"]
---

# Run a command with prepared dependencies and declared credentials, saving declared state with a revision check

`POST /local/environments/run`

## Request

- Base URL: `https://www.dench.com/api/v1`
- URL: `https://www.dench.com/api/v1/local/environments/run`
- Auth: none declared

Run a command with prepared dependencies and declared credentials, saving declared state with a revision check.

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid authentication
- `404`: Operation or resource not found
- `409`: Local-only CLI operation. Execution occurs in the CLI process. Use dench env run NAME -- COMMAND; secret-bearing execution resolution is not a general REST read endpoint.
- `500`: Server error

---

[API](https://skmtc.dev/dench/apis/dench-api.md) - [All operations](https://skmtc.dev/dench/apis/dench-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dench/apis/dench-api/revisions/4a145b38f19c?raw)
