Devices

A device raises a phone approval (device only)

The computer is waiting for its owner: a command its local agent composed (kind: command) or a session an agent asked for (kind: session). Salt keeps the question, puts a task in the owner's bell ("<Computer> is waiting for you"), notifies them, and delivers their answer to the device as a device_ask delivery ({type: "device_ask_answered", kind: "device_ask_answered", ask_id, decision}). Idempotent on ask_id: repeating the call returns the same ask with 200 and tells nobody again. A device holds at most 5 open asks. The ask lives as long as the task that waits on it (60 to 900 seconds): approving it later would run a command against a changed computer, so an expired ask is restarted by asking the agent again.

post/api/v1/device_sessions/{id}/asks

Request

  • Base URL: https://saltapp.ai
  • URL: https://saltapp.ai/api/v1/device_sessions/{id}/asks
  • Auth: API key in header api-key

Path parameters

idstring required

Request body

ask_idstring required

A uuid the device makes.

kind'command' | 'session' required
titlestring required

Plain text, e.g. "Salt wants to run a command". Control and bidi characters are stripped; over 80 characters after that is a 422 title_too_long.

sealedstring required

OpenPGP armor encrypted on the device to the owner's public key; at most 16 KB (422 sealed_too_large).

expires_in_sinteger required

Response

Already raised (same ask_id): the existing ask.

idstring
ask_idstring
status'pending' | 'answered' | 'answered_on_device' | 'withdrawn' | 'expired'
decision'allow' | 'deny' nullable
expires_atstring date-time

Changes

No recorded changes to this operation across all 3 revisions of this API.