# Create external devices (batch)

**POST** `/devices`

## Request body

**application/json**

_Schema ref:_ `#/components/schemas/CreateDevicesBody` (CreateDevicesBody)

```json
{
  "type": "object",
  "properties": {
    "devices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "DEVICE",
              "ACCESSORY",
              "ACOUSTIC",
              "SEAT",
              "TABLE",
              "STORAGE",
              "PRINTER"
            ],
            "description": "Device family (`device_type` enum): DEVICE for computers, phones, tablets, and screens.",
            "example": "DEVICE"
          },
          "category": {
            "type": "string",
            "enum": [
              "ACOUSTIC_CHAIR",
              "ACOUSTIC_PARTITION",
              "ADAPTER",
              "ARMCHAIR",
              "CASE",
              "CHAIR",
              "CHARGER",
              "COMPUTER",
              "DESK",
              "HEADPHONES",
              "KEYBOARD",
              "LAMP",
              "MOUSE",
              "OTHER",
              "PHONEBOOTH",
              "PRINTER",
              "SCREEN",
              "SHELVING_UNIT",
              "SMARTPHONE",
              "SOFA",
              "SPEAKERS",
              "STORAGE_CABINET",
              "TABLE",
              "TABLET"
            ],
            "description": "Device category code (exact match to catalog / `device_category` enum). Use values such as COMPUTER or SCREEN — not display labels like Laptop.",
            "example": "COMPUTER"
          },
          "user_id": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true,
            "description": "Assignee: a user of the company"
          },
          "added_via": {
            "type": "string",
            "enum": [
              "MASS_IMPORT",
              "SINGLE_IMPORT",
              "ONBOARDING"
            ],
            "description": "Onboarding channel for the device.",
            "example": "SINGLE_IMPORT"
          },
          "is_rented": {
            "type": "boolean",
            "default": false,
            "description": "True when the company rents the device elsewhere. Selects which client_* price and date fields are kept."
          },
          "brand": {
            "type": "string",
            "minLength": 1,
            "description": "Lowercase brand, e.g. apple",
            "example": "apple"
          },
          "serial_number": {
            "type": "string",
            "minLength": 1,
            "description": "Manufacturer serial number; checked against the brand's format"
          },
          "client_purchase_price": {
            "type": "string",
            "minLength": 1,
            "description": "Purchase price as a decimal string; kept only when is_rented is false",
            "example": "1299.00"
          },
          "client_purchase_date": {
            "type": "string",
            "minLength": 1,
            "format": "date",
            "description": "Purchase date; kept only when is_rented is false",
            "example": "2025-01-31"
          },
          "client_warranty_end_date": {
            "type": "string",
            "minLength": 1,
            "format": "date",
            "description": "Warranty end date; kept only when is_rented is false",
            "example": "2025-01-31"
          },
          "client_rental_price": {
            "type": "string",
            "minLength": 1,
            "description": "Monthly rent as a decimal string; kept only when is_rented is true",
            "example": "45.00"
          },
          "client_rental_start_date": {
            "type": "string",
            "minLength": 1,
            "format": "date",
            "description": "Rental start date; kept only when is_rented is true",
            "example": "2025-01-31"
          },
          "client_rental_end_date": {
            "type": "string",
            "minLength": 1,
            "format": "date",
            "description": "Rental end date; kept only when is_rented is true",
            "example": "2025-01-31"
          },
          "client_contract_number": {
            "type": "string",
            "minLength": 1
          },
          "client_invoice_number": {
            "type": "string",
            "minLength": 1
          },
          "screen_size": {
            "type": "string",
            "minLength": 1
          },
          "graphic": {
            "type": "string",
            "minLength": 1
          },
          "processor": {
            "type": "string",
            "minLength": 1
          },
          "ram": {
            "type": "string",
            "minLength": 1
          },
          "storage": {
            "type": "string",
            "minLength": 1
          },
          "model_year": {
            "type": "string",
            "minLength": 1
          },
          "connectivity": {
            "type": "string",
            "minLength": 1
          },
          "resolution": {
            "type": "string",
            "minLength": 1
          },
          "comment": {
            "type": "string",
            "minLength": 1
          },
          "color": {
            "type": "string",
            "minLength": 1
          },
          "seats_number": {
            "type": "string",
            "minLength": 1
          },
          "assembly": {
            "type": "string",
            "minLength": 1
          },
          "os_platform": {
            "type": "string",
            "minLength": 1
          },
          "keyboard_layout": {
            "type": "string",
            "enum": [
              "FRENCH_AZERTY",
              "SPANISH_QWERTY",
              "ITALIAN_QWERTY",
              "INTERNATIONAL_ENGLISH_QWERTY",
              "GERMAN_QWERTZ",
              "PORTUGUESE_QWERTY",
              "ENGLISH_QWERTY",
              "SWISS_QWERTZ",
              "AMERICAN_ENGLISH_QWERTY",
              "CANADIAN_ENGLISH_QWERTY",
              "DUTCH_QWERTY",
              "SWEDISH_QWERTY",
              "NORWEGIAN_QWERTY",
              "DANISH_QWERTY",
              "FINNISH_QWERTY",
              "OTHER"
            ],
            "description": "Keyboard layout key (same enum as cart/order `keyboard_layout`).",
            "example": "FRENCH_AZERTY"
          },
          "has_microphone": {
            "type": "boolean",
            "nullable": true
          },
          "has_webcam": {
            "type": "boolean",
            "nullable": true
          },
          "noise_cancellation": {
            "type": "boolean",
            "nullable": true
          },
          "compliance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              {
                "type": "string",
                "minLength": 1
              }
            ],
            "description": "Compliance labels; accepts a single string or an array of strings.",
            "nullable": true
          },
          "connection_type": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              {
                "type": "string",
                "minLength": 1
              }
            ],
            "description": "Connection type labels; accepts a single string or an array of strings.",
            "nullable": true
          },
          "has_stool": {
            "type": "boolean",
            "nullable": true
          },
          "has_video_package": {
            "type": "boolean",
            "nullable": true
          },
          "has_screen": {
            "type": "boolean",
            "nullable": true
          },
          "has_premium_tablet": {
            "type": "boolean",
            "nullable": true
          }
        },
        "required": [
          "name",
          "type",
          "category"
        ]
      },
      "minItems": 1
    }
  },
  "required": [
    "devices"
  ]
}
```

