For the complete documentation index, see llms.txt. This page is also available as Markdown.

Import identifiers

Mark user identifiers for deletion in bulk, without deleting the UserPoint.

Your goal

Remove identifiers from the platform in bulk - account IDs, email hashes, device identifiers - for instance to honour opt-outs or to clean up identifiers you should no longer hold.

Expected outcome

The identifiers in your file are marked for deletion, and the UserPoints they were attached to remain.

Run an identifier import

1

Create the document import

Document type USER_IDENTIFIERS_DELETION, mime type APPLICATION_X_NDJSON. Only ndjson is supported.

curl -X POST \
  https://api.mediarithmics.com/v1/datamarts/<DATAMART_ID>/document_imports \
  -H 'Authorization: <YOUR_API_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
    "document_type": "USER_IDENTIFIERS_DELETION",
    "mime_type": "APPLICATION_X_NDJSON",
    "encoding": "utf-8",
    "name": "<YOUR_DOCUMENT_IMPORT_NAME>"
}'
2

Create an execution with one deletion command per line

Each command is a user account deletion, a user email deletion, or a user agent deletion. Different types can be mixed in the same file.

curl -X POST \
  https://api.mediarithmics.com/v1/datamarts/<DATAMART_ID>/document_imports/<DOCUMENT_IMPORT_ID>/executions \
  -H 'Authorization: <API_TOKEN>' \
  -H 'Content-Type: application/x-ndjson' \
  -d '
    { "type": "USER_ACCOUNT", "compartment_id": "1000", "user_account_id": "8541254132" }
    { "type": "USER_EMAIL", "hash": "<EMAIL_HASH>" }
    { "type": "USER_AGENT", "user_agent_id": "vec:89998434" }
  '
3

Read the result

Check total_success, total_failure, and the error file. See reading the result.

The deletion commands

Field
Type
Description

type

String

USER_ACCOUNT

user_account_id

String

The user account ID.

compartment_id

Number, optional

The compartment associated with the account ID.

{
  "type": "USER_ACCOUNT",
  "compartment_id": "1000",
  "user_account_id": "8541254132"
}
Field
Type
Description

type

String

USER_EMAIL

hash

String

The hash of the email address.

{
  "type": "USER_EMAIL",
  "hash": "<EMAIL_HASH>"
}
Field
Type
Description

type

String

USER_AGENT

user_agent_id

String

A user agent ID other than a device point ID - for example vec:123456 or net:9:12345.

{ "type": "USER_AGENT", "user_agent_id": "vec:89998434" }

What deleting an identifier does not do

Worth being explicit, because it is a common misunderstanding:

It removes
It does not remove

The identifier itself

The UserPoint

The activities, profiles, and segments attached to that UserPoint

If a UserPoint ends up with no activity, no profile, and no USER_LIST segment, it is removed from the platform - but that is the effect of cleaning rules, not of this import.

Verify

  • The execution reports the expected success count.

  • A lookup on a deleted identifier no longer resolves to a UserPoint.

  • The UserPoint itself still exists, with its remaining identifiers.

Last updated

Was this helpful?