> For the complete documentation index, see [llms.txt](https://user.netmera.com/netmera-developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api.md).

# REST API

The Netmera REST API lets your backend manage users and devices, send push, email and SMS messages, read message statistics and query application data without going through the panel.

* **Base URL:** `https://restapi.netmera.com`
* **Authentication:** every request must carry your REST API key in the `X-netmera-api-key` header. See [Setup](/netmera-developer-guide/api-documentation/rest-api/setup.md) for where to find the key and how the `extId` (external user ID) works.
* **Format:** request and response bodies are JSON (`Content-Type: application/json`) unless an endpoint states otherwise. Error responses are listed on the [Error Responses](/netmera-developer-guide/api-documentation/rest-api/error-responses.md) page.

{% hint style="info" %}
Most write endpoints accept at most 1000 unique external IDs per request. Split larger batches into multiple requests.
{% endhint %}

## Endpoint Index

All paths below are relative to the base URL. The **Docs** column links to the section that documents the endpoint.

### Notifications

| Method | Endpoint                                 | Description                                                                 | Docs                                                                                                                                                                  |
| ------ | ---------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| POST   | `/rest/3.0/sendBulkNotification`         | Send a campaign push, web push or Live Activity to a target audience        | [Mobile Bulk Notification](/netmera-developer-guide/api-documentation/rest-api/notifications.md#send-notification-basic)                                              |
| POST   | `/rest/3.0/sendNotification`             | Send a predefined (transactional) notification to specific users or devices | [Transactional Notification](/netmera-developer-guide/api-documentation/rest-api/notifications.md#send-transactional-notification)                                    |
| POST   | `/rest/3.0/createNotificationDefinition` | Save a notification definition and get its `notificationKey`                | [Notification Definition](/netmera-developer-guide/api-documentation/rest-api/notifications.md#create-transactional-notification-definition)                          |
| POST   | `/rest/3.0/sendEmailAndSms`              | Define an email or SMS message inline and send it to targets                | [Email](/netmera-developer-guide/api-documentation/rest-api/notifications.md#e-mail), [SMS](/netmera-developer-guide/api-documentation/rest-api/notifications.md#sms) |
| POST   | `/rest/3.0/sendEmailWithAttachment`      | Send a transactional email with file attachments                            | [Send Email with Attachment](/netmera-developer-guide/api-documentation/rest-api/notifications.md#send-email-with-attachment)                                         |
| POST   | `/rest/3.0/sendBulkEmail`                | Trigger an existing email template for a target audience                    | [Trigger an Existing Email Template](/netmera-developer-guide/api-documentation/rest-api/notifications.md#trigger-an-existing-email-template-via-api)                 |
| GET    | `/rest/3.0/getPushStats`                 | Sent, failed and clicked counts for a message or a date range               | [Push Stats](/netmera-developer-guide/api-documentation/rest-api/notifications.md#push-stats)                                                                         |
| GET    | `/rest/3.0/getPushResult`                | Per-recipient delivery results, paginated                                   | [Get Push Result](/netmera-developer-guide/api-documentation/rest-api/notifications.md#get-push-result)                                                               |
| GET    | `/rest/3.0/getPushCategories`            | List the message categories of the application                              | [Push Categories](/netmera-developer-guide/api-documentation/rest-api/notifications.md#push-categories)                                                               |
| POST   | `/rest/3.0/update-live-activity`         | Update or end an iOS Live Activity                                          | [Live Activities](/netmera-developer-guide/platforms/ios/new-ios-swift/live-activities.md)                                                                            |

### Events

| Method | Endpoint               | Description                              | Docs                                                                    |
| ------ | ---------------------- | ---------------------------------------- | ----------------------------------------------------------------------- |
| POST   | `/rest/3.0/fireEvents` | Send custom or standard events for users | [Events](/netmera-developer-guide/api-documentation/rest-api/events.md) |

### User & Device Management

| Method | Endpoint                            | Description                                           | Docs                                                                                                                                                                   |
| ------ | ----------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| POST   | `/rest/3.0/registerUsers`           | Register or update users and their devices            | [User Registration](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#user-registration)                                               |
| POST   | `/rest/3.0/deleteUsers`             | Delete users from the application                     | [Delete Users](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#delete-users)                                                         |
| POST   | `/rest/3.0/deleteUsersPermanently`  | Permanently erase all data of the given users         | [Delete Users Permanently](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#delete-users-permanently)                                 |
| POST   | `/rest/3.0/enablePush`              | Opt a user or device in to push notifications         | [Enable Push](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#enable-push)                                                           |
| POST   | `/rest/3.0/disablePush`             | Opt a user or device out of push notifications        | [Disable Push](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#disable-push)                                                         |
| POST   | `/rest/3.0/tagUsers`                | Add a tag to users                                    | [Add Tags to Users](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#add-tags-to-users)                                               |
| POST   | `/rest/3.0/untagUsers`              | Remove a tag from users                               | [Remove Tags from Users](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#remove-tags-from-users)                                     |
| POST   | `/rest/3.0/setCategoryPreferences`  | Set a user's opt-in preference for a message category | [Category Preferences](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#category-preferences)                                         |
| GET    | `/rest/3.0/getCategoryPreferences`  | Read a user's message category preferences            | [Category Preferences](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#category-preferences)                                         |
| GET    | `/rest/3.0/getProfileAttributes`    | Read a user's profile attributes                      | [Get Profile Attributes](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#get-profile-attributes)                                     |
| POST   | `/rest/3.0/setProfileAttributes`    | Set or update profile attributes of users             | [Set Profile Attributes](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#set-profile-attributes)                                     |
| POST   | `/rest/3.0/unsetProfileAttributes`  | Remove profile attributes from users                  | [Unset Profile Attributes](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#unset-profile-attributes)                                 |
| POST   | `/rest/3.0/pushProfileAttributes`   | Append values to array-type profile attributes        | [Push Values to Array Attributes](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#push-values-to-array-attributes)                   |
| POST   | `/rest/3.0/pullProfileAttributes`   | Remove values from array-type profile attributes      | [Pull Attributes from Array Attributes](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#pull-attributes-from-array-attributes)       |
| POST   | `/rest/3.0/deleteProfileAttributes` | Delete profile attributes from all users              | [Delete Profile Attributes from All Users](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#delete-profile-attributes-from-all-users) |
| GET    | `/rest/3.0/getDevices`              | List the devices of a user                            | [Get Devices for a User](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#get-devices-for-a-user)                                     |
| GET    | `/rest/3.0/getDeviceTokens`         | List all device tokens, paginated                     | [Get All Device Tokens](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#get-all-device-tokens)                                       |
| POST   | `/rest/3.0/addTesters`              | Register users' devices as test devices               | [Test Devices](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#test-devices)                                                         |
| GET    | `/rest/3.0/count-user`              | Count users with push permission                      | [User Count](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#user-count)                                                             |
| POST   | `/rest/3.0/promotion/add`           | Assign promotion codes to users                       | [Promotion Codes](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#promotion-codes)                                                   |
| POST   | `/rest/3.0/addEmail`                | Create users from a list of email addresses           | [Add or Update Emails](/netmera-developer-guide/api-documentation/rest-api/notifications.md#add-or-update-emails)                                                      |
| POST   | `/rest/3.0/enableMail`              | Opt users in to email                                 | [Enable Email Permission](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#enable-email-permission)                                   |
| POST   | `/rest/3.0/disableMail`             | Opt users out of email                                | [Disable Email Permission](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#disable-email-permission)                                 |
| POST   | `/rest/3.0/updateEmail`             | Change a user's email address                         | [Update Email Address](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#update-email-address)                                         |
| POST   | `/rest/3.0/addMsisdn`               | Create users from a list of phone numbers             | [Add or Update MSISDN](/netmera-developer-guide/api-documentation/rest-api/notifications.md#add-or-update-msisdn-phone-number)                                         |
| POST   | `/rest/3.0/enableSms`               | Opt users in to SMS                                   | [Enable SMS Permission](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#enable-sms-permission)                                       |
| POST   | `/rest/3.0/disableSms`              | Opt users out of SMS                                  | [Disable SMS Permission](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#disable-sms-permission)                                     |
| POST   | `/rest/3.0/updateMsisdn`            | Change a user's phone number                          | [Update MSISDN](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#update-msisdn)                                                       |
| POST   | `/rest/3.0/enableWhatsApp`          | Grant WhatsApp permission to users                    | [Enable WhatsApp Permission](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#enable-whatsapp-permission)                             |
| POST   | `/rest/3.0/disableWhatsApp`         | Revoke WhatsApp permission from users                 | [Disable WhatsApp Permission](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#disable-whatsapp-permission)                           |
| POST   | `/rest/3.0/updateWhatsApp`          | Change a user's WhatsApp number                       | [Update WhatsApp Number](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#update-whatsapp-number)                                     |

### Application Data

| Method | Endpoint                           | Description                                            | Docs                                                                                                                                   |
| ------ | ---------------------------------- | ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| GET    | `/rest/3.0/app/profile-attributes` | List standard and custom profile attribute definitions | [Profile Attribute Definitions](/netmera-developer-guide/api-documentation/rest-api/application-data.md#profile-attribute-definitions) |
| GET    | `/rest/3.0/app/events`             | List standard and custom event definitions             | [Event Definitions](/netmera-developer-guide/api-documentation/rest-api/application-data.md#event-definitions)                         |

### Segments & Targeting

| Method | Endpoint                          | Description                                                   | Docs                                                                                                                                 |
| ------ | --------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| GET    | `/rest/3.0/getSegments`           | List the segments defined in the panel                        | [Get Segments](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#get-segments)                       |
| GET    | `/rest/3.0/getSegmentUsers`       | List the users of a segment, paginated                        | [Get Segment Users](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#get-segment-users)             |
| POST   | `/rest/3.0/createSegment`         | Create a segment from one or more conditions                  | [Create Segment](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#create-segment)                   |
| GET    | `/rest/3.0/getSegment`            | Read the calculation status and user count of a segment       | [Get Segment](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#get-segment)                         |
| POST   | `/rest/3.0/updateSegment`         | Change the conditions of a segment and calculate it again     | [Update Segment](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#update-segment)                   |
| POST   | `/rest/3.0/changeSegmentStatus`   | Delete a segment or reopen a deleted one                      | [Change Segment Status](/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md#change-segment-status)     |
| POST   | `/rest/3.0/targeting/count`       | Count the users matching a target expression                  | [Favorite Count & Social Proof](/netmera-developer-guide/api-documentation/rest-api/favorite-count-and-social-proof.md#api-endpoint) |
| POST   | `/rest/3.0/targeting/count-batch` | User count per value of one profile or installation attribute | [Audience Breakdown](/netmera-developer-guide/api-documentation/rest-api/favorite-count-and-social-proof.md#audience-breakdown)      |

### Inbox

| Method | Endpoint                       | Description                                     | Docs                                                                                                                  |
| ------ | ------------------------------ | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| POST   | `/rest/3.0/inbox/getAllInbox`  | List a user's inbox messages with unread counts | [Inbox Feature](/netmera-developer-guide/api-documentation/rest-api/inbox-feature.md#inbox-retrieval)                 |
| GET    | `/rest/3.0/inbox/get`          | Fetch a single inbox message                    | [Inbox Feature](/netmera-developer-guide/api-documentation/rest-api/inbox-feature.md#retrieve-a-single-inbox-message) |
| POST   | `/rest/3.0/inbox/statusChange` | Mark inbox messages as read, unread or deleted  | [Inbox Feature](/netmera-developer-guide/api-documentation/rest-api/inbox-feature.md#change-message-status)           |

### Geofence

| Method | Endpoint                    | Description             | Docs                                                                                                    |
| ------ | --------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------- |
| POST   | `/rest/3.0/geofence/add`    | Create a geofence       | [Geofence](/netmera-developer-guide/api-documentation/rest-api/notifications.md#create-geofence)        |
| POST   | `/rest/3.0/geofence/remove` | Delete a geofence by ID | [Remove Geofence](/netmera-developer-guide/api-documentation/rest-api/notifications.md#remove-geofence) |

### VIA / İYS Consent

| Method | Endpoint                              | Description                                                  | Docs                                                                                                                                     |
| ------ | ------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| POST   | `/rest/via/consent`                   | Start an İYS consent (ETK / KVK) request by short URL or OTP | [Short URL Consent Requests](/netmera-developer-guide/integrations/via-integration/short-url-consent-requests.md)                        |
| POST   | `/rest/via/confirm`                   | Complete an OTP consent request with the verification code   | [OTP Confirmation Completion](/netmera-developer-guide/integrations/via-integration/otp-consent-requests/otp-confirmation-completion.md) |
| POST   | `/rest/via/generate-reject-mail-link` | Generate email opt-out links through İYS                     | [VIA Email Rejection Link Generation](/netmera-developer-guide/integrations/via-integration/via-email-rejection-link-generation.md)      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
