---
title: "Create devices"
method: POST
path: "/v2/organisations/{organisation_id}/devices"
tags: ["Gateway GRPC"]
---

# Create devices

`POST /v2/organisations/{organisation_id}/devices`

## Request

- Base URL: `https://api.cautio.in` (the document declares no server; this is the origin it was published from)
- URL: `https://api.cautio.in/v2/organisations/{organisation_id}/devices`
- Auth: HTTP bearer

Create new devices

## Path parameters

- `organisation_id` string, required

## Request body

- CreateDevicesRequestDto
  - `items` CreateDeviceRequestDto[], required: List of devices to create
    - `entity_type` 0 | 1, required: Entity type
    - `entity_id` string, required: Entity ID
    - `device_number` string, required: Device number
    - `model_name` string, required: Device model name
    - `alias_name` string: Device alias name
    - `sim_card_number` string: SIM card number
    - `firmware_version` string: Firmware version
    - `dashcam` DashcamDataDto
      - `channels` ChannelDto[], required: Dashcam channels
        - `alias_name` string, required: Channel alias name
        - `enabled` boolean, required: Whether the channel is enabled
        - `index` number, required: Channel index
    - `sensors` SensorSetDto
      - `items` SensorDto[], required
        - `type` 0 | 1 | 2 | 3 | 4 | 5, required
        - `fuel` FuelSensorConfigDto
          - `tank_capacity` number, required: Fuel tank capacity
          - `calibration_rules` FuelCalibrationRuleDto[], required: Fuel calibration rules
            - `fuel_tank_level` number, required: Fuel tank level in millimetres
            - `fuel_capacity` number, required: Fuel capacity

## Response `200`

Response data when a single device is created, including its ID.

- CreateDevicesResponseDto
  - `data` CreateDevicesResponseDataDto, required
    - `total` number, required: Total number of devices processed
    - `success` number, required: Number of devices successfully created
    - `device_ids` string[]: List of created device IDs when exactly one device is created
    - `errors` DeviceErrorDetailDto[]: Per-row errors for partial failures
      - `code` number, required: Error code
      - `message` string, required: Error message
      - `field` string: Field with the error
      - `index` number: Request item index
    - `created_devices` CreatedDeviceDto[]: Created device IDs keyed by request item index
      - `index` number, required: Request item index
      - `device_id` string, required: Created device ID

---

[API](https://skmtc.dev/cautio/apis/cautio-api.md) - [All operations](https://skmtc.dev/cautio/apis/cautio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cautio/apis/cautio-api/revisions/214e6d1d2b6c?raw)
