---
title: "Add a Volume to Stack"
method: POST
path: "/uaas/stacks/{stack_id}/volumes/{volume_id}"
tags: ["UniFS As A Service (UaaS)"]
---

# Add a Volume to Stack

`POST /uaas/stacks/{stack_id}/volumes/{volume_id}`

## Request

- Base URL: `https://am1.portal.api.nasuni.com`
- URL: `https://am1.portal.api.nasuni.com/uaas/stacks/{stack_id}/volumes/{volume_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nasuni/apis/portal-api/docs/uaas/stacks/:stack_id/volumes/:volume_id/post.ts> (a function with typed inputs; its response is checked against the schema)

Add a volume to the stack. Creates a registration task and sends a command to the edge.

Returns a task DTO that can be queried to check the registration status.

## Path parameters

- `stack_id` string, uuid, required
- `volume_id` string, required

## Request body

- UaasVolumeNdsDto
  - `nds` boolean, nullable
  - `nds_excluded_paths` string, nullable
  - `nds_included_paths` string, nullable

## Response `202`

Volume registration accepted; command dispatched to edge

- TaskDto: Full/internal task view: the customer summary plus internal steps and captured auth context. Produced by the repo/converters and consumed across the backend. It must not cross the customer boundary as-is — the task routes serialize the `TaskSummaryDto` subset instead. `auth_context` is the serialized `AuthContext` (key / user / roles / source_ip) captured at task creation; event processors re-seed it so audit logs are attributed to the originating caller rather than the eventhub Lambda identity. Internal-only by design — never include it on a customer-facing DTO.
  - `id` string, uuid, required
  - `created_at` string, date-time, required
  - `resource` string, required
  - `resource_id` union
    - string, uuid
    - string
  - `stack_id` string, uuid, nullable
  - `action` string, required
  - `executor` 'edge', required
  - `executor_id` string, uuid, nullable
  - `initiated_by` 'portal' | 'edge', required
  - `initiator_id` string, uuid, nullable
  - `activity_log_id` string, uuid, nullable
  - `reason` string, nullable
  - `state` 'in_progress' | 'completed' | 'failed', required
  - `last_updated_at` string, date-time, required
  - `user_acknowledged_at` string, date-time, nullable
  - `deletion_time` string, date-time, nullable
  - `steps` TaskStepDto[]
    - `name` string, required
    - `state` 'pending' | 'in_progress' | 'completed' | 'failed', required
    - `reason` string, nullable
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `auth_context` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/nasuni/apis/portal-api.md) - [All operations](https://skmtc.dev/nasuni/apis/portal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nasuni/apis/portal-api/revisions/2a505bec6d14?raw)
