POST /api/unsubscribe.php
This endpoint can be used to unsubscribe a campaign’s recipient. The added benefit of using this endpoint is that unsubscribe will be reflected in the campaign statistics.
Request parameters
Parameter | Value |
campaign_id | Unique identifier of the campaign, that is returned on campaign launch request or can be found from the results of campaigns list request. Required. |
Recipient’s email address. Required. |
Response parameters
All possible response codes and their descriptions can be found in the “Response codes” page.
Parameter | Value |
code | Response code. |
message | Human-readable response message. |
Example
$ curl -X POST -u "${USERNAME}:${PASSWORD}" \ -H "Content-Type: application/json" \ -d '{"email": "recipient@domain.tld", "campaign_id": 5}' \ "https://${SUBDOMAIN}.sendsmaily.net/api/unsubscribe.php"
(JavaScript/JSON)
{ "code": 101, "message": "OK" }