#!/usr/bin/env bash
# Convert a v1-shaped payload to the v2 shape (meta / target + flat activitydata).
# Returns the converted payload only: nothing is calculated or saved.
# Replace YOUR_API_KEY with the key issued after approval.
# Send the result to /api/v2/calculate only, never to the v1 URL.

curl -sS -X POST \
  "https://app.viablepathway.net/api/migrate-payload" \
  -H "Content-Type: application/json" \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -d @request-v1.json \
  -o request-v2-migrated.json
