{"uid":"cap_BM2skKPFXjWF6LyB_1Yz_","slug":"json-object-rename-keys-26ae2bf1","name":"JSON Object Rename Keys","description":"JSON Object Rename Keys: JSON Object Rename Keys renames top-level keys using a caller mapping and reports collisions from bounded caller-supplied values without an external provider. Call JSON Object Rename Keys before an agent hands structured data or a batch plan to a downstream tool with a stricter contract. Returns the bounded transformation or validation finding with counts, normalized values, and a versioned result contract for JSON Object Rename Keys as versioned deterministic JSON. Pri…","url":"https://api.delx.ai/api/v1/x402/json-object-rename-keys","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"object":{"type":"object","description":"Object supplied to JSON Object Rename Keys; used only for this bounded calculation and processed in memory without retention.","maxProperties":128,"additionalProperties":true},"mapping":{"type":"object","description":"Mapping supplied to JSON Object Rename Keys; used only for this bounded calculation and processed in memory without retention.","maxProperties":128,"additionalProperties":true}}},"responseSchema":{"type":"json","example":{"result":{"object":{"id":1,"firstName":"Ada"},"collisions":[]},"schema":"delx/util-json-object-rename-keys/v1","status":"pass","evidence":{"retained":false,"input_sha256":"17b6ed7c6acbd73e4c278919af805585c725f614019bd98fd34297fddb0367ca","external_calls":0},"operation":"data_batch:json_object_rename_keys"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DuJbsfIsThdfpRduTgw_G","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Renames top-level keys of a JSON object using a caller-supplied mapping and detects/reports key collisions deterministically.","exampleAgentPrompt":"Rename the keys in this JSON object — change 'user_id' to 'userId', 'first_name' to 'firstName', and 'last_name' to 'lastName' — and let me know if any collisions would occur.","exampleUseCases":[{"title":"Normalize keys before downstream API call","prompt":"I have a JSON object with snake_case keys like 'account_id' and 'created_at' but the downstream service expects camelCase. Rename them using this mapping: {'account_id':'accountId','created_at':'createdAt'} and tell me if there are any collisions."},{"title":"Detect collision in schema migration","prompt":"I'm migrating a schema and need to rename 'id' to 'userId' and 'name' to 'id' in this object. Can you check whether those renames would cause a collision before I apply them?"},{"title":"Rekey webhook payload for CRM ingestion","prompt":"This incoming webhook payload uses legacy field names. Rename 'cust_no' to 'customerId', 'amt' to 'amount', and 'ts' to 'timestamp' in the object, then tell me the result and whether any key conflicts came up."}],"resultDescription":"A versioned deterministic JSON result containing the renamed object with new top-level keys applied per the mapping, collision counts and details where renames would overwrite existing keys, transformation counts, and normalized values — all processed in memory without data retention.","failureModes":["Mapping references a key not present in the object — silently skipped or flagged in the result","Rename target collides with an existing key — reported as a collision rather than silently overwriting","Object exceeds 128 top-level properties — rejected due to maxProperties constraint","Mapping exceeds 128 entries — rejected due to maxProperties constraint","Malformed input JSON — returns a validation error","Network or payment authorization failure — HTTP 402 or 5xx response"],"whenToPreferThis":"Use this endpoint when you need a fast, deterministic, in-memory rename of top-level JSON keys with collision detection before handing structured data to a downstream tool with a stricter schema contract. Prefer it over ad-hoc agent-side key renaming when you need a versioned, auditable result with explicit collision reporting. Not suitable for nested key renaming, array transformation, or value-level mutations.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:19:00.804Z","isFirstParty":false}