---
title: "POST /v1/{+parent}/capacityCommitments:merge"
method: POST
path: "/v1/{+parent}/capacityCommitments:merge"
tags: ["projects"]
---

# POST /v1/{+parent}/capacityCommitments:merge

`POST /v1/{+parent}/capacityCommitments:merge`

Merges capacity commitments of the same plan into a single commitment. The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments. Attempting to merge capacity commitments of different plan will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.

## Path parameters

- `parent` string, required

## Request body

- MergeCapacityCommitmentsRequest — The request for ReservationService.MergeCapacityCommitments.
  - `capacityCommitmentIds` string[] — Ids of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. ID is the last portion of capacity commitment name e.g., 'abc' for projects/myproject/locations/US/capacityCommitments/abc
  - `capacityCommitmentId` string — Optional. The optional resulting capacity commitment ID. Capacity commitment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character cannot be a dash. Max length is 64 characters.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/bigqueryreservation.md) · [All operations](https://skmtc.dev/google/apis/bigqueryreservation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/bigqueryreservation/revisions/3502c38ecee3/schema)
