---
title: "Create device"
method: POST
path: "/devices"
tags: ["product:chat"]
---

# Create device

`POST /devices`

Adds a new device to a user, if the same device already exists the call will have no effect

## Request body

- CreateDeviceRequest, nullable — Create device request
  - `hardware_id` string — Stable physical device identifier used to deduplicate pushes across push providers (e.g. APNs VoIP and Firebase on the same iOS device). Distinct from 'id', which is the push token.
  - `id` string, required — Device ID
  - `push_provider` 'firebase' | 'apn' | 'huawei' | 'xiaomi', required — Push provider
  - `push_provider_name` string — Push provider name
  - `user` UserRequest — User request object
    - `custom` object — Custom user data
    - `id` string, required — User ID
    - `image` string — User's profile image URL
    - `invisible` boolean
    - `language` string
    - `name` string — Optional name of user
    - `privacy_settings` PrivacySettingsResponse
      - `delivery_receipts` DeliveryReceiptsResponse
        - `enabled` boolean
      - `read_receipts` ReadReceiptsResponse
        - `enabled` boolean
      - `typing_indicators` TypingIndicatorsResponse
        - `enabled` boolean
    - `role` string — User's global role
    - `teams` string[] — List of teams the user belongs to
    - `teams_role` object — Map of team-specific roles for the user
  - `user_id` string — **Server-side only**. User ID which server acts upon
  - `voip_token` boolean — When true the token is for Apple VoIP push notifications

## Response `201`

Response

- Response, nullable — Basic response information
  - `duration` string, required — Duration of the request in milliseconds

## Other responses

- `400` — Bad request
- `429` — Too many requests

---

[API](https://skmtc.net/getstream/apis/stream-api.md) · [All operations](https://skmtc.net/getstream/apis/stream-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getstream/stream-api/versions/3dba86aaa0d8/schema)
