Skip to main content

API Key Authentication

Most WURK API endpoints require authentication using an API key. You can obtain your API key from wurk.fun/apikey.
Exception: Quick Endpoints (/api/x402/quick/*) do NOT require an API key. These endpoints use x402 payment authentication instead. See Quick Endpoints for details.

Usage

Include your API key in the X-API-Key header:
curl -X GET "https://wurkapi.fun/api/external/balance" \
  -H "X-API-Key: YOUR_API_KEY"
Query parameter authentication (?apiKey=YOUR_KEY) is also supported but not recommended for security reasons.

Error Responses

When authentication fails, you’ll receive one of these responses:

Missing API Key

{
  "error": "API key required",
  "status": 401
}

Invalid API Key

{
  "error": "Invalid API key",
  "status": 401
}

Testing Authentication

Test your API key with this simple request:
curl -X GET "https://wurkapi.fun/api/external/health" \
  -H "X-API-Key: YOUR_API_KEY"
Success response:
{
  "ok": true,
  "module": "external",
  "version": 1
}

Need Help?