Hackmamba Docs

Overview

Complete API documentation with examples and integration guides

Authentication

All API requests require authentication using API keys or OAuth tokens.

API Key Authentication

Include your API key in the request header:

curl -H "Authorization: Bearer YOUR_API_KEY" \
     https://api.example.com/v1/endpoint

OAuth Authentication

For OAuth authentication, follow the OAuth 2.0 flow:

  1. Redirect users to the authorization endpoint
  2. Handle the callback with the authorization code
  3. Exchange the code for an access token
  4. Use the access token in API requests

Base URL

All API requests should be made to:

https://api.example.com/v1

Rate Limits

API requests are rate limited to ensure fair usage:

  • Free Tier: 100 requests per hour
  • Pro Tier: 1,000 requests per hour
  • Enterprise: Custom limits

Rate limit headers are included in all responses:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200

Endpoints

Users

Get User Profile

GET /users/{user_id}

Response:

{
  "id": "user_123",
  "name": "John Doe",
  "email": "john@example.com",
  "created_at": "2023-01-01T00:00:00Z"
}

Update User Profile

PUT /users/{user_id}

Request Body:

{
  "name": "John Smith",
  "email": "johnsmith@example.com"
}

Projects

List Projects

GET /projects

Query Parameters:

  • limit (optional): Number of results per page (default: 20)
  • offset (optional): Number of results to skip (default: 0)

Error Handling

The API uses standard HTTP status codes and returns error details in JSON format:

{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "The request is invalid",
    "details": {
      "field": "email",
      "reason": "Invalid email format"
    }
  }
}

SDKs

We provide official SDKs for popular programming languages: