listmonk unofficial
PUT/subscribers/query/blocklist

Manage the blocklist for subscribers by query

Adds or removes subscribers from the blocklist based on an SQL expression or subscriber identifiers. Provide the expression as plain text or use a JSON body to specify query, ids, and any applicable action, target_list_ids, or status filters.

5 body fields

An optional SQL expression as plain text, or a JSON object containing subscriber selectors and modification options.

querystringoptional
An SQL expression used to select subscribers for blocklist changes.
idsarray<integer>optional
The ids of the subscribers to be modified.
actionstringoptional
Whether to add, remove, or unsubscribe the users.
Allowed:addremoveunsubscribe
target_list_idsintegeroptional
The ids of the lists to be modified.
statusstringoptional
confirmed, unconfirmed, or unsubscribed status.
Allowed:confirmedunconfirmedunsubscribed

1 status code
200Returns an object whose `data` field indicates whether the blocklist operation completed.
databooleanoptional

Error handling

For a JSON body, action must be add, remove, or unsubscribe when supplied, and status must be confirmed, unconfirmed, or unsubscribed when supplied. Use query for an SQL expression or ids to identify the subscribers to modify.