This will allow you to unsubscribe a lead from any specific mailing list. Note that you must have previously created your list within your Kartra account (https://app.kartra.com/communication/lists). The API will fail if it doesn’t find the list within your Kartra account. Moreover, if the lead had not been previously subscribed to that list, the API will take no action.  

TypeParametersValues
POSTcmd*unsubscribe_lead_from_list
POSTlist_name*string

* Required fields Here is an example:

'lead' => [
    'email' => '[email protected]'
],
'actions' => [
    '0' => [
        'cmd' => 'unsubscribe_lead_from_list',
        'list_name' => 'List name'
    ]
]

Success message:

{
  "status": "Success",
  "message": "Lead unsubscribed from list",
  "type": "101"
}
Error Cases:
Type NumberMessageCause
208List cannot be empty
  • 'list_name' parameter it is mandatory and cannot be empty.
209List does not exist
  • The list is not in our database.
An example of an error message:
{
  "status": "Error",
  "message": "List does not exist",
  "type": "209"
}