Skip to content
中文

Rename one of your organization's devices

Code Mode: praxis.sandbox.byod.devices.update

HTTP: PATCH /sandbox/v1/byod/devices/{deviceID}

Change a device’s display name, and nothing else: pairing, credential, platform and connection are untouched. Use it to give a shared phone a name your team recognises. The body takes exactly one field, name, 1 to 64 characters after trimming; a missing, extra or wrongly typed field answers INVALID_PARAMS. An unknown id and another organization’s device both answer 404. Example: PATCH /sandbox/v1/byod/devices/byd_0123456789abcdefghijklmno with {name:‘Shelf phone’} returns the updated device.

Signature

praxis.sandbox.byod.devices.update(args:{path:{deviceID:string};body:{/** New display name for the device, 1 to 64 characters after trimming leading and trailing whitespace; it does not have to be unique. */ name:string}}):Promise<{/** Resource type; always "byod_device". */ object:"byod_device";/** Device id, `byd_` followed by 26 lowercase hex characters. */ id:string;/** The device's platform, which decides the use faces it answers. */ platform:"android"|"macos"|"linux";/** Display name of the device, 1 to 64 characters. */ name:string;/** Device model the phone's app reported when it claimed the pairing, such as 23127PN0CC; empty when the app sent none. */ model:string;/** Operating-system version the app reported, such as 16; empty when the app sent none. */ os_version:string;/** True while the device holds its one control connection; false when it is paired but not connected. */ online:boolean;/** When the device last said hello or answered a ping, as an ISO-8601 timestamp; null until it first connects. */ last_seen_at:string|null;/** When the device was paired, as an ISO-8601 timestamp; the list is ordered by it, oldest first. */ created_at:string;/** What the device can be asked to do, derived from its platform: display for a phone (act, the action socket), agent for a desktop (a local coding agent session). */ capabilities:Array<"display"|"agent">;/** The absolute directories a desktop registered for agent sessions with its last hello; a session may only start in one of these. */ agent_dirs:Array<string>;/** Which agent each registered directory is bound to, as the desktop's last hello reported. */ agent_bindings:Array<{/** The absolute directory the desktop bound to an agent with praxis agent connect. */ dir:string;/** The agent the directory is bound to: its identity number or its agent id. */ agent:string}>;/** The version of the envd on the desktop, as its last hello reported. */ envd_version:string|null;/** Whether the desktop's envd lets a platform session run in bypassPermissions (all tool calls without asking). */ allow_bypass:boolean}>;

Parameters

NameInTypeRequiredDescription
deviceIDpathstringyesDevice id from the claim or from listByodDevices, `byd_` followed by 26 lowercase hex characters. An unknown id and another organization’s device both answer 404.

Request body

RequiredContent typesDescription
yesapplication/json

Responses

StatusContent typesDescription
200application/jsonThe device with its new name.
400INVALID_PARAMS: a body field is missing, wrongly typed or out of range, for example a name outside 1 to 64 characters. Fix the field and resend; retrying unchanged fails the same way.
401Authentication required: supply an organization API key that carries a tenant.
404NOT_FOUND: no such device for this organization. The device was disconnected, never existed, or belongs to another organization; the three are indistinguishable.
503SERVICE_UNAVAILABLE: BYOD is not bound in this deployment, or the sandbox is not ready. Wait and retry.