Buckets

ICBucket

ICPay Cloud guide

On-chain encrypted file storage

New bucketPricingGitLab
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
ICBucket

On-chain encrypted file storage

Overview

IntroductionQuick StartInstallation

Guides

ConfigurationAuthenticationBasic UsageBest Practices

API Reference

API OverviewAPI EndpointsAPI RequestsAPI Responses

Errors

Error CodesError HandlingTroubleshooting

Deployment

Local DevelopmentProduction Deployment

Reference

Configuration ReferenceTypes ReferenceChangelog

FAQ

Frequently Asked Questions
ICPay

© 2026 ICPay. All rights reserved.

contact@icpay.cloud

Products

  • ICFalcon
  • ICBucket
  • Canisters
  • Top up cycles
  • ICPay Wallet

Explore

  • Channels
  • Blog

Resources

  • Falcon CLI
  • ICP-Hub Packages
  • ICBucket Docs
  • Blog

Company

  • Charity
  • About
  • FAQ
  • Roadmap

Legal

  • Brands
  • Terms
  • Privacy
  • Transparency

Community

  • GitLab
  • X
  • LinkedIn
  • Discord
  • Support
ICPayICPay
  • Blog
Buckets

ICBucket

ICPay Cloud guide

On-chain encrypted file storage

New bucketPricingGitLab
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
ICBucket

On-chain encrypted file storage

Overview

IntroductionQuick StartInstallation

Guides

ConfigurationAuthenticationBasic UsageBest Practices

API Reference

API OverviewAPI EndpointsAPI RequestsAPI Responses

Errors

Error CodesError HandlingTroubleshooting

Deployment

Local DevelopmentProduction Deployment

Reference

Configuration ReferenceTypes ReferenceChangelog

FAQ

Frequently Asked Questions

API Reference

API Endpoints

Detailed endpoint reference for uploading, fetching, listing, and managing on-chain bucket assets.

API Endpoints

Explore the full list of HTTP endpoints and actor methods supported by ICBucket.

Prerequisites

  • Read operations: public access.
  • Write operations: API key or delegation.

Core Endpoints

1. Download / Stream File

GET /cloud/{bucketName}/{filePath}
Host: cdn.icpay.app

Returns the binary file body with original Content-Type and HTTP caching headers.

2. Single-Call File Upload

PUT /api/v1/bucket/{bucketName}/files/{filePath}
Host: cdn.icpay.app
Authorization: Bearer <API_KEY>
Content-Type: <MIME_TYPE>

<binary file content>

Payload limit: 2MB. For larger files, use chunked session endpoints below.

3. Chunked Upload Session

  1. Initialize Session: POST /api/v1/bucket/{bucketName}/upload/start
  2. Upload Chunk: PUT /api/v1/bucket/{bucketName}/upload/{sessionId}/chunk/{chunkIndex}
  3. Commit Upload: POST /api/v1/bucket/{bucketName}/upload/{sessionId}/complete

4. List Folder Contents

GET /api/v1/bucket/{bucketName}/files?prefix=assets/&page=1&pageSize=10
Host: cdn.icpay.app
Authorization: Bearer <API_KEY>

Interactive Code Examples

import { prepareUploadFile } from "@/lib/bucket/prepareUpload"
import { uploadChunkCount, readFileChunk } from "@/lib/bucket/uploadChunk"
import { storeFile } from "@/services/bucket/store-file"
import { getWalletActor } from "@/services/wallet"

const prepared = await prepareUploadFile(file)
await storeFile(identity, prepared.file, {
  bucketId: "icp",
  path: prepared.path,
  contentType: prepared.contentType,
  apiKey: "icp_cloud_…",
})

const actor = await getWalletActor(identity)
const begin = await actor.beginFileUpload(
  "icp", "/big.zip", "application/zip", BigInt(file.size), ["icp_cloud_…"]
)
if ("err" in begin) throw new Error(begin.err)
const uploadId = begin.ok
const total = uploadChunkCount(file.size)
for (let i = 0; i < total; i++) {
  const bytes = await readFileChunk(file, i, total)
  await actor.uploadFileChunkIndexed(uploadId, BigInt(i), bytes)
}
await actor.completeFileUpload(uploadId, ["icp_cloud_…"])

await actor.getUpload(uploadId)
await actor.cancelUpload(uploadId)

Related Pages

  • Requests
  • Responses
  • Error Codes
PreviousAPI OverviewNextAPI Requests

On this page

PrerequisitesCore Endpoints1. Download / Stream File2. Single-Call File Upload3. Chunked Upload Session4. List Folder ContentsInteractive Code ExamplesRelated Pages
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
ICBucket

On-chain encrypted file storage

Overview

IntroductionQuick StartInstallation

Guides

ConfigurationAuthenticationBasic UsageBest Practices

API Reference

API OverviewAPI EndpointsAPI RequestsAPI Responses

Errors

Error CodesError HandlingTroubleshooting

Deployment

Local DevelopmentProduction Deployment

Reference

Configuration ReferenceTypes ReferenceChangelog

FAQ

Frequently Asked Questions