---
title: "Create or patch entity"
method: PATCH
path: "/api/v1/open-api"
tags: ["Catalog Entities"]
---

# Create or patch entity

`PATCH /api/v1/open-api`

## Request

- Base URL: `https://api.getcortexapp.com`
- URL: `https://api.getcortexapp.com/api/v1/open-api`
- Auth: HTTP bearer

Creates or updates an entity using OpenAPI. If the YAML refers to an entity that already exists (as referenced by the `x-cortex-tag`), this API will merge the specified changes into the existing entity.

## Query parameters

- `dryRun` boolean
- `deleteMarkerValue` string
- `appendArrays` boolean
- `failIfEntityDoesNotExist` boolean
- `asyncUpdateWaitTimeMs` integer

## Request body `application/openapi;charset=UTF-8`

- string

## Response `200`

Indicates that the entity body was accepted, and the referenced `x-cortex-tag` existed and patched successfully

- OpenApiResponse
  - `ok` boolean, required
  - `violations` ViolationDTO[], required
    - `description` string
    - `endLine` integer
    - `paths` string[], required
    - `pointer` string
    - `ruleLink` string
    - `startLine` integer
    - `title` string
    - `violationType` 'MUST' | 'SHOULD' | 'MAY' | 'HINT'

## Other responses

- `201`: Indicates that the entity body was accepted, and the referenced `x-cortex-tag` did not exist and was created successfully
- `400`: Invalid YAML (major errors or incorrectly formatted YAML)
- `404`: Specified entity does not exist (when failIfDoesNotExist is set to true)
- `429`: The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.

## Changes

- **2026-11-03** `a7b058663c95`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cortex/apis/cortex-api/changes/api/v1/open-api/patch.md)

---

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