---
title: "Grant a shared computer to a member or an agent"
method: POST
path: "/v1/org/computers/shared/{computerId}/grants"
tags: ["Devices"]
---

# Grant a shared computer to a member or an agent

`POST /v1/org/computers/shared/{computerId}/grants`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/org/computers/shared/{computerId}/grants`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Grants one shared cloud computer to one current member (`memberId`) or one active agent (`agentId`) of the organization. Only a shared computer that belongs to the organization can be granted: a member's own computer is refused with 409 not_shared. A person who has not accepted their invitation is refused with 409 member_not_joined. Granting twice answers exists. A team is granted with the team-grants route. Requires Shared computer grants and computers.create with a recent sign-in.

## Path parameters

- `computerId` string, typeid, required

## Request body

- union
  - object
    - `memberId` string, typeid, required: Den TypeID with 'om_' prefix and a 26-character base32 suffix.
  - object
    - `agentId` string, typeid, required: Den TypeID with 'pga_' prefix and a 26-character base32 suffix.

## Response `200`

The grant, new or already there.

- OrganizationSharedComputerGrantResponse
  - `result` 'granted' | 'exists', required
  - `computer` OrganizationSharedComputer, required
    - `id` string, required
    - `name` string, required
    - `status` 'provisioning' | 'healthy' | 'failed' | 'stopped', required
    - `grants` integer, required
    - `teamGrants` integer, required
    - `createdAt` string, date-time, required
    - `size` 'small' | 'medium' | 'large', nullable
  - `grant` OrganizationSharedComputerGrant, required
    - `memberId` string, required
    - `kind` 'member' | 'agent', required
    - `name` string, nullable, required
    - `email` string, nullable, required
    - `agentId` string, nullable, required
    - `grantedAt` string, date-time, required
    - `grantedByMemberId` string, required

## Other responses

- `400`: Invalid request.
- `401`: Sign in required.
- `403`: Set up cloud computers permission and a recent sign-in required.
- `404`: Shared computer grants is off, or the computer, member or agent is not in this organization.
- `409`: This is a member's own computer, or the person has not joined yet. Nothing was granted.

## Changes

- **2026-12-01** `85dda9c15f57`: 1 info
  - added the required property `computer/teamGrants` to the response with the `200` status
- **2026-12-01** `844cd00a8933`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/org/computers/shared/:computerId/grants/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)
