---
title: "Create a Samba share"
method: POST
path: "/samba/shares"
tags: ["Samba"]
---

# Create a Samba share

`POST /samba/shares`

Create a Samba share with the specified settings

## Request body

- InternalHandlersSambaCreateSambaShareRequest
  - `auditEnabled` boolean
  - `auditRetentionDays` integer
  - `auditedOperations` string[]
  - `createMask` string
  - `dataset` string
  - `directoryMask` string
  - `enabled` boolean
  - `guest` InternalHandlersSambaSambaGuestRequest
    - `enabled` boolean
    - `writeable` boolean
  - `name` string
  - `permissions` InternalHandlersSambaSambaPermissionsRequest
    - `read` InternalHandlersSambaSambaPrincipalIDsRequest
      - `groupIds` integer[]
      - `userIds` integer[]
    - `write` InternalHandlersSambaSambaPrincipalIDsRequest
      - `groupIds` integer[]
      - `userIds` integer[]
  - `timeMachine` boolean
  - `timeMachineMaxSize` integer

## Response `201`

Created

- GithubComAlchemillahqSylveInternalAPIResponseAny
  - `data` unknown
  - `error` string
  - `message` string
  - `status` string

## Other responses

- `400` — Bad Request
- `409` — Conflict
- `500` — Internal Server Error

## Changes

- **2026-08-12** `9a5026bf9057` — 1 breaking, 3 info
  - removed the success response with the status `200`
  - the endpoint scheme security `BearerAuth` was added to the API
  - added the non-success response with the status `409`
  - added the success response with the status `201`
- **2025-08-14** `0e0247c98990` — 1 info
  - endpoint added
- **2025-03-11** `2b736ca1b025` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/alchemillahq/apis/sylve-api/changes/samba/shares/post.md)

---

[API](https://skmtc.dev/alchemillahq/apis/sylve-api.md) · [All operations](https://skmtc.dev/alchemillahq/apis/sylve-api/llms.txt) · [OpenAPI document](https://skmtc.dev/alchemillahq/apis/sylve-api/revisions/6d4b8bb77d9a?raw)
