API Reference
Overview
The HashBin.org API provides programmatic access to content upload, metadata, and account management. All API requests must be made over HTTPS.
Base URL
Authentication
Most endpoints require authentication using an API key. Include your API key in the Authorization header:
API keys can be created and managed from your dashboard.
For third-party browser integrations, use the hosted SDK at https://hashbin.org/sdk/hashbin.js and follow the SDK Guide. Raw files are served from 256t.us; see content security.
Authentication
Get current user session information
Response
List all API keys for authenticated user
Response
Create a new API key
Request Body
Response
Important: The key value is only shown once. Store it securely.
Balance
Get current wallet balance
Response
Content
Upload new content
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | string | Must be application/octet-stream |
| X-Content-Hash | string | REQUIRED 256t hash of content |
| X-Retention-Days | number | REQUIRED Retention duration (multiple of 30) |
Response
Get content metadata, including the dedicated content URL
Parameters
| Parameter | Type | Description |
|---|---|---|
| cid | string | REQUIRED 256t content hash |
Response
Download raw content from the isolated content domain
Response
Binary content with the original content type and restrictive headers such as Content-Security-Policy: default-src 'none'; sandbox.
Check if content exists
Response
Error Responses
All errors follow a consistent format:
HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Missing or invalid authentication |
| 402 | Payment Required - Insufficient balance |
| 404 | Not Found - Resource does not exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |