---
title: "Share a folder."
method: PUT
path: "/share/folder/{foreignId}.json"
tags: ["Shares"]
---

# Share a folder.

`PUT /share/folder/{foreignId}.json`

## Request

- Base URL: `https://passbolt.local`
- URL: `https://passbolt.local/share/folder/{foreignId}.json`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/passbolt/apis/passbolt-api/docs/share/folder/:foreignId.json/put.ts> (a function with typed inputs; its response is checked against the schema)

Requires the Folders plugin. This endpoint also accepts the POST method.

## Path parameters

- `foreignId` string, uuid, required

## Request body

- ShareUpdate
  - `permissions` PermissionUpdate[]
    - `id` string, uuid
    - `aro` 'User' | 'Group'
    - `aro_foreign_key` string, uuid
    - `type` 1 | 7 | 15: * `1` - Read * `7` - Update * `15` - Owner
    - `delete` boolean
    - `is_new` boolean
  - `secrets` SecretAdd[]: Not required on simulation.
    - `user_id` string, uuid
    - `data` string, required
    - `resource_id` string, uuid

## Response `200`

Operation is successful.

- object
  - `header` Header, required
    - `id` string, uuid, required
    - `status` 'success' | 'error', required
    - `servertime` integer, required
    - `action` string, uuid, required
    - `message` string, required
    - `url` string, uri, required
    - `code` integer, required
  - `body` unknown, required

## Other responses

- `400`: Bad request
- `401`: Authentication required.
- `404`: Not found

---

[API](https://skmtc.dev/passbolt/apis/passbolt-api.md) - [All operations](https://skmtc.dev/passbolt/apis/passbolt-api/llms.txt) - [OpenAPI document](https://skmtc.dev/passbolt/apis/passbolt-api/revisions/8d72215e2274?raw)
