> ## Documentation Index
> Fetch the complete documentation index at: https://docs.veilroute.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate a BMP sensor

> POST /api/v1/sensor on bmp.veilroute.dev

```http theme={null}
POST https://bmp.veilroute.dev/api/v1/sensor
```

Generates a mobile SDK sensor for the `x-acf-sensor-data` header.

## Request

### Headers

**X-Api-Key** `string` *required*

Your Akamai BMP API key. May also be sent as `Authorization: Bearer <key>`.

**Content-Type** `string` *required*

Must be `application/json`.

### Body

**app** `string` *required*

Identifier of the target mobile app (its package / bundle id, e.g. `com.example.app`).

**language** `string`

Optional device language hint (for example `pt-BR`).

## Response

**sensor** `string`

The sensor value. Send it as the `x-acf-sensor-data` header on your request.

**deviceId** `string`

The device identifier bound to this sensor.

**platform** `string`

Always `android`.

**android** `string`

Android version reported by the sensor (for example `14`).

**sdkVersion** `string`

Akamai mobile SDK version (for example `4.2.0`).

**latencyMs** `number`

Time VeilRoute spent generating the sensor, in milliseconds.

```bash curl theme={null}
curl -X POST https://bmp.veilroute.dev/api/v1/sensor \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: $VEILROUTE_KEY" \
  -d '{"app":"com.example.app"}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://bmp.veilroute.dev/api/v1/sensor",
    headers={"X-Api-Key": os.environ["VEILROUTE_KEY"]},
    json={"app": "com.example.app"},
    timeout=30,
)
sensor = r.json()["sensor"]
```

```javascript Node theme={null}
const res = await fetch("https://bmp.veilroute.dev/api/v1/sensor", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-Api-Key": process.env.VEILROUTE_KEY,
  },
  body: JSON.stringify({ app: "com.example.app" }),
});
const { sensor } = await res.json();
```

```json 200 OK theme={null}
{
  "sensor": "1.70.0~4~abcd...",
  "deviceId": "f1e2d3c4-...",
  "platform": "android",
  "android": "14",
  "sdkVersion": "4.2.0",
  "latencyMs": 42
}
```

See [Errors](/errors) for non-`200` responses.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.