# Storage

TransferChain S4 provides a privacy-enhancing wrapper around standard S3 operations.

* Create secure buckets ((Note: Buckets are created and managed via TransferChain S4’s S3-compatible interface — not directly on AWS S3 or other providers.)
* Upload and retrieve files
* List objects
* Delete objects

All objects are:

* Client-side encrypted
* Split into multiple fragments
* Stored across multiple backends (based on your configuration)
* &#x20;Immutable unless explicitly overwritten

### Upload

**Endpoint:** /v1/storage/upload\
**Method:** POST<br>

Body:

```json
{
  "files": ["raw file data", "/home/transferchain/file1.zip"]
}
```

Response:

```json
{
  "data": {
    "transactions": [
      {
        "id": "<txID>",
        "version": 2,
        "type": "storage",
        "sender_addr": "<your random address>",
        "recipient_addr": "<your random address>",
        "data": "<base encoded, encrypted data>",
        "sign": "<base encoded, sha512 hashed sender signed data>",
        "fee": 0
      }
    ],
    "storages": [
      {
        "UUID": "<string>",
        "FileName": "<uuid_v4>",
        "Size": 97,
        "Slots": [
          {
            "base_uuid": "<string>",
            "uuid": "<string>",
            "storage_service": "<provider title>",
            "storage_code": "<provider code>",
            "size": 0,
            "size_rl": 0,
            "user_id": 0,
            "chunk_size": 0
          }
        ],
        "KeyAES": "<base64 encoded random bytes>",
        "KeyHMAC": "<base64 encoded random bytes>",
        "UploadDate": "RFC3339 TIMESTAMP",
        "Policy": {
          "ID": "<string>",
          "Identifier": "<string>",
          "Owner": "<your random address>",
          "SourceIdentifier": "<your random address>",
          "TargetIdentifier": "<your random address>",
          "OPCode": "storage",
          "Policy": "owner",
          "EventType": "create",
          "CreatedAt": "RFC3339 TIMESTAMP"
        }
      }
    ],
    "mapped_storages": {
      "<txID>": {
        "UUID": "<string>",
        "FileName": "<uuid_v4>",
        "Size": 97,
        "Slots": [
          {
            "base_uuid": "<string>",
            "uuid": "<string>",
            "storage_service": "<provider title>",
            "storage_code": "<provider code>",
            "size": 0,
            "size_rl": 0,
            "user_id": 0,
            "chunk_size": 0
          }
        ],
        "KeyAES": "<base64 encoded random bytes>",
        "KeyHMAC": "<base64 encoded random bytes>",
        "UploadDate": "RFC3339 TIMESTAMP",
        "Policy": {
          "ID": "<string>",
          "Identifier": "<string>",
          "Owner": "<your random address>",
          "SourceIdentifier": "<your random address>",
          "TargetIdentifier": "<your random address>",
          "OPCode": "storage",
          "Policy": "owner",
          "EventType": "create",
          "CreatedAt": "RFC3339 TIMESTAMP"
        }
      }
    }
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.transferchain.io/transferchain-sdk/s4/using-transferchain-s4/storage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
