---
title: "Generate sensor data"
method: POST
path: "/v2/sensor"
---

# Generate sensor data

`POST /v2/sensor`

Generates sensor data that should be posted in order to acquire valid "_abck" cookies

## Headers

- `Content-Type` 'application/json', required
- `x-api-key` string, required

## Request body

- object
  - `abck` string, required — The "_abck" cookie to generate sensor data with. This should be obtained from your cookie jar. The cookie for the first request should be from doing a GET request to the script endpoint.
  - `bmsz` string, required — The "bm_sz" cookie to generate sensor data with.
  - `pageUrl` string, required — The page URL to insert into the generated sensor data. This should be the URL of the page you're currently on, like a product page, login page or home page.
  - `version` string, required — The Akamai version that the site is on. Supported values are "2" and "3". When using v3 dynamic, set this value to "3".
  - `userAgent` string, required — The userAgent that you're using for the entire session
  - `script` string, required — Script contents as string. Mutually exclusive with context. Should only be sent on first sensor request.
  - `scriptUrl` string, required — The script URL that you are posting sensor data to.
  - `ip` string, required — The IP that is used to post the sensor data to the target site. You can use /ip to get the IP from a connection. If you are not using proxies, this will be the IPv4 or IPv6 address of your pc.
  - `acceptLanguage` string, required — Your accept-language header.
  - `context` string, required — Leave empty for first sensor, update with context string from response for later sensors.

## Response `200`

OK Sensor data successfully generated

- object
  - `payload` string — The generated sensor data
  - `context` string — The context value to use for generating the next sensor

## Other responses

- `400` — Bad Request Error occurred
- `403` — Forbidden Authentication error

---

[API](https://skmtc.net/hypersolutions/apis/akm-sensor-data-and-pixel-payload-api.md) · [All operations](https://skmtc.net/hypersolutions/apis/akm-sensor-data-and-pixel-payload-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hypersolutions/akm-sensor-data-and-pixel-payload-api/versions/a4f8dd4657f6/schema)
