Skip to main content
POST
Clears the unsubscribe that Unsubscribe Lead or Unsubscribe Lead from Campaign set, for up to 100 leads in one call. Each lead is either cleared or returned in skipped with a reason.
A lead who unsubscribed by clicking an unsubscribe link in one of your emails is never resubscribed by this endpoint: it is skipped with the reason unsubscribed_via_email_link.
Resubscribing clears the unsubscribe at the level you choose only: a lead that is also unsubscribed at another level (for example on another client) stays unsubscribed there. Campaigns where the lead was already stopped stay stopped; the lead is not added back to any campaign and nothing is sent because of this call.

Query Parameters

string
required
Your SmartLead API key

Request Body

string
required
Where to clear the unsubscribe: account, campaign or client.
  • account: the unsubscribe on your main account (campaigns without a client). Not available with a client API key.
  • campaign: the unsubscribe that applies to this campaign, which is its client’s when the campaign belongs to a client, otherwise your account’s. Requires campaign_id.
  • client: the unsubscribe on one client. Requires client_id. A client API key can only use its own client.
array
required
Lead ids (positive integers, no duplicates), 1 to 100.
number
Required when level is campaign; not allowed otherwise.
number
Required when level is client; not allowed otherwise.

Response Fields

array
Lead ids whose unsubscribe was cleared at this level
array
One { "lead_id", "reason" } per lead left unchanged. reason is not_found (no such lead in your account, or not in that client), not_unsubscribed_at_level (the lead is not unsubscribed at this level) or unsubscribed_via_email_link (the lead clicked an unsubscribe link; never cleared by the API).
number | null
The campaign, for level: "campaign"; otherwise null
number | null
The client whose unsubscribe was cleared: the given client, or the campaign’s client; null for your main account

Response Codes

Success
Done. Read cleared and skipped: a lead can be skipped even when the call succeeds.
Bad Request
Invalid body: unknown level, more than 100 or duplicate lead_ids, or campaign_id / client_id missing or sent with the wrong level
Not Found
The campaign or client is not yours (Campaign not found - Invalid campaign_id., Client not found - Invalid client_id.), or level: "account" was used with a client API key (Account level is not available for client API keys.)
Too Many Requests
More than 10 calls in 60 seconds. See Rate Limits.