User & Device Management

The Netmera API enables server-side management of users, devices, notifications, tags, categories, and profile attributes. You can register users, manage permissions, send notifications, retrieve user data, and manage opt-ins/opt-outs for email and SMS.

General Limitations

  • Maximum 1000 unique external IDs per request: If you need to send data for more than 1000 users, split the request into multiple batches to ensure performance and reliability.

User Deletion

Endpoint: POST /rest/3.0/deleteUsersPermanently Permanently deletes all user data from Netmera. This includes all associated devices, profile attributes, and event history.

This operation is irreversible and requires prior activation through the Netmera panel.

curl -X POST https://restapi.netmera.com/rest/3.0/deleteUsersPermanently \
  -H "X-netmera-api-key: your_rest_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "extIds": [  // Required: Array of external user IDs to delete
      "externalid"
    ]
  }'

Push Notification Permission Management

Disable Push

Endpoint: POST /rest/3.0/disablePush Use to opt-out all devices of a user or a single device from receiving push notifications.

Opt-out by external user ID:

Opt-out by device token:

Enable Push

Endpoint: POST /rest/3.0/enablePush Use to opt-in all devices of a user or a specific device for push notifications.

Opt-in by external user ID:

Opt-in by device token:

Tag Management

Add Tags to Users

Endpoint: POST /rest/3.0/tagUsers Adds one or more tags to the specified users.

Remove Tags from Users

Endpoint: POST /rest/3.0/untagUsers Removes a tag from the specified users.

Category Preferences

Endpoint: POST /rest/3.0/setCategoryPreferences Enables or disables category-specific opt-in preferences for a user.

Profile Attribute Management

Set Profile Attributes

Endpoint: POST /rest/3.0/setProfileAttributes Sets or updates profile attributes for the given users.

Unset Profile Attributes

Endpoint: POST /rest/3.0/unsetProfileAttributes Removes specified keys from the user's profile.

Delete Profile Attributes from All Users

Endpoint: POST /rest/3.0/deleteProfileAttributes Deletes specified profile keys from all users.

Get Profile Attributes

Endpoint: GET /rest/3.0/getProfileAttributes Retrieves the current profile attributes of a user.

Sample response

Push Values to Array Attributes

Endpoint: POST /rest/3.0/pushProfileAttributes Appends values to array-type profile attributes.

Pull Attributes from Array Attributes

Endpoint: POST /rest/3.0/pullProfileAttributes Removes values from array-type profile attributes.

Delete Specific Profile Attributes from All Users

Endpoint: POST /rest/3.0/deleteProfileAttributeValue Deletes a specific value from a profile attribute across all users.

Device Management

Get Devices for a User

Endpoint: GET /rest/3.0/getDevices Returns all devices associated with a user, optionally filtered by push permission.

Sample response

Get All Device Tokens

Endpoint: GET /rest/3.0/getDeviceTokens Fetches device tokens in a paginated format.

Sample Response

Pagination To retrieve the next batch of device tokens, use the nextPage value directly:

Segments

Get Segments

Endpoint: GET /rest/3.0/getSegments Lists all segments defined in the panel.

Sample Response

Get Segment Users

Endpoint: GET /rest/3.0/getSegmentUsers?id= Fetches users in the specified segment ID.

Sample Response

Push Approval

Endpoint: POST /rest/3.0/sendPushApproval Approves a previously created push message.

Email Opt-In/Opt-Out

Enable Email

Endpoint: POST /rest/3.0/enableMail

Disable Email

Endpoint: POST /rest/3.0/disableMail

Update Email

Endpoint: POST /rest/3.0/updateEmail

SMS Opt-In/Opt-Out

Enable SMS

Endpoint: POST /rest/3.0/enableSms

Disable SMS

Endpoint: POST /rest/3.0/disableSms

Update MSISDN

Endpoint: POST /rest/3.0/updateMsisdn

WhatsApp

Netmera provides REST endpoints to enable, disable, and update WhatsApp permissions for users based on extId or msisdn.

Update WhatsApp Number

Updates the WhatsApp number of a WhatsApp user. Both extId and msisdn fields are required.

Enable WhatsApp Permission

Enables WhatsApp permission for one or more users. You can pass either extIds or msisdnList.

Disable WhatsApp Permission

Disables WhatsApp permission for one or more users. You can pass either extIds or msisdnList.

Last updated

Was this helpful?