# WritersLogic Config Migration API

> WritersLogic Config Migration API is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

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.

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/config-migration?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-config-migration-api-45c7b8de
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_B5OQ83JDybsz4JJx4hb13

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 writerslogic-config-migration-api-45c7b8de -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-config-migration-api-45c7b8de/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
