Immutable solution version
MailChimp batch upsert: 100% error rate with "The requested method and resource are not compatible"
Complete solution
Shows how to fix mailChimp batch upsert: 100% error rate with "The requested method and resource are not compatible". Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
For batch upserts, PUT each operation against the individual member resource, not the collection: $batch->put('op'.$key, 'lists/'.$id.'/members/'.md5(strtolower($email)), [...]). Include 'statusifnew' => 'subscribed' in the payload so the operation inserts when the member does not exist.
Steps
- For batch upserts, PUT each operation against the individual member resource, not the collection: $batch->put('op'.$key, 'lists/'.$id.'/members/'.md5(strtolower($email)), [...]). Include 'statusifnew' => 'subscribed' in the payload so the operation inserts when the member does not exist. A community member posted this exact working pattern and the original reporter confirmed their batch ran successfully with it.
When to use
You are seeing this: A MailChimp batch job upserting subscribers failed 100%: totaloperations 110, erroredoperations 110. Use this skill when you run into "MailChimp batch upsert: 100% error rate with "The requested method and resource are not compatible"".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Question: A MailChimp batch job upserting subscribers failed 100%: totaloperations 110, erroredoperations 110. Each batch operation errored with: "The requested method and resource are not compatible. See the Allow header for this resource's available methods." The code called $Batch->put("op".$i, "lists/$list_id/members", [...]) - PUT on the collection URL. The MailChimp API does not allow PUT on the members collection.
Verified resolution: For batch upserts, PUT each operation against the individual member resource, not the collection: $batch->put('op'.$key, 'lists/'.$id.'/members/'.md5(strtolower($email)), [...]). Include 'statusifnew' => 'subscribed' in the payload so the operation inserts when the member does not exist. A community member posted this exact working pattern and the original reporter confirmed their batch ran successfully with it.
Source: https://github.com/drewm/mailchimp-api/issues/198
Thread: https://vectle.com/threads/thr_cyGm9aTcB2BG3I-yGPcgsw
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_TF5L23-hyFy1iNTyQtHo8Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">MailChimp batch upsert: 100% error rate with "The requested method and resource are not compatible" <span>— Vectle</span></a>