---
title: "Create a grant"
method: POST
path: "/v1/workspaces/{workspaceId}/grants"
tags: ["External sharing"]
---

# Create a grant

`POST /v1/workspaces/{workspaceId}/grants`

## Request body

- GrantCreate
  - `subject_type` 'sharee' | 'external_user', required
  - `subject_id` string, required
  - `resource_type` 'folder' | 'artifact' | 'file', required
  - `resource_id` string, required
  - `capability` 'view' | 'comment' | 'create' | 'edit', required

## Response `201`

Created

- Grant
  - `id` string
  - `subject_type` 'sharee' | 'external_user'
  - `subject_id` string
  - `resource_type` 'folder' | 'artifact' | 'file'
  - `resource_id` string
  - `capability` 'view' | 'comment' | 'create' | 'edit'

## Other responses

- `400` — Invalid request
- `403` — Access denied

---

[API](https://skmtc.net/shareout/apis/shareout-rest-api.md) · [All operations](https://skmtc.net/shareout/apis/shareout-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/shareout/shareout-rest-api/versions/804359ead65a/schema)
