---
title: "POST /v1beta/{tenantId}/block/attachments"
method: POST
path: "/v1beta/{tenantId}/block/attachments"
tags: ["Block volume attachments"]
---

# POST /v1beta/{tenantId}/block/attachments

`POST /v1beta/{tenantId}/block/attachments`

Creates a volume attachment.

## Request body

- VolumeAttachmentCreateSpec — Attachment is a description of volume attached resource.
  - `hostId` string, required
  - `volumeId` string, required
  - `attachMode` 'ro' | 'rw'

## Response `202`

Accepted

- VolumeAttachmentRespSpec — Attachment is a description of volume attached resource.
  - `id` string
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `tenantId` string
  - `userId` string
  - `attachMode` 'rw' | 'ro'
  - `hostId` string
  - `volumeId` string
  - `mountpoint` string
  - `status` string
  - `connectionInfo` ConnectionInfo — ConnectionInfo is a structure for all properties of connection when creating a volume attachment.
    - `driverVolumeType` string
    - `data` object
    - `extraProperties` object

## Other responses

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

## Changes

- **2019-11-20** `c535972853d1` — 4 breaking, 2 warning, 2 info
  - added the new required request property `hostId`
  - added the new required request property `volumeId`
  - the request's body type changed from no type to `object`
  - the response's body type changed from `object` to no type for status `202`
  - …4 more
- **2019-11-20** `64d46542013a` — 3 breaking, 3 warning, 2 info
  - added `#/components/schemas/BaseModel, subschema #2` to the request body `allOf` list
  - the request's body type changed from `object` to no type
  - the response's body type changed from no type to `object` for status `202`
  - removed the request property `attachMode`
  - …4 more
- **2019-11-07** `822ca3d7c177` — 4 breaking, 2 warning, 2 info
  - added the new required request property `hostId`
  - added the new required request property `volumeId`
  - the request's body type changed from no type to `object`
  - the response's body type changed from `object` to no type for status `202`
  - …4 more
- **2019-11-06** `fd0669e1e56f` — 6 info
  - added optional request body
  - added the media type `application/json` for the response with the status `202`
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `401`
  - …2 more
- …earlier changes not shown

[Full history](https://skmtc.dev/sodafoundation/apis/soda-api/changes/v1beta/:tenantId/block/attachments/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)
