Update device
/api/v1/ext/devices/{channel}/{id}
Rename a device, assign/unassign it to a workspace, or set it as default.
Editable fields: name, workspace_id (send null to unassign), and is_default. Android/SMS devices are managed from the myCRMSIM dashboard and cannot be edited via the API — a PATCH to channel "android" returns an error message indicating that Android devices cannot be edited via the API.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| channel | path | enum | yes | "whatsapp" | "imessage" | "rcs". ("android" is read-only here.) |
| id | path | number | yes | Device id. |
| name | body | string | no | New display name. Max 255. |
| workspace_id | body | number | no | Assign to a workspace (must belong to the installer). Send null to unassign. |
| is_default | body | boolean | no | Mark/unmark as the default device for its channel. |
Responses
| Status | When |
|---|---|
200 | Updated |
400 | Empty body — no editable fields provided |
400 | Android devices are not editable via the API |
401 | Missing or invalid token |
403 | Missing scope |
404 | Device does not exist or is not owned by the installer |
Response schema
deviceobjectThe updated device
idnumberDevice id within its channel.
12channelenumWhich channel the device belongs to: "android" (SMS), "whatsapp", "imessage", or "rcs".
whatsappnamestringDisplay name (falls back to the device model / imessage user when unnamed).
statusstringChannel-specific status. android: "active"/"inactive" (device enabled). imessage: one of "Active-S" / "Active-H" / "Inactive" (Active-S = connection "connected" and pinged within the last 2 min; Active-H = not connected but recently pinged; Inactive otherwise). whatsapp/rcs: the underlying connection status.
workspace_idnumberThe workspace the device is assigned to. null if unassigned.
workspace_namestringName of the subaccount (workspace) the device is assigned to. null if unassigned.
is_defaultbooleanTrue if this is the default device for its workspace/channel. **Null for Android devices** (default-device selection does not apply to this channel).
created_atstring (ISO 8601)When the device connection was created. **Null for Android devices** (no creation timestamp is available for this channel).
updated_atstring (ISO 8601)When the device connection was last updated. For Android devices this falls back to the most recent `lastPing` timestamp as a coarse "last activity" proxy.
health_statusenumNormalised health for android / whatsapp / imessage rows (absent on RCS): "healthy" | "degraded" | "offline" | "unknown". Derived from the channel `status` (e.g. android "active"/imessage "Active-S"/whatsapp "connected"/"ready" → healthy; imessage "Active-H" → degraded; "inactive"/"disconnected" → offline).
last_seen_atstring (ISO 8601)Most recent activity timestamp for the device. android/imessage: last ping · whatsapp: last activity (falls back to last probe) · rcs: last update. null when unknown.
last_ping_atstring (ISO 8601)Most recent heartbeat/probe timestamp. android/imessage: last ping · whatsapp: last successful probe · rcs: null (no ping telemetry). null when unknown.
healthobjectUniform telemetry bag with the SAME keys on every channel — { battery_level, battery_charging, internet_connection, battery_optimized, service_uptime, is_default_sms_app, missing_permissions, rate_limit, limit_exceed_action, last_state, last_probe_ok_at, last_probe_ms, auto_refresh }. Each key is populated for the channel it applies to (android → battery/connectivity/permissions; imessage → rate_limit/limit_exceed_action; whatsapp → last_state/last_probe_*/auto_refresh) and null everywhere else.
channel_detailsobjectThe full channel-native field set (same values as the flattened extras below), grouped into one object so callers have a stable place to read channel-specific data. Empty object {} when the channel exposes none.
…channel extrasvariesBackwards-compatible: the channel-native fields (identical to `channel_details`) also stay flattened onto the object, — android: device_model, android_version, app_version, battery_level, battery_charging, internet_connection, is_default_sms_app, service_uptime, battery_optimized, missing_permissions, mms_config, last_ping, sims[] (each {slot, carrier, number, name, country, enabled}) · whatsapp: number, client_id, user_name, last_state, last_activity_at, last_probe_ok_at, last_probe_ms, auto_refresh · imessage: device_model, os_version, app_version, last_ping, user_name, rate_limit, limit_exceed_action · rcs: location_id, login_via, client_id, user_name.
curl -X PATCH "https://backend.mysmsgateway.app/api/v1/ext/devices/{channel}/{id}" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Sales WhatsApp (renamed)",
"workspace_id": 7,
"is_default": true
}'{
"success": true,
"data": {
"id": 12,
"channel": "whatsapp",
"name": "Sales WhatsApp (renamed)",
"status": "ready",
"health_status": "healthy",
"last_seen_at": "2026-05-21T09:12:00.000Z",
"last_ping_at": "2026-05-21T09:13:00.000Z",
"health": {
"battery_level": null,
"battery_charging": null,
"internet_connection": null,
"battery_optimized": null,
"service_uptime": null,
"is_default_sms_app": null,
"missing_permissions": null,
"rate_limit": null,
"limit_exceed_action": null,
"last_state": "CONNECTED",
"last_probe_ok_at": "2026-05-21T09:13:00.000Z",
"last_probe_ms": 5,
"auto_refresh": true
},
"channel_details": {
"number": "+15551234567",
"client_id": "wa_8f21",
"user_name": "Ada Lovelace",
"last_state": "CONNECTED",
"last_activity_at": "2026-05-21T09:12:00.000Z",
"last_probe_ok_at": "2026-05-21T09:13:00.000Z",
"last_probe_ms": 5,
"auto_refresh": true
},
"workspace_id": 7,
"workspace_name": "Acme Co",
"is_default": true,
"number": "+15551234567",
"client_id": "wa_8f21",
"user_name": "Ada Lovelace",
"last_state": "CONNECTED",
"last_activity_at": "2026-05-21T09:12:00.000Z",
"last_probe_ok_at": "2026-05-21T09:13:00.000Z",
"last_probe_ms": 5,
"auto_refresh": true
}
}"whatsapp" | "imessage" | "rcs". ("android" is read-only here.)
Device id.
« Get device
Delete device »
