---
title: "Create contract"
method: POST
path: "/v1/contract-tracker"
tags: ["Contract tracker"]
---

# Create contract

`POST /v1/contract-tracker`

## Request

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

## Headers

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

## Request body

- object
  - `name` string, required
  - `service` string, nullable
  - `costEntityName` string, nullable
  - `startDate` string, required
  - `endDate` string, required
  - `yearlySpend` object, required
  - `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 `201`

Create contract

- PublicApiError
  - `error` object, required
    - `code` string, required
    - `message` string, required
    - `request_id` string, required

## 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)