## Responses

### 201

Devices created

**application/json**

_Schema ref:_ `#/components/schemas/CreateDevicesResponse` (CreateDevicesResponse)

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "devices": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string",
                "nullable": true
              },
              "brand": {
                "type": "string",
                "nullable": true
              },
              "serial_number": {
                "type": "string",
                "nullable": true
              },
              "imei": {
                "type": "string",
                "nullable": true
              },
              "internal_id": {
                "type": "string",
                "nullable": true,
                "description": "Company asset tag"
              },
              "user_id": {
                "type": "integer",
                "nullable": true,
                "description": "Assigned user id; load the user with GET /users/:id"
              },
              "assigned_address_id": {
                "type": "integer",
                "nullable": true,
                "description": "Company address where the device is kept once delivered"
              },
              "shipping_address_id": {
                "type": "integer",
                "nullable": true,
                "description": "Company address of the first delivery"
              },
              "location": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "NONE",
                      "AT_REPAIRER",
                      "FLEET_STORAGE",
                      "STOCK_REGION",
                      "IN_TRANSIT",
                      "COMPANY_ADDRESS"
                    ],
                    "description": "Where the device is now. IN_TRANSIT covers the first delivery and transfers; COMPANY_ADDRESS means it sits at assigned_address_id."
                  },
                  "address_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "Company address of the location: the destination when IN_TRANSIT, the assigned address when COMPANY_ADDRESS. Null for Fleet-managed locations (repairer, Fleet storage, stock region, reconditioning)."
                  }
                },
                "required": [
                  "type",
                  "address_id"
                ]
              },
              "created_at": {
                "type": "string",
                "nullable": true
              },
              "updated_at": {
                "type": "string",
                "nullable": true
              },
              "rent": {
                "type": "string",
                "nullable": true
              },
              "tracking_number": {
                "type": "string",
                "nullable": true
              },
              "tracking_url": {
                "type": "string",
                "nullable": true,
                "description": "Tracking page URL."
              },
              "shipping_date": {
                "type": "string",
                "nullable": true,
                "description": "Initial delivery shipment date (ISO 8601)."
              },
              "delivery_date": {
                "type": "string",
                "nullable": true,
                "description": "Initial delivery completion date (ISO 8601)."
              },
              "expected_delivery_date": {
                "type": "string",
                "nullable": true,
                "description": "Carrier-estimated initial delivery date (ISO 8601)."
              },
              "client_status": {
                "type": "string",
                "enum": [
                  "ARCHIVED",
                  "PENDING_VALIDATION",
                  "IN_PREPARATION",
                  "DELIVERED",
                  "SHIPPED",
                  "AVAILABLE",
                  "IN_SERVICE",
                  "IN_MAINTENANCE",
                  "OUT_OF_SERVICE"
                ],
                "description": "Device progress key for display and filtering"
              },
              "type": {
                "type": "string",
                "nullable": true
              },
              "category": {
                "type": "string",
                "nullable": true
              },
              "source": {
                "type": "string",
                "nullable": true
              },
              "comment": {
                "type": "string",
                "nullable": true,
                "description": "Free-form device comment"
              },
              "characteristics": {
                "type": "object",
                "properties": {
                  "screen_size": {
                    "type": "string",
                    "nullable": true
                  },
                  "graphic": {
                    "type": "string",
                    "nullable": true
                  },
                  "processor": {
                    "type": "string",
                    "nullable": true
                  },
                  "ram": {
                    "type": "string",
                    "nullable": true
                  },
                  "storage": {
                    "type": "string",
                    "nullable": true
                  },
                  "model_year": {
                    "type": "string",
                    "nullable": true
                  },
                  "connectivity": {
                    "type": "string",
                    "nullable": true
                  },
                  "keyboard_layout": {
                    "type": "string",
                    "nullable": true,
                    "enum": [
                      "FRENCH_AZERTY",
                      "SPANISH_QWERTY",
                      "ITALIAN_QWERTY",
                      "INTERNATIONAL_ENGLISH_QWERTY",
                      "GERMAN_QWERTZ",
                      "PORTUGUESE_QWERTY",
                      "ENGLISH_QWERTY",
                      "SWISS_QWERTZ",
                      "AMERICAN_ENGLISH_QWERTY",
                      "CANADIAN_ENGLISH_QWERTY",
                      "DUTCH_QWERTY",
                      "SWEDISH_QWERTY",
                      "NORWEGIAN_QWERTY",
                      "DANISH_QWERTY",
                      "FINNISH_QWERTY",
                      "OTHER"
                    ],
                    "description": "Keyboard layout code used for pricing and device configuration.",
                    "example": "FRENCH_AZERTY"
                  },
                  "resolution": {
                    "type": "string",
                    "nullable": true
                  },
                  "has_microphone": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "has_webcam": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "noise_cancellation": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "compliance": {
                    "type": "array",
                    "nullable": true,
                    "items": {
                      "type": "string"
                    }
                  },
                  "connection_type": {
                    "type": "array",
                    "nullable": true,
                    "items": {
                      "type": "string"
                    }
                  },
                  "has_stool": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "has_video_package": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "has_screen": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "has_premium_tablet": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "color": {
                    "type": "string",
                    "nullable": true
                  },
                  "seats_number": {
                    "type": "string",
                    "nullable": true
                  },
                  "assembly": {
                    "type": "string",
                    "nullable": true
                  },
                  "os_platform": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "screen_size",
                  "graphic",
                  "processor",
                  "ram",
                  "storage",
                  "model_year",
                  "connectivity",
                  "keyboard_layout",
                  "resolution",
                  "has_microphone",
                  "has_webcam",
                  "noise_cancellation",
                  "compliance",
                  "connection_type",
                  "has_stool",
                  "has_video_package",
                  "has_screen",
                  "has_premium_tablet",
                  "color",
                  "seats_number",
                  "assembly",
                  "os_platform"
                ]
              },
              "mdm": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "SUBSCRIBED",
                      "DOWNLOADED",
                      "IDENTIFIED",
                      "ENROLLMENT_IN_PROGRESS",
                      "ENROLLED",
                      "UNENROLLED",
                      "DEVICE_WIPE_PENDING"
                    ],
                    "description": "MDM enrollment status."
                  },
                  "local_name": {
                    "type": "string",
                    "nullable": true
                  },
                  "is_locked": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "lock_date": {
                    "type": "string",
                    "nullable": true
                  },
                  "firewall_enabled": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "os_updates_enabled": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "is_encrypted": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "screenlock_enabled": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "is_compromised": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "os_updates_available": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "disk_encryption_profile_installed": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "enrollment_date": {
                    "type": "string",
                    "nullable": true
                  },
                  "unenrollment_date": {
                    "type": "string",
                    "nullable": true
                  },
                  "download_date": {
                    "type": "string",
                    "nullable": true
                  },
                  "last_seen_date": {
                    "type": "string",
                    "nullable": true
                  },
                  "last_sync_date": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "id",
                  "status",
                  "local_name",
                  "is_locked",
                  "lock_date",
                  "firewall_enabled",
                  "os_updates_enabled",
                  "is_encrypted",
                  "screenlock_enabled",
                  "is_compromised",
                  "os_updates_available",
                  "disk_encryption_profile_installed",
                  "enrollment_date",
                  "unenrollment_date",
                  "download_date",
                  "last_seen_date",
                  "last_sync_date"
                ],
                "description": "MDM enrollment details once enrollment has started; null otherwise"
              },
              "order": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "order_id": {
                        "type": "integer"
                      },
                      "client_status": {
                        "type": "string",
                        "enum": [
                          "RECEIVED",
                          "BEING_PROCESSED",
                          "FINANCING_REQUEST",
                          "DOC_REQUIRED",
                          "SIGNING",
                          "PROCESSING",
                          "SHIPPED",
                          "RECEPTION_TO_CONFIRM",
                          "ONGOING_ORDER",
                          "PENDING_DECISION",
                          "EQUIPMENT_TO_SEND",
                          "ARCHIVED",
                          "FAILED",
                          "UNKNOWN"
                        ],
                        "description": "Order progress key for display and filtering",
                        "example": "BEING_PROCESSED"
                      },
                      "device_names": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Display names for devices on the order"
                      },
                      "rent": {
                        "type": "string",
                        "nullable": true
                      },
                      "rent_currency": {
                        "type": "string",
                        "nullable": true
                      },
                      "order_number": {
                        "type": "string",
                        "nullable": true
                      },
                      "contract_number": {
                        "type": "string",
                        "nullable": true
                      },
                      "order_date": {
                        "type": "string",
                        "nullable": true
                      },
                      "num_devices": {
                        "type": "integer",
                        "nullable": true
                      },
                      "fulfillment_mode": {
                        "type": "string",
                        "enum": [
                          "DIRECT_DELIVERY",
                          "STOCK"
                        ],
                        "description": "DIRECT_DELIVERY ships devices to their users; STOCK ships them to the company's stock"
                      },
                      "created_at": {
                        "type": "string",
                        "nullable": true
                      },
                      "updated_at": {
                        "type": "string",
                        "nullable": true
                      }
                    },
                    "required": [
                      "order_id",
                      "client_status",
                      "device_names",
                      "rent",
                      "rent_currency",
                      "order_number",
                      "contract_number",
                      "order_date",
                      "num_devices",
                      "fulfillment_mode",
                      "created_at",
                      "updated_at"
                    ]
                  },
                  {
                    "nullable": true,
                    "description": "Associated order details when device is associated to an order; null otherwise"
                  }
                ]
              },
              "repair": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "device_id": {
                    "type": "integer"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "REQUEST_RECEIVED",
                      "AWAITING_PICKUP",
                      "PICKED_UP",
                      "REPAIR_IN_PROGRESS",
                      "IN_RETURN",
                      "COMPLETED",
                      "ON_HOLD",
                      "CANCELLED"
                    ],
                    "description": "Repair progress. COMPLETED and CANCELLED are closed repairs."
                  },
                  "repairer": {
                    "type": "string",
                    "nullable": true
                  },
                  "pickup_tracking": {
                    "type": "string",
                    "nullable": true,
                    "description": "Tracking number of the pickup to the repairer"
                  },
                  "return_tracking": {
                    "type": "string",
                    "nullable": true,
                    "description": "Tracking number of the return from the repairer"
                  },
                  "loan_device_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "Company device lent during the repair"
                  },
                  "requested_at": {
                    "type": "string",
                    "nullable": true
                  },
                  "picked_up_at": {
                    "type": "string",
                    "nullable": true
                  },
                  "returned_at": {
                    "type": "string",
                    "nullable": true
                  },
                  "closed_at": {
                    "type": "string",
                    "nullable": true
                  },
                  "created_at": {
                    "type": "string",
                    "nullable": true
                  },
                  "updated_at": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "id",
                  "device_id",
                  "status",
                  "repairer",
                  "pickup_tracking",
                  "return_tracking",
                  "loan_device_id",
                  "requested_at",
                  "picked_up_at",
                  "returned_at",
                  "closed_at",
                  "created_at",
                  "updated_at"
                ],
                "description": "Open repair; closed repairs are listed by GET /repairs?device_id="
              },
              "storage": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "device_id": {
                    "type": "integer"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "ENDING",
                      "ENDED",
                      "CANCELLED"
                    ],
                    "description": "ACTIVE: stored at Fleet. ENDING: on its way back. ENDED: delivered back. CANCELLED: never stored."
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "description": "Country of the Fleet storage (ISO alpha-2)"
                  },
                  "factory_reset": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Whether the device was factory reset on intake"
                  },
                  "quality": {
                    "type": "string",
                    "nullable": true,
                    "description": "Condition graded on intake"
                  },
                  "inbound_parcel_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "Shipment to the storage; listed in the device parcels"
                  },
                  "outbound_parcel_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "Shipment out of the storage; listed in the device parcels"
                  },
                  "started_at": {
                    "type": "string",
                    "nullable": true
                  },
                  "ended_at": {
                    "type": "string",
                    "nullable": true
                  },
                  "created_at": {
                    "type": "string",
                    "nullable": true
                  },
                  "updated_at": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "id",
                  "device_id",
                  "status",
                  "country_code",
                  "factory_reset",
                  "quality",
                  "inbound_parcel_id",
                  "outbound_parcel_id",
                  "started_at",
                  "ended_at",
                  "created_at",
                  "updated_at"
                ],
                "description": "Current storage stay (ACTIVE or ENDING); past stays are listed by GET /storage-stays?device_id="
              },
              "parcels": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "RETURN",
                        "INTER_OFFICE_DELIVERY",
                        "STORAGE_INBOUND",
                        "STORAGE_OUTBOUND"
                      ],
                      "description": "RETURN: device return shipment. INTER_OFFICE_DELIVERY: inter-office move."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "WAITING",
                        "SCHEDULED",
                        "SHIPPED",
                        "RECEIVED",
                        "FAILED",
                        "CANCELLED"
                      ],
                      "description": "Parcel shipment progress. CANCELLED: the shipment was called off before delivery."
                    },
                    "tracking_number": {
                      "type": "string",
                      "nullable": true
                    },
                    "tracking_url": {
                      "type": "string",
                      "nullable": true,
                      "description": "Tracking page URL."
                    },
                    "carrier": {
                      "type": "string",
                      "nullable": true
                    },
                    "pickup_address_id": {
                      "type": "integer",
                      "nullable": true
                    },
                    "reception_address_id": {
                      "type": "integer",
                      "nullable": true
                    },
                    "pickup_date": {
                      "type": "string",
                      "nullable": true
                    },
                    "reception_date": {
                      "type": "string",
                      "nullable": true
                    },
                    "shipping_date": {
                      "type": "string",
                      "nullable": true
                    },
                    "created_at": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "status",
                    "tracking_number",
                    "tracking_url",
                    "carrier",
                    "pickup_address_id",
                    "reception_address_id",
                    "pickup_date",
                    "reception_date",
                    "shipping_date",
                    "created_at"
                  ]
                },
                "description": "Return and inter-office shipments for this device, newest first. Initial delivery uses the device tracking_number and tracking_url. Load addresses with GET /addresses/:id."
              }
            },
            "required": [
              "id",
              "name",
              "brand",
              "serial_number",
              "imei",
              "internal_id",
              "user_id",
              "assigned_address_id",
              "shipping_address_id",
              "location",
              "created_at",
              "updated_at",
              "rent",
              "tracking_number",
              "tracking_url",
              "shipping_date",
              "delivery_date",
              "expected_delivery_date",
              "client_status",
              "type",
              "category",
              "source",
              "comment",
              "characteristics",
              "mdm",
              "order",
              "repair",
              "storage",
              "parcels"
            ]
          }
        }
      },
      "required": [
        "devices"
      ]
    }
  },
  "required": [
    "data"
  ]
}
```

### 400

Validation or business rule error

**application/json**

_Schema ref:_ `#/components/schemas/CreateDeviceBadRequestResponse` (CreateDeviceBadRequestResponse)

