---
title: "Publish a new version of a tool"
method: POST
path: "/v1/{organization}/tool/{tool_id}/version"
tags: ["Tool"]
---

# Publish a new version of a tool

`POST /v1/{organization}/tool/{tool_id}/version`

Publish a new version of the specified tool. After this endpoint finishes, the new version will be immediately available for use.

This endpoint will take roughly 1-5 minutes to complete, so please adjust the timeout settings of your HTTP client accordingly.

#### Permissions
This endpoint requires the following permissions:
* `Tool:ModifyTool` for the tool.

## Path parameters

- `organization` string, required
- `tool_id` string, required — The ID of the tool to publish

## Headers

- `x-mongo-cluster-name` string, nullable — The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- `Sec-WebSocket-Protocol` string[]

## Request body

- SrcAppEndpointsToolPublishToolVersionRequest
  - `project_path` string, required — The directory in the tools repo that contains the `pyproject.toml` file corresponding to the tool version to publish.
  - `bump_type` 'major' | 'minor' | 'patch', required — The type of bump to apply to the version. For initial version of the tool, use `major`.

## Response `201`

Succeeded.

- SrcAppEndpointsToolPublishToolVersionResponse
  - `new_version` string, required — The new version of the tool.

## Other responses

- `400` — Specified commit is older than the last valid commit, or the environment variables required by the tool version do not exist on the tool, or more than 3 active versions of the tool exist, or tool build has failed.
- `401` — Invalid authorization credentials.
- `403` — Missing required permissions.
- `404` — The specified organization, tool, commit, or project directory does not exist.
- `409` — A related operation is in progress.
- `422` — Invalid request path parameter or request body failed validation.
- `429` — The user has exceeded the rate limit of 10 requests per minute for this endpoint.
- `503` — The service is going through temporary maintenance.

---

[API](https://skmtc.net/amigo/apis/amigo-api.md) · [All operations](https://skmtc.net/amigo/apis/amigo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/amigo/amigo-api/revisions/f0f28319e448/schema)
