---
title: "Focus element"
method: POST
path: "/api/v1/ui/actions/focus"
tags: ["ui-actions"]
---

# Focus element

`POST /api/v1/ui/actions/focus`

Gives keyboard focus to the specified element.

## Request body

- FocusRequest — unresolved $ref

## Response `200`

Action completed.

- ActionResponse — unresolved $ref

## Other responses

- `400` — Element is not interactable.
- `404` — Element not found.
- `408` — Operation timed out.
- `409` — Capture is stale or a UI/native mutation or probe is temporarily busy. Retry after obtaining a fresh capture.
- `500` — Internal server error.
- `501` — Capability not implemented by the connected backend.

## Changes

- **2026-08-17** `dcf9b09e550f` — 2 info
  - added the non-success response with the status `409`
  - added the non-success response with the status `501`

[Change history](https://skmtc.dev/dotnet/apis/devflow-agent-protocol/changes/api/v1/ui/actions/focus/post.md)

---

[API](https://skmtc.dev/dotnet/apis/devflow-agent-protocol.md) · [All operations](https://skmtc.dev/dotnet/apis/devflow-agent-protocol/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dotnet/devflow-agent-protocol/revisions/31dec8eed3de/schema)
