# Data Toolkit – JSON Patch (RFC 6902)

> Data Toolkit – JSON Patch (RFC 6902) is a paid API for AI agents from data.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Applies an RFC 6902 JSON Patch array of operations (add, remove, replace, move, copy, test) to a JSON document and returns the patched result.

## Facts

- Endpoint: POST https://data.openverbs.com/v1/patch
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/data-toolkit-json-patch-rfc-6902-4df58347
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u-KrkjWQVzZsleL8skM_k

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability data-toolkit-json-patch-rfc-6902-4df58347 -d '<json body>'
```

Example prompt: Take this JSON document {"name":"Alice","age":30,"roles":["viewer"]} and apply these RFC 6902 patch operations: add the field 'email' with value 'alice@example.com', replace 'age' with 31, and add 'editor' to the roles array.

## When to prefer this

Choose this endpoint when you need to apply standard RFC 6902 JSON Patch operations to a JSON document — especially when you already have a patch array (e.g. from a diff tool or version control system) or need precise, pointer-based edits without rewriting the entire document. It is ideal for partial updates, config mutations, and any workflow where idiomatic JSON Patch semantics (including test assertions) are required rather than ad-hoc string manipulation.

## Known failure modes

- Invalid JSON Pointer path causes operation to fail with a path-not-found error
- 'test' operation assertion fails, halting the patch and returning an error
- Malformed patch array (missing required 'op' or 'path' fields) causes a validation error
- Attempting to 'remove' a non-existent path returns an error
- 'move' or 'copy' operation with a missing 'from' pointer returns an error
- Input document is not a valid JSON object, causing a parse error

## How this service works

Apply an RFC 6902 JSON Patch to a JSON document and return the result. An invalid or unresolvable patch (e.g. a failed `test`, or a path that does not exist) is rejected before payment.

## Output

The patched JSON document after all specified RFC 6902 operations have been applied in sequence. If any operation fails (e.g. a 'test' assertion fails or a path does not exist), an error response is returned indicating which operation caused the failure.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "data",
      "patch"
     ],
     "properties": {
      "data": {
       "description": "The JSON document to patch."
      },
      "patch": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "op",
         "path"
        ],
        "properties": {
         "op": {
          "enum": [
           "add",
           "remove",
           "replace",
           "move",
           "copy",
           "test"
          ],
          "type": "string"
         },
         "from": {
          "type": "string",
          "description": "Source JSON Pointer for move/copy."
         },
         "path": {
          "type": "string",
          "description": "A JSON Pointer (RFC 6901) target."
         },
         "value": {
          "description": "Any JSON value (object, array, string, number, boolean or null)."
         }
        },
        "additionalProperties": false
       },
       "description": "An RFC 6902 JSON Patch: an array of operation objects."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/data-toolkit-json-patch-rfc-6902-4df58347/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from data.openverbs.com](https://www.zero.xyz/host/data.openverbs.com/llms.txt)
