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

# Generate sensor data

> Generates the sensor payload that earns a valid `_abck` cookie. Send the page URL, your User-Agent, the current `_abck` and `bm_sz` cookies, the script URL and the `scriptData` from `/parse`. Post the returned `sensor` to the script URL on the site, then check the cookie for `~0~`. Set `stepper` to true and count `index` from 0 so each post continues the same visitor.



## OpenAPI

````yaml api-reference/openapi/akamai-web.yaml POST /sensor
openapi: 3.1.1
info:
  title: Roolink Akamai Web API
  summary: >-
    Bypass Akamai Bot Manager on the web — sensor (`_abck`), SBSD, Pixel
    (`ak_bmsc`), SEC-CPT, and script parsing.
  description: >-
    Endpoints for websites behind Akamai Bot Manager. Send your key in
    `X-Api-Key`, JSON in and out. The Akamai Web guides show the order to call
    them in.
  version: 1.0.0
  contact:
    name: Roolink Support
    url: https://roolink.io
    email: support@roolink.io
servers:
  - url: https://web.roolink.io/api/v1
    description: Production
security:
  - apiKey: []
paths:
  /sensor:
    post:
      summary: Generate sensor data
      description: >-
        Generates the sensor payload that earns a valid `_abck` cookie. Send the
        page URL, your User-Agent, the current `_abck` and `bm_sz` cookies, the
        script URL and the `scriptData` from `/parse`. Post the returned
        `sensor` to the script URL on the site, then check the cookie for `~0~`.
        Set `stepper` to true and count `index` from 0 so each post continues
        the same visitor.
      operationId: generateAkamaiSensor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SensorRequest'
            examples:
              v3:
                summary: v3 sensor (with parsed scriptData)
                value:
                  userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
                  url: https://target.example.com/
                  language: en-US
                  _abck: ''
                  bm_sz: ''
                  scriptUrl: https://target.example.com/4Z8gP2KrLm9Q/dynamic
                  scriptData:
                    ver: '1'
                    key: 1234567890
                    dvc: abc123
                    din:
                      - 12
                      - 7
                      - 18
              legacy:
                summary: Legacy sensor (no scriptData)
                value:
                  userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
                  url: https://target.example.com/
                  language: en-US
      responses:
        '200':
          description: Sensor generated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SensorResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/DeviceProfileNotFound'
        '429':
          $ref: '#/components/responses/QuotaExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    SensorRequest:
      type: object
      required:
        - userAgent
        - url
      description: >-
        The session the sensor is for. The User-Agent and URL must match the
        client that posts it.
      properties:
        userAgent:
          type: string
          description: Session user agent.
        flags:
          type: string
          description: Optional. Flag string, when the site's script uses one.
        url:
          type: string
          format: uri
          description: Target page URL. Must include `https://`.
          example: https://target.example.com/
        _abck:
          type: string
          description: Current `_abck` cookie value. Empty string on the first request.
        bm_sz:
          type: string
          description: Current `bm_sz` cookie value. Empty string on the first request.
        sec_cpt:
          type: boolean
          default: false
          description: >-
            Set true when the site has already issued a Sec-CPT challenge in
            this session.
        index:
          type: integer
          description: Attempt number, counting from 0, when `stepper` is true.
        stepper:
          type: boolean
          default: false
          description: >-
            Continue the same visitor across posts. Set true and count `index`
            up per post.
        keyboard:
          type: boolean
          default: false
          description: Include synthetic keyboard events in the sensor.
        language:
          type: string
          description: Accept-Language value the session sends.
          example: en-US
        scriptData:
          $ref: '#/components/schemas/ScriptData'
        scriptUrl:
          type: string
          format: uri
          description: The script URL from the page. Post the returned sensor there.
    SensorResponse:
      type: object
      required:
        - sensor
      properties:
        sensor:
          type: string
          description: Sensor payload. Post it to `scriptUrl` on the site.
    ScriptData:
      type: object
      required:
        - ver
        - key
        - dvc
        - din
      description: >-
        The parsed-script values returned by `POST /parse`. Pass through
        unchanged.
      properties:
        ver:
          type: string
          minLength: 1
          example: '1'
        key:
          type: integer
          format: int64
          example: 1234567890
        dvc:
          type: string
          minLength: 1
          example: abc123
        din:
          type: array
          minItems: 1
          items:
            type: integer
            minimum: 0
            maximum: 22
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
    DeviceProfileNotFound:
      type: object
      required:
        - error
        - user_agent
      properties:
        error:
          type: string
          enum:
            - no device profile for user agent
        user_agent:
          type: string
          description: The user agent for which no device profile is currently available.
  responses:
    BadRequest:
      description: Required fields missing or malformed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
        text/plain:
          schema:
            type: string
          example: invalid request body
    Unauthorized:
      description: Missing or invalid `X-Api-Key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    DeviceProfileNotFound:
      description: No device profile is available for the requested user agent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeviceProfileNotFound'
    QuotaExceeded:
      description: The key has no quota or balance left for this product.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: quota exhausted
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
        text/plain:
          schema:
            type: string
          example: internal server error
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Customer API key issued from the Roolink dashboard.

````