# Setup

### Authenticating Requests with Your API Key

To access Netmera’s REST API, you must include your **REST API key** in the request headers.

#### How to Get Your API Key

1. Log in to the **Netmera Panel**.
2. Navigate to: **Developers > API**.
3. Copy your **REST API key** from the provided field.

   > Use **only the REST API key** (not JavaScript or mobile keys) for REST API requests.

### How to Add the API Key to Requests

Include the API key in the `X-netmera-api-key` header of your request.

**Example:**

```json
curl -X POST https://restapi.netmera.com/rest/3.0/sendBulkNotification \
  -H "X-netmera-api-key: YOUR_REST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "extId": "user123",
        "notification": {
          "title": "Hello",
          "message": "Welcome to Netmera!"
        }
      }'
```

> Always include the header `Content-Type: application/json` when sending JSON payloads.

### What is `extId` (External ID)?

The `extId` is the unique identifier you assign to a **user** in your system. It ensures consistency across devices and platforms.

#### Key Points:

* It must be **unique per user**.
* Used to group all app installations (e.g., smartphone, tablet) under a single user.
* Required in most REST API requests (e.g., inbox retrieval, status update).

#### Example:

If John uses your app on both an iPhone and an iPad:

* Both installations should send the same `extId`, e.g., `"extId": "john123"`.
* Netmera recognizes these as different devices belonging to the same user.
