---
title: "Add a piece to a platform"
method: POST
path: "/v1/pieces"
tags: ["pieces"]
---

# Add a piece to a platform

`POST /v1/pieces`

Add a piece to a platform

## Request body

- union
  - object
    - `packageType` 'ARCHIVE', required
    - `scope` union, required
      - 'PROJECT'
      - 'PLATFORM'
    - `pieceName` string, required
    - `pieceVersion` string, required
    - `pieceArchive` unknown, required
  - object
    - `packageType` 'REGISTRY', required
    - `scope` union, required
      - 'PROJECT'
      - 'PLATFORM'
    - `pieceName` string, required
    - `pieceVersion` string, required

## Response `201`

Default Response

- object

## Changes

- **2026-07-13** `225ff954244e` — 1 breaking, 1 info
  - api path removed without deprecation
  - endpoint added
- **2024-09-05** `3e19fa5e716a` — 2 breaking
  - the `anyOf[subschema #1: Private Piece]/pieceName` request property's minLength was increased from `0` to `1`
  - the `anyOf[subschema #2: NPM Piece]/pieceName` request property's minLength was increased from `0` to `1`
- **2024-09-03** `b95c8c8e8262` — 1 info
  - endpoint added
- **2024-07-04** `6067892aa453` — 1 breaking
  - api path removed without deprecation
- **2024-02-22** `b8aa27750656` — 1 info
  - the endpoint scheme security `apiKey` was added to the API

[Full history](https://skmtc.dev/rantirai/apis/activepieces-documentation/changes/v1/pieces/post.md)

---

[API](https://skmtc.dev/rantirai/apis/activepieces-documentation.md) · [All operations](https://skmtc.dev/rantirai/apis/activepieces-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rantirai/activepieces-documentation/revisions/225ff954244e/schema)
