---
title: "Put a draft on Outerport as a hosted project"
method: POST
path: "/api/v0/desk/drafts/deploy"
tags: ["Desk"]
---

# Put a draft on Outerport as a hosted project

`POST /api/v0/desk/drafts/deploy`

## Request

- Base URL: `https://api.outerport.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outerport.com/api/v0/desk/drafts/deploy`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/outerport/apis/outerport-api/docs/api/v0/desk/drafts/deploy/post.ts> (a function with typed inputs; its response is checked against the schema)

Takes exactly one of ``name`` and ``project``. With ``name``, creates the caller's project of that name the first time, and replaces or adds files after that. With ``project`` instead (the id of a project the caller reaches, one shared with the caller's organization included, or the name of one of the caller's own), writes into that project, and deletes the stored paths ``remove`` names in the same write; a path in ``remove`` that matches no stored file (404), or that a sent file is at or under (400), refuses the deploy. Files neither sent nor removed stay. Answers the project's link, where it is read, reviewed and run in a browser.

## Request body

- DraftDeployRequest
  - `files` object, required: The draft's files, {path: text}, paths relative to the project root.
  - `name` string, nullable: The caller's project of this name: made the first time, its files written after that.
  - `project` string, nullable: Instead of ``name``: the id of a project the caller reaches, or the name of one of the caller's own, to write into.
  - `remove` string[]: With ``project``: stored paths to delete in the same deploy, a directory's path every file under it; at most 10000.

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-09** `ecd5b922e78a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/outerport/apis/outerport-api/changes/api/v0/desk/drafts/deploy/post.md)

---

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