# Change an entry with field-level operations

`PATCH /cms/entries/{id}` · Rivier · content

Change an entry with field-level operations.

- Scope: content:write
- Mcp: rivier_cms_patch
- Graphql: Mutation.contentEntryPatch
- Sdk: content.entry.patch
- Cli: content entry patch
- Events: content.entry.updated

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "ops": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "op": {
                "type": "string",
                "const": "set"
              },
              "path": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "value": {}
            },
            "required": [
              "op",
              "path"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "type": "string",
                "const": "unset"
              },
              "path": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              }
            },
            "required": [
              "op",
              "path"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "type": "string",
                "const": "insert"
              },
              "path": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "index": {
                "type": "integer",
                "minimum": 0
              },
              "value": {}
            },
            "required": [
              "op",
              "path"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "type": "string",
                "const": "remove"
              },
              "path": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "index": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "op",
              "path",
              "index"
            ],
            "additionalProperties": false
          }
        ]
      },
      "minItems": 1,
      "maxItems": 100
    },
    "expectVersion": {
      "type": "integer",
      "minimum": 1
    },
    "slug": {
      "type": "string",
      "maxLength": 120
    },
    "ai": {
      "type": "object",
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "none",
            "assisted",
            "generated"
          ]
        },
        "model": {
          "type": "string",
          "maxLength": 120
        },
        "agent": {
          "type": "string",
          "maxLength": 120
        },
        "disclosureLine": {
          "type": "string",
          "maxLength": 500
        },
        "reviewedBy": {
          "type": "string",
          "maxLength": 200
        },
        "reviewedAt": {
          "type": "string",
          "maxLength": 40
        }
      },
      "required": [
        "level"
      ],
      "additionalProperties": false
    },
    "releaseId": {
      "type": "string",
      "format": "uuid"
    },
    "dryRun": {
      "type": "boolean"
    },
    "reason": {
      "type": "string",
      "maxLength": 300
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "ops"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PATCH 'https://api.rivier.ai/cms/entries/{id}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "ops": [
    {
      "op": "set",
      "path": "string"
    }
  ]
}'
```
