IPFS Gateway
HomeUploadRetrieveFilesDocsLogin/Register
HomeUploadRetrieveFilesDocsLogin/Register

IPFS Gateway

Secure IPFS gateway for decentralized storage workflows.

Quick links

  • Upload
  • Retrieve
  • Files

Resources

  • Documentation
  • Create account
  • Login
Copyright 2026 IPFS Gateway. All rights reserved.
Documentation
Docs
  • Overview
  • Getting Started
  • Authentication
  • API Reference
    • User Endpoints
    • File Endpoints
    • Error Codes
  • Code Examples
  • FAQ

API Reference

Complete reference for all REST endpoints. All paths are relative to /api/v1.

Users

Endpoints for account creation and API key lifecycle.

POST/api/v1/users/register

Create a new user account. Returns the generated API key — it is shown only once.

Request Body

json
{
  "email": "user@example.com",
  "password": "securePassword123"
}

Response

json
{
  "status": 201,
  "message": "User registered successfully",
  "data": {
    "email": "user@example.com",
    "api_key": "ak_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "created_at": "2026-03-14T12:00:00Z"
  }
}
POST/api/v1/users/renew/challenge

Request a key-renewal verification code. The code is sent to the account's registered email.

Request Body

json
{
  "email": "user@example.com"
}

Response

json
{
  "status": 200,
  "message": "Verification code sent to email"
}
POST/api/v1/users/renew

Complete the renewal flow using the verification code. Returns a new API key.

Request Body

json
{
  "email": "user@example.com",
  "verification_code": "123456"
}

Response

json
{
  "status": 200,
  "message": "API key renewed successfully",
  "data": {
    "api_key": "ak_yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
  }
}
GET/api/v1/users/status🔑 requires API key

Return the authenticated user's account status and metadata.

Response

json
{
  "status": 200,
  "data": {
    "email": "user@example.com",
    "created_at": "2026-03-14T12:00:00Z",
    "file_count": 42,
    "total_size_bytes": 10485760
  }
}

Files

Upload, retrieve, list, delete, pin, and unpin files on IPFS.

POST/api/v1/files/upload🔑 requires API key

Upload a file as multipart/form-data. Returns the file's IPFS CID and metadata.

Parameters

NameInRequiredTypeDescription
fileformDatayesbinaryThe file to upload

Response

json
{
  "status": 201,
  "message": "File uploaded successfully",
  "data": {
    "cid": "bafkreih5aznjvttude6c3wbvqeebb6rlx7kibuzn7i56aklrbb2a5v53em",
    "original_filename": "report.pdf",
    "size": 204800,
    "content_type": "application/pdf",
    "pinned": true,
    "uploaded_at": "2026-03-14T12:00:00Z"
  }
}
GET/api/v1/files/retrieve/{cid}🔑 requires API key

Retrieve (stream) a file by its CID. Responds with the file bytes and sets Content-Type.

Parameters

NameInRequiredTypeDescription
cidpathyesstringIPFS Content Identifier

Response

json
<binary file content with appropriate Content-Type header>
GET/api/v1/files🔑 requires API key

List all files uploaded by the authenticated user.

Response

json
{
  "status": 200,
  "data": [
    {
      "cid": "bafkreih5...",
      "original_filename": "report.pdf",
      "size": 204800,
      "pinned": true,
      "uploaded_at": "2026-03-14T12:00:00Z"
    }
  ]
}
DELETE/api/v1/files/{cid}🔑 requires API key

Delete a single file by CID. Unpins and removes metadata.

Parameters

NameInRequiredTypeDescription
cidpathyesstringIPFS Content Identifier

Response

json
{
  "status": 200,
  "message": "File deleted successfully"
}
POST/api/v1/files/delete/bulk🔑 requires API key

Delete multiple files in a single request.

Request Body

json
{
  "cids": [
    "bafkreih5...",
    "bafkreih6..."
  ]
}

Response

json
{
  "status": 200,
  "message": "Files deleted successfully",
  "data": {
    "deleted": 2,
    "failed": []
  }
}
POST/api/v1/files/{cid}/pin🔑 requires API key

Pin a file on IPFS to ensure it remains available.

Parameters

NameInRequiredTypeDescription
cidpathyesstringIPFS Content Identifier

Response

json
{
  "status": 200,
  "message": "File pinned successfully"
}
POST/api/v1/files/{cid}/unpin🔑 requires API key

Unpin a file from IPFS. The content may eventually be garbage-collected.

Parameters

NameInRequiredTypeDescription
cidpathyesstringIPFS Content Identifier

Response

json
{
  "status": 200,
  "message": "File unpinned successfully"
}

Tasks

Long-running operations (e.g. bulk deletes, background pin jobs) are handled by Celery tasks. Poll the status endpoint to track progress.

GET/api/v1/tasks/{task_id}/status🔑 requires API key

Return the current status of an async Celery task.

Parameters

NameInRequiredTypeDescription
task_idpathyesstringUUID returned when the task was started

Response

json
{
  "status": 200,
  "data": {
    "task_id": "d4a2c6f8-...",
    "state": "SUCCESS",
    "result": { "deleted": 3 },
    "created_at": "2026-03-14T12:00:00Z",
    "completed_at": "2026-03-14T12:00:05Z"
  }
}

Task States

Possible state values: PENDING, STARTED, SUCCESS, FAILURE, REVOKED.

Error Codes

All error responses share the same envelope shape:

json
{
  "status": 400,
  "error": "Bad Request",
  "message": "Human-readable description of what went wrong"
}
CodeNameWhen it occurs
400Bad RequestMalformed JSON, missing required fields, invalid file type or size
401UnauthorizedMissing or invalid X-API-Key header
403ForbiddenAccount suspended or key invalidated
404Not FoundCID or resource does not exist for this user
409ConflictDuplicate registration email or file already pinned
422Unprocessable EntityValidation passed but business logic rejected the request
429Too Many RequestsRate limit exceeded; check Retry-After header
500Internal Server ErrorUnexpected server-side error; contact support