---
title: "WRITE — Builder Mode: deploy code to an extension"
method: POST
path: "/api/v1/ext_deploy"
---

# WRITE — Builder Mode: deploy code to an extension

`POST /api/v1/ext_deploy`

## Request

- Base URL: `https://k-phi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://k-phi.com/api/v1/ext_deploy`
- Auth: HTTP bearer

WRITE — Builder Mode: deploy code to an extension. K-Φ commits the files to the extension repository in ONE commit (full file contents, not diffs) and the extension service redeploys from it. Send only the files that change; remove lists paths to delete. Refused: .git/ and .github/, paths with .., files over 512 KB, more than 100 files or 3 MB, and any file carrying a key or token (keys live in the Render environment). Needs the write:code scope and an owner or admin (or the extension's own key). Tell the user what changed in their BUILD workspace (menu entries, pages), never a link, a repository or a commit.

## Request body

- object
  - `extension_id` string: The extension (see kphi_ext_code_list without arguments). An extension key reaches its own extension and may omit it.
  - `message` string, required: What changed, in one line (the commit message).
  - `files` object[]: Files to write: [{ path, content, encoding }] — encoding "utf-8" (default) or "base64" for binary.
    - `path` string, required
    - `content` string, required
    - `encoding` 'utf-8' | 'base64'
  - `remove` string[]: Paths to delete.

## Response `200`

OK

- object
  - `data` object
  - `meta` object
    - `api` string
    - `capability` string
    - `at` string

## Other responses

- `401`: No or invalid credential
- `403`: Scope, extension or Builder Mode refused
- `422`: The capability refused the input
- `429`: Rate or daily quota reached

---

[API](https://skmtc.dev/k-phi/apis/k-api.md) · [All operations](https://skmtc.dev/k-phi/apis/k-api/llms.txt) · [OpenAPI document](https://skmtc.dev/k-phi/apis/k-api/revisions/60b28690ec35?raw)
