---
title: "Update commitment"
method: PUT
path: "/commitments/{id}"
tags: ["Commitments"]
---

# Update commitment

`PUT /commitments/{id}`

## Request

- Base URL: `https://us.api.flexprice.io/v1`
- URL: `https://us.api.flexprice.io/v1/commitments/{id}`
- Auth: API key in header `x-api-key`

Updates the descriptive fields of a commitment. Economic terms are immutable.

## Path parameters

- `id` string, required

## Request body

- UpdateCommitmentRequest
  - `invoice_description` string
  - `invoice_label` string
  - `metadata` TypesMetadata
  - `name` string

## Response `200`

OK

- CommitmentResponse
  - `active_windows` TypesActiveWindow[]
    - `end` TypesBucket
      - `hour` integer
      - `minute` integer
    - `start` TypesBucket
      - `hour` integer
      - `minute` integer
  - `binding` boolean
  - `collection_method` 'per_period' | 'billing_terms'
  - `commitment_status` 'active' | 'ended' | 'terminated'
  - `commitment_value` string
  - `committed_price_id` string
  - `created_at` string, date-time
  - `created_by` string
  - `currency` string
  - `customer_id` string
  - `end_date` string, date-time: EndDate is exclusive; nil for an open-ended commitment, which runs until terminated.
  - `environment_id` string
  - `id` string
  - `idempotency_key` string
  - `instalment_invoicing` string
  - `invoice_description` string
  - `invoice_label` string
  - `measurement` 'billing_period' | 'window'
  - `metadata` TypesMetadata
  - `name` string
  - `on_early_termination` 'forfeit' | 'credit_note' | 'bill_remaining'
  - `overage_price_id` string
  - `priority` integer
  - `scope_entity_id` string
  - `scope_entity_type` 'subscription' | 'group' | 'meter' | 'price'
  - `start_date` string, date-time
  - `status` 'published' | 'deleted' | 'archived'
  - `subscription_id` string
  - `tenant_id` string
  - `terminated_at` string, date-time
  - `termination_invoice_id` string
  - `timezone` string
  - `total_amount` string
  - `type` 'amount' | 'quantity'
  - `updated_at` string, date-time
  - `updated_by` string
  - `value` string

## Other responses

- `400`: Invalid request
- `404`: Resource not found
- `500`: Server error

## Changes

- **2026-10-25** `4746c65d9396`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/commitments/:id/put.md)

---

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