---
title: "Attach to a session started on one of the member's computers"
method: POST
path: "/v1/remote-sessions/attach"
tags: ["Automations"]
---

# Attach to a session started on one of the member's computers

`POST /v1/remote-sessions/attach`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/remote-sessions/attach`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Makes a session that was started on one of the member's own computers reachable from other devices, like one started remotely. The organization's ceiling and that computer's owner must both allow every session; otherwise 409 session_access_denied and nothing is queued. Returns state attached with the commandId that already reaches the session, or queued with a commandId to follow through status until the computer has attached. Repeating the call returns the same command. Other refusals: 404 unknown_computer (not one of the member's computers), 409 remote_access_off (the computer, or the organization, takes nothing from other devices), 409 desktop_update_required, 503 desktop_offline. Same result as the remote-session:attach capability. Requires active membership and a session-access-capable computer whose owner and organization both allow all sessions.

## Request body

- RemoteSessionAttachRequest
  - `computerId` string, required
  - `workspaceId` string, required
  - `sessionId` string, required
  - `originSessionId` string
  - `originWorkspaceId` string

## Response `200`

The session is attached, or the attach is queued.

- RemoteSessionAttachResponse
  - `target` 'desktop', required
  - `state` 'queued' | 'attached', required
  - `commandId` string, required
  - `computerId` string, required
  - `workspaceId` string, required
  - `sessionId` string, required
  - `expiresAt` string, date-time, nullable, required

## Other responses

- `400`: The request or its arguments were invalid.
- `401`: Authentication required.
- `404`: The task is unknown or the organization was not found.
- `409`: The task cannot do that now. remote_access_off: the computer takes nothing from other devices (its owner's choice, no choice yet under the organization's opt-in, or the organization's ceiling); the message says who can allow it.
- `503`: The computer or cloud workspace that runs the task can't be reached right now; retry.

## Changes

- **2026-11-26** `e39baec25a62`: 2 info
  - added the new optional request property `originSessionId`
  - added the new optional request property `originWorkspaceId`
- **2026-11-11** `1da447287f26`: 2 breaking, 1 info
  - response property `expiresAt` list-of-types was widened by adding types `string` to media type `application/json` of response `200`
  - the `expiresAt/anyOf[subschema #1]/` response's property type changed from `integer` to `string`, and format from no format to `date-time` for status `200`
  - the `expiresAt/anyOf[subschema #1]/` response's property pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$` was added for the status `200`
- **2026-11-11** `c298eb7b3d3c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/remote-sessions/attach/post.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/84fb0f99fb95?raw)
