---
title: "Submit an ODCS contract"
method: POST
path: "/groups/{groupId}/contracts"
tags: ["Contracts"]
---

# Submit an ODCS contract

`POST /groups/{groupId}/contracts`

## Request

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

Submits an ODCS v3.1 YAML contract. The contract is parsed, stored as an ODCS_CONTRACT artifact, and its contents are projected onto the referenced schema artifact (labels, rules, field tags).

## Request body `application/x-yaml`

- string

## Response `200`

The contract was created (or updated if it already exists) and projected onto the referenced schema artifact.

- 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.
- `500`: Common response for all operations that can fail with an unexpected server error.

## Changes

- **2026-10-31** `ff9684af2aad`: 10 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 `500` status
  - added the optional property `ruleViolation/causes/items/direction` to the response with the `400` status
  - added the optional property `ruleViolation/causes/items/direction` to the response with the `500` status
  - …6 more
- **2026-10-29** `f17f5df4e79c`: 2 info
  - added the optional property `ruleViolation` to the response with the `400` 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/post.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)
