---
title: "Execute contract rules"
method: POST
path: "/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/contract/execute"
tags: ["Contracts"]
---

# Execute contract rules

`POST /groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/contract/execute`

Executes contract rules against a data record and returns the result.

## Request body

- object
  - `mode` 'WRITE' | 'READ', required
  - `record` object, required

## Response `200`

The rule execution result.

- object
  - `passed` boolean
  - `transformedRecord` object
  - `violations` object[]
    - `ruleName` string
    - `message` string
    - `action` string
  - `executedRules` integer
  - `failedRules` integer

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

---

[API](https://skmtc.net/apicurio/apis/apicurio-registry-api-v3.md) · [All operations](https://skmtc.net/apicurio/apis/apicurio-registry-api-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apicurio/apicurio-registry-api-v3/revisions/c39cb56d7dbc/schema)
