Can I delete a User without an ExternalId?

If you don't know the ExtenalId of a User, or if there is a so-called "Lead" (a user without an ExternalId, e.g. a newsletter subscriber that didn't purchase anything yet) then there are two ways to do that with our User Management API:

  1. per single API
  2. per Bulk/Batch API

Single API call

Instead of using the API endpoint https://api.crossengage.io/users/id (with "id" being the ExternalId), you can use https://api.crossengage.io/users/xngId/xngId instead.

Example:

DELETE https://api.crossengage.io/users/xngId/e4163a83-3338-4de8-8b23-35385a92258c

Bulk/Batch API call

With the endpoint https://api.crossengage.io/users/batch

Example:

{
 "deleted": [
	 {"xngId": "e4163a83-3338-4de8-8b23-35385a92258c"},
	 {"xngId": "82ea0c99-c846-41cc-9b52-e491ec611aa8"}
 ],
 "updated": [{ }]
}

Deleting users with one of these two methods is the only place where xngId can be used as the identifier! In any other API call (incl. the "updated"-array of the batch call) you need to specify the correct identifier (id/externalId or email+businessUnit.)