listmonk
listmonk copied to clipboard
PUT /api/subscribers/:id doesn't work!
I tried to update a subscriber info by calling PUT /api/subscribers/23 with such a request body:
{ "status": "enabled" }
The request returns 200, but the returned object doesn't change!
@mahmoudmy I presume you got this to work since the issue is closed? I am facing the same problem, no matter what data passed to the PUT endpoint no update is working. How did you manage to use it?
curl 'http://localhost:9000/api/subscribers/2' -X \
PUT 'Content-Type: application/json;charset=utf-8'
--data-raw '{"email":"[email protected]","name":"Anon Doe 123","status":"enabled"}'
Updates and returns:
{
"data": {
"id": 2,
"created_at": "2021-03-09T12:14:22.150395Z",
"updated_at": "2021-03-09T12:14:42.552177Z",
"uuid": "eb4efe02-4e57-4565-be1e-60616b7e93fe",
"email": "[email protected]",
"name": "Anon Doe 123",
"attribs": {},
"status": "enabled",
"lists": [
{
"subscription_status": "unconfirmed",
"id": 2,
"uuid": "5a42c6a4-6367-446a-b1ac-fb1918e29168",
"name": "Opt-in list",
"type": "public",
"optin": "double",
"tags": [
"test"
],
"created_at": "2021-03-09T12:14:22.145619+00:00",
"updated_at": "2021-03-09T12:14:22.145619+00:00"
}
]
}
}
You can inspect the update request going from the UI. It's the same API.