---
title: "Install or update a package"
method: POST
path: "/api/package"
tags: ["Packages"]
---

# Install or update a package

`POST /api/package`

Installs or updates a package from PyPI, GitHub, or a ZIP upload.
Exactly one of `update`, `github_url`, `pip`, or `zip` must be provided.
Returns a `task_id` for polling with `/api/package_update_status`.
Requires `admin` or `developer`.

## Request body

- object
  - `update` string — Name of an already-installed package to update.
  - `github_url` string — GitHub URL of a package to install.
  - `branch` string — Branch to install from (when `github_url` is provided).
  - `pip` string — PyPI package name (optionally with version specifier).
  - `restart` 0 | 1 — Set to 0 to skip restarting the server after install.

## Response `200`

Package installation started.

- TaskId
  - `task_id` string, required — Opaque identifier that can be passed to a status endpoint.

## Other responses

- `400` — Bad request.
- `403` — Access denied.

---

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