```json
{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Every validation failure, comma-separated",
          "example": "Required, must be an ISO 3166-1 alpha-2 country code"
        },
        "type": {
          "type": "string",
          "enum": [
            "validation_error"
          ]
        },
        "error": {
          "type": "string",
          "enum": [
            "validation_error"
          ]
        }
      },
      "required": [
        "message",
        "type",
        "error"
      ]
    },
    {
      "type": "object",
      "properties": {
        "error": {
          "type": "string",
          "enum": [
            "INVALID_SERIAL_NUMBER",
            "INVALID_APPLE_SERIAL_NUMBER",
            "SERIAL_NUMBER_IS_IMEI",
            "INVALID_USER",
            "KEYBOARD_LAYOUT_REQUIRED"
          ]
        }
      },
      "required": [
        "error"
      ]
    }
  ]
}
```

### 401

Missing, invalid, or revoked API key

**text/plain**

```json
{
  "type": "string",
  "example": "Unauthorized"
}
```

### 403

The API key has READ scope; this operation needs WRITE

**application/json**

_Schema ref:_ `#/components/schemas/InsufficientScopeErrorResponse` (InsufficientScopeErrorResponse)

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "enum": [
        "INSUFFICIENT_SCOPE"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 404

Not found

**application/json**

_Schema ref:_ `#/components/schemas/CreateDeviceNotFoundErrorResponse` (CreateDeviceNotFoundErrorResponse)

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "enum": [
        "COMPANY_NOT_FOUND"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 429

Rate limit exceeded. The RateLimit-* headers give the limit and the reset time.

**text/plain**

```json
{
  "type": "string",
  "example": "Too many requests, please try again later."
}
```

### 500

DEVICE_PROVISIONING_FAILED: the devices were created but MDM provisioning failed. List devices before retrying, or the retry creates duplicates. PLATFORM_DEVICE_ACTOR_NOT_FOUND: the company has no admin to record as the author.

**application/json**

_Schema ref:_ `#/components/schemas/CreateDeviceInternalErrorResponse` (CreateDeviceInternalErrorResponse)

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "enum": [
        "INTERNAL_ERROR",
        "DEVICE_PROVISIONING_FAILED",
        "PLATFORM_DEVICE_ACTOR_NOT_FOUND"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 503

Rate limiting is temporarily unavailable; retry with backoff

**application/json**

_Schema ref:_ `#/components/schemas/RateLimiterUnavailableResponse` (RateLimiterUnavailableResponse)

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ]
}
```

## Security

```json
[
  {
    "bearerAuth": []
  }
]
```

**bearerAuth:** Bearer token using a Fleet platform API key (flt_sk_…).

---

_Generated from the OpenAPI specification for raw Markdown / tooling use._
