> ## 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 BMP sensor

> Generates a BMP sensor and returns the device it came from. Send the app key, the proxy the session will use and a language. Set `android` or `ipad` for those devices; the default is an iPhone. Pass `deviceId` on later calls to continue the same device.



## OpenAPI

````yaml api-reference/openapi/akamai-bmp.yaml POST /sensor
openapi: 3.1.1
info:
  title: Roolink Akamai BMP API
  summary: >-
    Generate Akamai BMP (Bot Manager Premier) sensor data for iOS and Android
    apps.
  description: >-
    Endpoints for mobile apps built with Akamai's Bot Manager Premier SDK. Send
    your key in `X-Api-Key`, JSON in and out. The Akamai BMP guides show how to
    use the result.
  version: 1.0.0
  contact:
    name: Roolink Support
    url: https://roolink.io
    email: support@roolink.io
servers:
  - url: https://bmp.roolink.io/api/v1
    description: Production
security:
  - apiKey: []
paths:
  /sensor:
    post:
      summary: Generate BMP sensor
      description: >-
        Generates a BMP sensor and returns the device it came from. Send the app
        key, the proxy the session will use and a language. Set `android` or
        `ipad` for those devices; the default is an iPhone. Pass `deviceId` on
        later calls to continue the same device.
      operationId: generateSensor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SensorRequest'
      responses:
        '200':
          description: Sensor generated.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/AndroidSensorResponse'
                  - $ref: '#/components/schemas/IOSSensorResponse'
                discriminator:
                  propertyName: platform
                  mapping:
                    android:
                      $ref: '#/components/schemas/AndroidSensorResponse'
                    ios:
                      $ref: '#/components/schemas/IOSSensorResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/QuotaExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    SensorRequest:
      type: object
      required:
        - app
        - proxy
      properties:
        app:
          type: string
          minLength: 1
          description: The app key for the target app. Required on every request.
        proxy:
          type: string
          minLength: 1
          description: >-
            Proxy the session will use, as `scheme://[user:pass@]host:port`.
            Send the same one on every request for this device.
          example: http://user:pass@proxy.example.com:8080
        language:
          type: string
          description: >-
            Language and region for the device, such as `en-US`. Defaults to
            `en-US`.
          pattern: ^[a-z]{2}-[A-Z]{2}$
          example: en-US
          default: en-US
        android:
          type: boolean
          description: If `true`, generate an Android sensor. Otherwise iOS.
          default: false
        ipad:
          type: boolean
          description: >-
            For iOS only — if `true`, emulate an iPad. Ignored when `android:
            true`.
          default: false
        deviceId:
          type: string
          description: >-
            The `deviceId` from an earlier response, to continue that device.
            Omit on the first call.
          example: 9F1A2B3C-4D5E-6F7A-8B9C-0D1E2F3A4B5C
    AndroidSensorResponse:
      allOf:
        - $ref: '#/components/schemas/SensorResponseBase'
        - type: object
          required:
            - android
            - deviceModel
            - deviceManufacturer
            - appVersionCode
            - sdkVersion
          properties:
            platform:
              type: string
              const: android
            android:
              type: string
              description: Android OS release (e.g. `13`).
              example: '13'
            deviceModel:
              type: string
              description: Android model name configured for the emulated device.
              example: Pixel 7
            deviceManufacturer:
              type: string
              description: Android manufacturer configured for the emulated device.
              example: Google
            appVersionCode:
              type: integer
              description: Android `versionCode` integer.
            sdkVersion:
              type: string
              description: Akamai SDK version baked into the fingerprint.
    IOSSensorResponse:
      allOf:
        - $ref: '#/components/schemas/SensorResponseBase'
        - type: object
          required:
            - ios
            - kernelOsRelease
            - kernelOsVersion
            - machineId
          properties:
            platform:
              type: string
              const: ios
            ios:
              type: string
              description: iOS release version (for example, `26.6`).
              example: '26.6'
            kernelOsRelease:
              type: string
              description: Darwin kernel release associated with the selected iOS version.
              example: 25.6.0
            kernelOsVersion:
              type: string
              description: >-
                Apple OS build identifier associated with the selected iOS
                version.
              example: 23G71
            machineId:
              type: string
              description: >-
                iOS hardware identifier of the emulated device (for example,
                `iPhone18/2`).
    SensorResponseBase:
      type: object
      required:
        - sensor
        - platform
        - deviceId
        - appVersion
        - screenHeight
        - screenWidth
        - language
        - cookies
      properties:
        sensor:
          type: string
          description: >-
            Signed BMP sensor payload. Send it in the target request's
            `X-acf-sensor-data` header.
        platform:
          type: string
          enum:
            - android
            - ios
        deviceId:
          type: string
          description: >-
            Identifier of the generated device. Pass it back to continue the
            same device.
        appVersion:
          type: string
          description: App version the device reports.
        screenHeight:
          type: integer
          description: Screen height configured for the emulated device.
        screenWidth:
          type: integer
          description: Screen width configured for the emulated device.
        language:
          type: string
          description: >-
            Device language. Android returns the language only, such as `en`;
            iOS returns the full value, such as `en-US`.
        cookies:
          type: array
          items:
            $ref: '#/components/schemas/Cookie'
          description: Cookies the SDK collected. Seed them into your client.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
    Cookie:
      type: object
      required:
        - name
        - value
        - domain
      properties:
        name:
          type: string
        value:
          type: string
        domain:
          type: string
  responses:
    BadRequest:
      description: Required fields missing or malformed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: app and proxy are required
        text/plain:
          schema:
            type: string
          example: Bad Request
    Unauthorized:
      description: Missing or invalid `X-Api-Key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    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 error while generating the sensor.
      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: Issued from the Roolink dashboard. Treat like a password.

````