---
title: "POST /v1beta/{tenantId}/file/shares"
method: POST
path: "/v1beta/{tenantId}/file/shares"
tags: ["File Shares"]
---

# POST /v1beta/{tenantId}/file/shares

`POST /v1beta/{tenantId}/file/shares`

Creates a file share.

## Request body

- FileShareCreateSpec
  - `name` string, required
  - `description` string
  - `size` integer, required
  - `availabilityZone` string
  - `profileId` string

## Response `202`

Accepted

- FileShareRespSpec — FileShare is a file system created by nfs southbound driver, it can be mounted on to physical machine or virtual machine instance.
  - `id` string
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `tenantId` string
  - `userId` string
  - `name` string
  - `description` string
  - `size` integer
  - `availabilityZone` string
  - `status` string
  - `profileId` string
  - `protocols` string[]
  - `exportLocations` string[]
  - `metadata` object

## Other responses

- `400` — BadRequest
- `401` — NotAuthorized
- `403` — Forbidden
- `500` — An unexpected error occured.

## Changes

- **2020-02-07** `fe6600fe7546` — 1 warning
  - changed the pattern of the request property `name` from `^(([a-zA-Z0-9_-]|[a-zA-Z0-9_-][a-zA-Z0-9_-]*[a-zA-Z0-9_-]))*([A-Za-z0-9_-]|[A-Za-z0-9_-][A-Za-z0-9_-]*[A-Za-z0-9_-])$` to `^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-\_]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-\_]*[A-Za-z0-9])$`
- **2020-02-07** `3ee778b81b92` — 1 warning
  - changed the pattern of the request property `name` from `[A-Za-z0-9_-]` to `^(([a-zA-Z0-9_-]|[a-zA-Z0-9_-][a-zA-Z0-9_-]*[a-zA-Z0-9_-]))*([A-Za-z0-9_-]|[A-Za-z0-9_-][A-Za-z0-9_-]*[A-Za-z0-9_-])$`
- **2019-12-09** `6f907ee4cf9b` — 7 breaking, 1 warning, 5 info
  - added the new required request property `name`
  - added the new required request property `size`
  - the request's body type changed from no type to `object`
  - the response property `allOf[subschema #2]/name` became optional for the status `202`
  - …9 more
- **2019-12-06** `1c79c9d92d7b` — 2 breaking, 1 warning, 1 info
  - the `allOf[subschema #2]/name` request property's minLength was increased from `0` to `1`
  - added the pattern `[A-Za-z0-9_-]` to the request property `allOf[subschema #2]/name`
  - the `allOf[subschema #2]/name` request property's maxLength was set to `255`
  - the `allOf[subschema #2]/name` response's property pattern `[A-Za-z0-9_-]` was added for the status `202`
- …earlier changes not shown

[Full history](https://skmtc.dev/sodafoundation/apis/soda-api/changes/v1beta/:tenantId/file/shares/post.md)

---

[API](https://skmtc.dev/sodafoundation/apis/soda-api.md) · [All operations](https://skmtc.dev/sodafoundation/apis/soda-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sodafoundation/apis/soda-api/revisions/62ce0f6c94b4?raw)
