---
title: "A device closes an ask (device only)"
method: PATCH
path: "/api/v1/device_sessions/{id}/asks/{ask_id}"
tags: ["Devices"]
---

# A device closes an ask (device only)

`PATCH /api/v1/device_sessions/{id}/asks/{ask_id}`

## Request

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

`answered_on_device` (the question was answered at the machine first) or `withdrawn`. The bell's task goes away. Idempotent: closing a closed ask changes nothing and returns it as it is (so a phone answer that landed first reads back `answered`). `ask_id` is the device's own id.

## Path parameters

- `id` string, required
- `ask_id` string, required

## Request body

- object
  - `status` 'answered_on_device' | 'withdrawn', required

## Response `200`

OK.

- object: What the device gets back when it raises or closes an ask: state only, no ciphertext.
  - `id` string
  - `ask_id` string
  - `status` 'pending' | 'answered' | 'answered_on_device' | 'withdrawn' | 'expired'
  - `decision` 'allow' | 'deny', nullable
  - `expires_at` string, date-time

## Other responses

- `401`: Missing or invalid credentials.
- `404`: Not this device's ask, or the feature is off.
- `422`: status must be answered_on_device or withdrawn.

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a8b8642ab7f8?raw)
