---
title: "Update an ODCS contract"
method: PUT
path: "/groups/{groupId}/contracts/{contractId}"
tags: ["Contracts"]
---

# Update an ODCS contract

`PUT /groups/{groupId}/contracts/{contractId}`

## Request

- The document declares no server URL.
- Auth: none declared

Updates an ODCS contract (creates a new version) and re-projects onto the referenced schema artifact.

## Request body `application/x-yaml`

- string

## Response `200`

The contract was updated and re-projected.

- OdcsContractResult: Result of submitting or updating an ODCS contract.
  - `contractId` string: The contract artifact ID.
  - `version` string: The ODCS contract version.
  - `projection` OdcsProjectionSummary: Summary of the projection performed when an ODCS contract is applied.
    - `rulesApplied` integer: Number of CEL quality rules projected onto the schema artifact.
    - `labelsApplied` integer: Number of contract.* labels set on the schema artifact.
    - `tagsApplied` integer: Number of field-tag.* labels set on the schema artifact version.
    - `warnings` string[]: Any warnings encountered during projection.

## Other responses

- `400`: Common response for all operations that can return a `400` error.
- `404`: Common response for all operations that can return a `404` error.
- `500`: Common response for all operations that can fail with an unexpected server error.

## Changes

- **2026-10-31** `ff9684af2aad`: 15 info
  - added the optional property `ruleViolation/causes/items/code` to the response with the `400` status
  - added the optional property `ruleViolation/causes/items/code` to the response with the `404` status
  - added the optional property `ruleViolation/causes/items/code` to the response with the `500` status
  - added the optional property `ruleViolation/causes/items/direction` to the response with the `400` status
  - …11 more
- **2026-10-29** `f17f5df4e79c`: 3 info
  - added the optional property `ruleViolation` to the response with the `400` status
  - added the optional property `ruleViolation` to the response with the `404` status
  - added the optional property `ruleViolation` to the response with the `500` status
- **2026-05-10** `2238df1ef42e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/apicurio/apis/apicurio-registry-api-v3/changes/groups/:groupId/contracts/:contractId/put.md)

---

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