---
title: "Update contract"
method: PATCH
path: "/v1/contract-tracker/{id}"
tags: ["Contract tracker"]
---

# Update contract

`PATCH /v1/contract-tracker/{id}`

## Request

- Base URL: `https://api.nops.io`
- URL: `https://api.nops.io/v1/contract-tracker/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nops/apis/nops-public-api/docs/v1/contract-tracker/:id/patch.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, required: Contract ID

## Headers

- `Idempotency-Key` string, required: Unique key for safe retries on write requests (required, max 64 characters).

## Request body

- object
  - `name` string
  - `service` string, nullable
  - `costEntityName` string, nullable
  - `startDate` string
  - `endDate` string
  - `yearlySpend` object
  - `yearlyUsage` object, nullable
  - `commitmentPeriod` 'MONTHLY' | 'QUARTERLY' | 'ANNUALLY'
  - `discountPercentage` number, nullable
  - `marketplacePercentage` number, nullable
  - `isCrossService` boolean
  - `isUsageBased` boolean
  - `costUnit` string, nullable
  - `selectedAwsServices` string[]
  - `selectedCostEntities` string[]
  - `selectedBillingEntities` string[]
  - `selectedMarketplaceEntities` string[]
  - `selectedPayerAccounts` string[]

## Response `200`

Update contract

- object
  - `data` object, required: JSON object

## Other responses

- `401`: Unauthorized — invalid or missing API key
- `403`: Forbidden — insufficient permissions or entitlement

---

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