Invalid API Request Params when Creating Subscriber via API

sudomanaged

New Member
Hi MailWizz Community,

I’m currently trying to add subscribers to a MailWizz list via the API but keep getting the error:

Invalid API request params. Please refer to the documentation.

Here is the setup:

API Version: Using the latest version (confirmed via MailWizz documentation)
API Endpoint: /api/lists/<listUid>/subscribers
Parameters: Sending the request with the following fields:
subscribers[0]: bob@biller.com
subscribers[0][FNAME]: Bob
subscribers[0][LNAME]: Biller
listUid: Verified (the list exists)
API Key: (Note: This will not be shared for security reasons)

Code Example (Curl Request):

curl -X POST "https://oss.sudomanaged.com/api/lists/<listUid>/subscribers" \
-H "Accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "X-MW-API-KEY: YOUR_API_KEY" \
--data-urlencode "subscribers[0]=bob@biller.com" \
--data-urlencode "subscribers[0][FNAME]=Bob" \
--data-urlencode "subscribers[0][LNAME]=Biller"

What I have tried:​

  • Ensured the listUid is correct and exists.
  • Verified the MailWizz API key has the correct permissions.
  • Tried simplifying the data (only sending EMAIL, FNAME, LNAME).
  • Ensured MySQL configured to accept API server requests
  • Checked the MailWizz logs (no clear indication on the server side).
I’ve been reviewing the documentation thoroughly, but still can’t figure out why I’m getting the error. Does anyone have insights into what might be causing this or any tips on what I might have missed?
Thanks in advance for your help!
 
Last edited:
I’ve been reviewing the documentation thoroughly, but still can’t figure out why I’m getting the error. Does anyone have insights into what might be causing this or any tips on what I might have missed?
Thanks in advance for your help!
Bellow one example how to use this:

Code:
curl -X 'POST' \
  'https://test.mailwizz.com/api/index.php/lists/[LIST_UID]/subscribers' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: [API_KEY]' \
  -H 'Content-Type: multipart/form-data' \
  -F 'EMAIL=laurentiu.zorila+1@onetwist.com' \
  -F 'FNAME=Zorila' \
  -F 'LNAME=Laurentiu' \
  -F 'details[status]=confirmed' \

Also since version 2.5.7 you can test the API calls using the OpenApi docs, accessible here: (`/api/index.php/docs`)
 
Back
Top