---
title: "Create Device"
method: POST
path: "/api/v1/device"
tags: ["Device Management"]
---

# Create Device

`POST /api/v1/device`

## Request

- Base URL: `https://api.gemstoneaiapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gemstoneaiapp.com/api/v1/device`
- Auth: none declared

POST /api/v1/device

Register a new device for anonymous user tracking.
Idempotent - calling with same device_id returns existing device.

Returns device_instance_id that frontend should store permanently.

## Request body

- CreateDeviceRequest: Request to create/register a new device
  - `device_id` string, required
  - `device_info` object, nullable

## Response `201`

Successful Response

- DeviceResponse: Response after device creation/registration
  - `id` integer, required
  - `scan_limit` integer, required
  - `scans_remaining` integer, required
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api.md) · [All operations](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api/revisions/fcb441f55161?raw)
