Back to Home

API Reference

Complete API documentation for CloakDesk endpoints

Overview

The CloakDesk API provides programmatic access to all privacy features and functionality. All endpoints require authentication and return JSON responses.

The API is RESTful and follows standard HTTP conventions. All requests should include appropriate headers and authentication tokens.

Authentication

API requests require authentication using an API key or wallet signature. Include your authentication token in the request headers:

Authorization: Bearer YOUR_API_KEY

Endpoints

POST/api/obfuscate/queue

Queue a transaction for obfuscation

GET/api/obfuscate/tasks

Get status of obfuscation tasks

POST/api/analysis/deep-scan

Start a deep privacy analysis scan

GET/api/analysis/[jobId]

Get analysis results by job ID

GET/api/leaderboard

Get privacy leaderboard rankings

POST/api/mpc/create-vault

Create a new MPC vault

POST/api/proof/generate

Generate a zero-knowledge proof

GET/api/relayers/query

Query available relayers

POST/api/payments/credits

Purchase credits for premium features

Example Request

curl -X POST https://api.cloakdesk.app/api/obfuscate/queue \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "0x...",
    "to": "0x...",
    "amount": "1.0",
    "token": "ETH"
  }'

Response Format

All API responses follow a standard format:

{
  "success": true,
  "data": { ... },
  "message": "Operation completed successfully"
}

Error Handling

Errors are returned with appropriate HTTP status codes and error messages:

{
  "success": false,
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Invalid parameters provided"
  }
}

Getting Started

1. Get API Key

Generate an API key from your account settings

2. Make Requests

Use your API key to authenticate requests

3. Handle Responses

Parse JSON responses and handle errors appropriately