---
title: "Start app image release"
method: POST
path: "/api/app-images/{handle}/{slug}/releases"
---

# Start app image release

`POST /api/app-images/{handle}/{slug}/releases`

## Request

- Base URL: `https://reduck.ai`
- URL: `https://reduck.ai/api/app-images/{handle}/{slug}/releases`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Begin a deploy: reserve the release number and answer with a presigned upload per file. The bytes go straight to storage rather than through this API, and nothing serves the release until you publish it.

## Path parameters

- `handle` string, required: The owner a resource is addressed under: "@username" for a personal scope, or a bare slug for a project.
- `slug` string, required: The image's identifier within its owner's scope. Chosen once and never changed.

## Request body

- object
  - `files` object[], required
    - `name` string, required: The name to serve it under, e.g. `app.js` or `migrations/002-add-tags.sql`.
    - `size` integer, required
    - `sha256` string, required
  - `grant` object: The manifest's `hosts` as authored: each host the page may reach, and what rides along.
  - `config` object: `config.json` as authored: the settings defaults.
  - `manifest` object: `manifest.json`'s install contract.
    - `secrets` object
    - `settings` object: JSON Schema for the app's settings document, rendered as the install form.
    - `hooks` object: The tasks flock runs on the app's behalf, by the moment that fires each.
      - `init` string: Runs once per app, at its first page open.
      - `newUser` string: Runs once per person, at their first open.
    - `scripts` string[]: The Reduck scripts the app may run, as `[owner/]host/slug` addresses.
  - `tools` object[]: The manifest's `tools`, resolved: the tasks this release offers an agent.
    - `task` string, required: The task this tool calls, as in `tasks/<name>.ts`. Also the tool's name.
    - `description` string, required: What the tool does, in the words an agent chooses it by.
    - `inputSchema` object: JSON Schema for the task's arguments.
    - `outputSchema` object: JSON Schema for what the task returns.
  - `migrations` object[]
    - `name` string, required
    - `sha` string, required
  - `schema_sha` string: sha256 of the `schema.sql` this release ships, if it ships one.

## Response `201`

Created

- object
  - `number` number, required
  - `uploads` object[], required
    - `name` string, required
    - `url` string, required
    - `headers` Recordstringstring, required
  - `expires_in` number, required

## Other responses

- `400`: Invalid request
- `401`: Not authenticated
- `403`: Forbidden
- `404`: Not found
- `409`: The app has been archived, so it takes no new releases.

---

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