---
title: "POST /api/dcv/session_sharing/grants"
method: POST
path: "/api/dcv/session_sharing/grants"
tags: ["Virtual Desktops"]
---

# POST /api/dcv/session_sharing/grants

`POST /api/dcv/session_sharing/grants`

POST operation for /api/dcv/session_sharing/grants

## Headers

- `X-EDH-USER` string, required
- `X-EDH-TOKEN` string, required

## Request body

- object
  - `session_id` string, required — Broker session ID of the session to share
  - `guest_username` string, required — Username of the guest to grant access to
  - `profile_id` string, required — ID of the permission profile to apply
  - `expires_at` string, required — ISO 8601 expiration timestamp for the grant
  - `owner_username` string — Session owner username (admin override only)
  - `unsupervised` boolean — Whether to allow unsupervised access

## Response `200`

Grant created successfully

- object
  - `success` boolean
  - `message` object

## Other responses

- `400` — Missing required fields
- `403` — Not authorized to share this session
- `503` — Session sharing not enabled

---

[API](https://skmtc.dev/aws-samples/apis/engineering-development-hub-edh-api.md) · [All operations](https://skmtc.dev/aws-samples/apis/engineering-development-hub-edh-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aws-samples/engineering-development-hub-edh-api/revisions/058396b8f0f1/schema)
