Follow

Delete Subscriber

The Delete command allows you to remove one or more Subscribers from your realm.

Arguments

The Delete command requires the following arguments: Command and Data.

cmd=delete&data=email^john.smith@domain.com

The command is ‘delete' and the subscriber record for the email 'john.smith@domain.com'  will be deleted in the realm. 

The Delete command is not list specific because it involves the entire Subscriber record and related information.  It also generates a Global Optout record, preventing the email address from being later subscribed to any list.  Any subsequent attempt to resubscribe will result in failure. The Delete command supports the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=delete

Realm

 

Name of the realm to run the command.  This is optional, and only necessary when submitting files to a parent realm to manipulate data for a child realm.

realm=[realm_name]

Data Yes Subscriber related data.  Email is always required, and additional fields are optional.  Be sure to include First Name if duplicate subscribers exist with the same email address.

data=[fields]

 

Example

Using all commands and arguments (please note the command is wrapped for display purposes only):

cmd=delete&realm=myrealm_child&data=email,first ^jane@domain.com,Jane ^jane@domain.com,JD ^john@domain.com,John

Three subscribers will be deleted from the realm 'myrealm_child', a child of the realm defined in the header, and an Optout record will be created for each.

Please note that the Delete action cannot be undone.  Be sure to double check the Subscriber before deleting data.

Customer Key Example

Some systems have the ability to define a unique Customer Key per subscriber.  If your realm has Customer Key enabled, then you must include the customer_key in the data argument along with email.  For example:

cmd=delete&realm=myrealm_child&data=customer_key,email^11293,jane@domain.com

If the Customer Key is not included, the command will fail.

Errors

A Delete command will fail if a subscriber record for the email address does not exist.  Delete will also fail if more than one subscriber is found with the same email address.  Since Subscriber records are allowed to have the same Email address as long as the First Name is unique, you may wish to include the first name in your Delete command to avoid encountering errors or removing the wrong Subscriber.

Notes

If using the Relational Tables feature, when a subscriber is deleted foreign key data dependent on that subscriber will also be removed. This is true for both a regular table and a join table; however, not stored data in a flat table.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk