Subscribe subscribers with the Marketing API
Re-subscribes one or more subscribers, identified by their UUIDs.
When subscription_list_ids is supplied, the matching subscriptions have their unsubscribed_at cleared. When it is omitted, only the global opt-out (opted_out_on) is cleared and list-level opt-outs are left untouched.
In both cases the global opt-out is cleared, because a subscriber who is subscribed to any list is by definition not globally unsubscribed.
Example curl command:
curl -X POST \
https://api.paubox.com/v1/marketing/subscriptions/subscribe \
-H 'authorization: Token token=YOUR_API_KEY' \
-H 'content-type: application/json' \
-d '{
"subscriber_ids": ["8f14e45f-ceea-467a-9f2c-4b3d2a1e5c60"],
"subscription_list_ids": ["123e4567-e89b-12d3-a456-426614174000"]
}'
Authorizations
Token-based authentication. Use format: "Token token=<API_KEY>" where <API_KEY> is your API key
Body
Response
The affected subscribers. If the operation raises, the response is still 200 but the body contains an errors string.