API Documentation

Programmatically access your encrypted data using our secure REST API with token-based authentication.

Getting Started

Generate an API key in your account settings to begin

To use the Hexbon API, you need to generate an API key from your Account Settings → API Settings page. The API uses a two-step authentication flow for enhanced security.

Authentication Flow

1

Request a Token

Use your API key to request a temporary access token via POST /api/v1/auth

2

Token Validity

The token is valid for 60 minutes. After expiry, request a new token.

3

Use the Token

Include the token in the Authorization: Bearer <token> header for data operations.

Rate Limiting

The API is rate-limited to 10 requests per minute per user. Exceeding this limit will result in a 429 Too Many Requests response.

Endpoints

Authenticate

POST
https://hexbon.com/api/v1/auth

Generate a temporary access token using your API key.

Headers

X-API-Key Your API key (required)
Example Request
curl -X POST "https://hexbon.com/api/v1/auth" \
  -H "X-API-Key: your_api_key_here"
Example Response
{
  "success": true,
  "bearer_token": "abc123def456...",
  "expires_at": "2025-11-27T15:30:00Z",
  "expires_in": 3600
}

Read

GET
https://hexbon.com/api/v1/data

Retrieve your encrypted data. Returns the client-encrypted payload (v1:... or v2:...).

Headers

Authorization Bearer {token} (required)
Example Request
curl -X GET "https://hexbon.com/api/v1/data" \
  -H "Authorization: Bearer your_token_here"
Example Response
{
  "success": true,
  "data": "v1:encrypted_payload_here..."
}

Update

POST
https://hexbon.com/api/v1/data

Save your encrypted data. Accepts a client-encrypted payload (v1:... or v2:...) in the request body.

Note: Write access must be enabled in your API Settings. By default, API access is read-only.

Headers

Authorization Bearer {token} (required)
Content-Type application/json (required)

Request Body

data Client-encrypted payload starting with v1: or v2: (required)
Example Request
curl -X POST "https://hexbon.com/api/v1/data" \
  -H "Authorization: Bearer your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"data": "v2:your_encrypted_payload"}'
Example Response
{
  "success": true,
  "message": "Encrypted data saved successfully."
}

Response Format

All API responses are returned in JSON format with a success boolean field indicating the operation result.

Success Response
{
  "success": true,
  "data": "..."
}
Error Response
{
  "success": false,
  "message": "Error description"
}

Error Codes

Code Description
401 Invalid or missing API key / expired token
403 Write access disabled (for POST /data)
422 Invalid payload format or storage limit exceeded
429 Rate limit exceeded (10 requests/minute)
500 Internal server error

Ready to Get Started?

Generate your API key and start integrating with Hexbon today.

Go to API Settings

We barely use cookies

We only use strictly necessary cookies, that enhance website security and improve user experience. We don't track your actions or activity.