> For the complete documentation index, see [llms.txt](https://docs.zus.network/zus-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zus.network/zus-docs/http-apis/obox-api/storage-allocation-management.md).

# Storage Allocation Management

### **Storage Allocation Management**

These endpoints manage decentralized storage allocations and permissions.

#### **Insert Allocation**

* **Path:** `/v2/allocation`
* **Method:** `POST`
* **Access:** Signature API
* **Description:**\
  Creates a new allocation for the authenticated user. Used to provision decentralized storage via blobbers.
* **Headers Required:** `AuthHeader`
* **Body:**

```json
{
  "id": "a1b2c3d4e5f6g7h8i9j0",
  "name": "My First Allocation",
  "description": "This is my primary storage allocation.",
  "allocation_type": "standard",
  "alloc_blobbers_type": "hot"
}
```

* **Response:**

```json
{
  "message": "allocation created successfully"
}
```

#### **Update Allocation**

* **Path:** `/v2/allocation`
* **Method:** `PUT`
* **Access:** Signature API
* **Description:**\
  Updates an existing allocation with new configuration such as size or blobber replacement.
* **Headers Required:** `AuthHeader`
* **Body:**

```json
{
  "id": "a1b2c3d4e5f6g7h8i9j0",
  // Additional fields from handler.AllocationDetails
}
```

* **Response:**

```json
{
  "message": "allocation updated successfully"
}
```

#### **Delete Allocation**

* **Path:** `/v2/allocation/:ID`
* **Method:** `DELETE`
* **Access:** Signature API
* **Description:**\
  Permanently deletes a specified allocation.
* **Path Param:** `ID` (string)
* **Headers Required:** `AuthHeader`
* **Response:**

```json
{
  "message": "allocation deleted successfully"
}
```

#### **Get Allocation**

* **Path:** `/v2/allocation`
* **Method:** `GET`
* **Access:** Signature API
* **Description:**\
  Fetches details of an allocation by ID using body data.
* **Headers Required:** `AuthHeader`
* **Body:**

```json
{
  "id": "allocation-id"
}
```

* **Response:**

```json
{
  "id": "a1b2c3d4e5f6g7h8i9j0",
  "wallet_id": 12345,
  "name": "My First Allocation",
  "description": "This is my primary storage allocation.",
  "allocation_type": "standard",
  "blobbers_replaced": 0,
  "app_type": "vult",
  "last_update": "2025-06-02T14:30:00",
  "alloc_blobbers_type": "hot"
}
```

#### **Get Allocation List**

* **Path:** `/v2/allocation/list`
* **Method:** `GET`
* **Access:** Signature API
* **Description:**\
  Retrieves all allocations for the authenticated owner.
* **Headers Required:** `AuthHeader`
* **Response:** Array of `AllocResponse` objects.

#### **Check Allocation Name**

* **Path:** `/v2/allocation/exists/name`
* **Method:** `GET`
* **Access:** Signature API
* **Query Parameter:** `allocation_name` (string, required)
* **Headers Required:** `AuthHeader`
* **Response:**

```json
{
  "field": "allocation_name",
  "exists": true
}
```

#### **Check Allocation (by user + app)**

* **Path:** `/v2/allocation/exists`
* **Method:** `GET`
* **Access:** CSRF API
* **Headers Required:** `NonAuthHeader`
* **Response:**

```json
{
  "field": "allocation",
  "exists": true
}
```

#### **Public Smart Contract Allocation Info**

**GetSCAllocation**

* **Path:** `/v2/getAllocation`
* **Method:** `GET`
* **Access:** Public
* **Query Parameter:** `allocation` (string, required)
* **Description:**\
  Returns full SC data and blobber info.
* **Response (simplified):**

```json
{
  "id": "a1b2c3d4e5f6g7h8i9j0",
  "data_shards": 2,
  "parity_shards": 2,
  "size": 1073741824,
  "expiration": 1750000000,
  "owner": "abcdef1234567890",
  "blobbers": [
    {
      "id": "blobberid1",
      "url": "https://blobber1.example.com",
      "terms": {
        "read_price": 100,
        "write_price": 200
      }
    }
  ]
}
```

**GetSCAllocations**

* **Path:** `/v2/geAllocations`
* **Method:** `GET`
* **Access:** Public
* **Query Parameter:** `client` (string, required)
* **Description:**\
  Lists SC allocations for a specific client ID.
