Skip to content

Authentication

All protected API endpoints require a Bearer token:

Authorization: Bearer et_live_abc123...

API keys are scoped to a single domain. Each key has an et_live_ prefix followed by 32 hex characters.

Terminal window
endlesstesting init

The init flow creates a domain and generates an API key automatically.

Terminal window
curl -X POST https://appbe.endlesstesting.ai/api/auth/api-key \
-H "Content-Type: application/json" \
-d '{"domainId": "your-domain-id"}'

The key is returned once and cannot be retrieved again. Store it securely.

Terminal window
curl -X POST https://appbe.endlesstesting.ai/api/auth/api-key/regenerate \
-H "Authorization: Bearer et_live_your-current-key"

This invalidates the old key immediately.

Terminal window
curl https://appbe.endlesstesting.ai/api/auth/verify \
-H "Authorization: Bearer et_live_your-key"

Returns:

{
"valid": true,
"domain": { "id": "...", "host": "mysite.com" }
}

These endpoints are called by the SDK from visitor browsers and do not require authentication:

  • GET /api/sdk.js — SDK script
  • POST /api/events — Event tracking
  • GET /api/tests/by-url-allocations — Variant allocation
  • GET /api/health — Health check