{"uid":"cap_B5OQ83JDybsz4JJx4hb13","slug":"writerslogic-config-migration-api-45c7b8de","name":"WritersLogic Config Migration API","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/config-migration?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"v1":{"description":"The old config (any JSON value)."},"mapping":{"type":"array","items":{"type":"object","required":["from"],"properties":{"to":{"type":"string","maxLength":300,"description":"JSON pointer in v2; omit with drop true."},"drop":{"type":"boolean","description":"Acknowledge that this v1 value is intentionally discarded."},"from":{"type":"string","maxLength":300,"description":"JSON pointer in v1."},"valueMap":{"description":"Object of {stringified old value: new value} for transform value-map."},"transform":{"enum":["none","string-to-number","number-to-string","string-to-boolean","boolean-to-string","to-array","first-of-array","value-map"],"type":"string"}},"additionalProperties":false},"maxItems":100},"v2Schema":{"description":"The new config's schema. Full JSON Schema 2020-12 (local $ref only)."},"applyDefaults":{"type":"boolean","description":"Fill missing v2 properties from schema defaults (default true)."},"carryDeclared":{"type":"boolean","description":"Copy unmapped v1 values to the same pointer when v2 declares that property (default true)."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tsLbhWuj8ZvijJx6_EF2A","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Migrates a JSON config from v1 to v2 by applying a declared field mapping, filling schema defaults, and returning the migrated config plus exact lists of dropped, defaulted, and invalid fields.","exampleAgentPrompt":"Migrate this v1 config JSON to our new v2 schema using the following field mappings — rename 'user.name' to 'profile.fullName' with no transform and 'timeout' to 'settings.timeoutMs' with a string-to-number transform — apply schema defaults for any missing fields, and tell me exactly which fields were dropped, defaulted, or failed validation.","exampleUseCases":[{"title":"Tool settings upgrade between releases","prompt":"I need to upgrade our agent's tool config from v1 to v2 — here's the old config JSON, the mapping (rename 'retries' to 'retry.count' as string-to-number, and 'logLevel' to 'logging.level' with no transform), and the new JSON Schema. Apply defaults for anything missing and tell me what got dropped or failed validation."},{"title":"Auditing data loss in a config migration","prompt":"Can you run our old pipeline config through the v2 migration with these mappings and show me the exact list of fields that were dropped because they had no mapping, plus anything that was filled in from schema defaults rather than the original data?"},{"title":"Validating migrated config before deployment","prompt":"Before we deploy, migrate this v1 app config to v2 using our declared field mappings and validate the result against the v2 JSON Schema — I need to know if there are any schema errors, which fields ended up defaulted, and confirm nothing was silently lost."}],"resultDescription":"Returns the fully migrated v2 config object along with three audit lists: 'dropped' (v1 JSON pointers whose values had no v2 destination), 'defaulted' (v2 properties filled from schema defaults rather than v1 data), and 'invalid' (v2 schema validation errors with their JSON paths). Conflicting mappings, overlapping sources, or lossy transforms result in explicit failures rather than silent guesses.","failureModes":["Conflicting mappings (two 'from' pointers map to the same 'to') cause a failure response","Overlapping source pointers in the mapping result in an error rather than a guess","Lossy transforms such as '007' to number, integers beyond 2^53, or arrays with more than one element to first-of-array are rejected as failures","Invalid JSON Schema 2020-12 (non-local $ref, malformed schema) causes a validation error","Exceeding 100 mapping items returns a schema validation error","Malformed JSON pointers in 'from' or 'to' fields cause a parse error"],"whenToPreferThis":"Use this endpoint when an AI agent needs to safely upgrade a user's config file or tool settings from one schema version to another with a full audit trail — especially when silent data loss is unacceptable. Prefer this over manual transformation when you need explicit reporting of dropped, defaulted, and invalid fields, or when you need strict transform safety (rejecting lossy conversions). It is not suitable for inferring mappings automatically; all mappings must be declared explicitly.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:38:20.855Z","isFirstParty":false,"canonicalSlug":"writerslogic-config-migration-api-45c7b8de"}