{"uid":"cap_QrCdbbWVaFwYvxN255sZi","slug":"delx-commerce-rename-key-in-object-8e9c1191","name":"Delx Commerce — Rename Key in Object","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/rename-key?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"object":{"type":"object","description":"Input field: object."},"to_key":{"type":"string","description":"Input field: to key."},"from_key":{"type":"string","description":"Input field: from key."}}},"responseSchema":{"type":"json","example":{"object":{"id":1},"schema":"delx/util-rename-key/v1","renamed":true}},"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_MAjn6xoMuhxLdajFiEwAL","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 a key within a JSON object from one name to another, returning the modified object with a renamed field.","exampleAgentPrompt":"Can you rename the key 'user_id' to 'id' in this object: {\"user_id\": 42, \"name\": \"Alice\"}?","exampleUseCases":[{"title":"Normalize API response field names","prompt":"I'm getting back JSON from an external API with a field called 'usr_identifier' but my system expects 'user_id' — can you rename that key in the object {\"usr_identifier\": 99, \"email\": \"bob@example.com\"}?"},{"title":"Rename legacy schema property","prompt":"I have an old data record {\"customerId\": 501} and I need the key to be 'customer_id' instead — can you rename it for me?"},{"title":"Fix mismatched key before database insert","prompt":"Before I insert this record into our database, I need to rename the field 'ts' to 'timestamp' in {\"ts\": \"2024-01-15T10:00:00Z\", \"event\": \"login\"}."}],"resultDescription":"Returns a JSON object containing the original object with the specified key renamed, a boolean 'renamed' field confirming the operation succeeded, and a schema identifier string 'delx/util-rename-key/v1'.","failureModes":["from_key not found in object — renamed may return false or the object is returned unchanged","object field missing or null — operation may fail or return an error","to_key already exists in the object — may cause collision or overwrite","malformed input object — API returns an error response","Payment failure via x402 — request is rejected before processing"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-use utility to rename a single key in a JSON object without setting up any infrastructure. It is ideal for agents that need quick, verifiable data normalization with no signup overhead and deterministic USDC micropayment pricing via x402 on Base or Solana.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:02.004Z","isFirstParty":false,"canonicalSlug":"delx-commerce-rename-key-in-object-8e9c1191"}