---
title: "Create a package"
method: POST
path: "/api/v4/projects/{id}/packages/composer"
tags: ["packages_composer"]
---

# Create a package

`POST /api/v4/projects/{id}/packages/composer`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/packages/composer`
- Auth: none declared

Creates a Composer package from a specified Git tag or branch for a project.

## Path parameters

- `id` string, required

## Request body

- PostApiV4ProjectsIdPackagesComposer: Create a package
  - `branch` string: The name of the branch
  - `tag` string: The name of the tag

## Response `201`

Create a package

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

---

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