subscriptionId is the Stripe subscription ID (starts with sub_) of your active monthly AI Insight plan, bought with POST /ai-insight/purchase-plan. IDs from other products (mailbox, ZapCare, ZapShield, Deliverability Test or Pre-Warmed subscriptions) are rejected with 404 Active monthly AI Insight subscription not found, as is a lifetime AI Insight plan. It is not the internal ID returned in data.subscriptionId.newLookupKey is the plan to move to: ai_insight_starter_monthly, ai_insight_growth_monthly or ai_insight_pro_monthly.requiresPayment and invoiceUrl to see whether it still needs paying.POST /ai-insight/purchase-plan, GET /ai-insight/available-credits.curl --location 'https://api.zapmail.ai/api/v3/ai-insight/upgrade-plan' \
--header 'x-auth-zapmail;' \
--header 'Content-Type: application/json' \
--data '{
"subscriptionId": "sub_1Nxyz2AbCdEfGhIj",
"newLookupKey": "ai_insight_pro_monthly"
}'{
"status": 200,
"message": "AI Insight plan upgraded successfully",
"data": {
"subscriptionId": "e4a1b2c3-0d9e-4f8a-b7c6-5d4e3f2a1b09",
"oldLookupKey": "ai_insight_growth_monthly",
"newLookupKey": "ai_insight_pro_monthly",
"invoiceUrl": "https://invoice.stripe.com/i/acct_1Nxyz/live_ghi789",
"invoicePaid": true,
"requiresPayment": false,
"periodStart": 1761465600,
"periodEnd": 1764057600
}
}