Register a device

Give every install a stable identity your app can use across sessions.

Registration turns an install into a first-class row: targeted, addressable, and auditable. device_uid is any stable string you generate on the client.

POSThttps://ctrlapp.krdcode.com/api/public/sdk/v1/register
Auth: Bearer <PUBLISHABLE_KEY>
json
{
  "device_uid": "<DEVICE_ID>",
  "platform": "ios" | "android" | "web" | "...",
  "os_version": "17.4.1",
  "app_version": "1.2.3",
  "model": "iPhone15,3",
  "locale": "en-US",
  "timezone": "America/New_York",
  "push_token": "<APNs / FCM token>",
  "push_platform": "apns" | "fcm",
  "external_user_id": "<optional stable user id>",
  "tags": { "tier": "gold" }
}
Expected result
200 with the device row. The response is safe to log without secrets.

Choosing a device_uid

  • A UUIDv4 generated on first launch and persisted works everywhere.
  • On iOS, avoid tying it to identifierForVendor if you need cross-uninstall stability.
  • On the web, persist in localStorage; do not derive from the IP.
Back to top