Skip to main content

API Documentation

Overview

All Enertel API documentation is hosted as an OpenAPI specification with hosted interactive documentation. The interactive docs allow you to test endpoints directly from your browser and explore the complete API surface.

Authentication

API access tokens are managed through your user profile in the Enertel application. You can create and revoke tokens at any time for security purposes.

Creating an API Token

  1. Log into the Enertel application at https://app.enertel.ai
  2. Click the user icon in the top-right navigation bar
  3. Navigate to your user profile
  4. Create a new API token
  5. Important: Copy and securely store your token immediately - it will only be displayed once

Your API token will look similar to this:

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTY1ODkzNjcyNywianRpIjoiMmY5Y2IyZDItMWNmYy00NzNlLWIzYWQtZjU1MTg1MTYwODA2IiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IkdvZDlFR25yQWVUZVpiVTFWWFZKVFloVGZpV1hxeUhuaGZTaXd0WXlpaFZtOVNZRXJ6TDI3SlZ6bjlvdTFvNG8yU09keVVOSzJ2R09KbWlfSmdlN0F3IiwibmJmIjoxNjU4OTM2NzI3LCJleHAiOjE2NTg5NjU1Mjd9.oYQOuoGsa0TxCBYUQu80I6WiQAu5ZlExbq6XD2S0OfM

Using Your API Token

All API requests require the access token in the authorization header:

HeaderValue
AuthorizationBearer <your_access_token>

Example API Call

curl -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." \
https://app.enertel.ai/api/me

Python Example

import requests

token = "your_api_token_here"
headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://app.enertel.ai/api/me", headers=headers)
print(response.json())

Rate Limits and Best Practices

  • Respect rate limits: Our APIs have reasonable rate limits to ensure fair usage
  • Use HTTPS: Always use secure connections (https://) for API calls
  • Handle errors gracefully: Check response status codes and implement proper error handling
  • Cache when appropriate: Cache responses when the data doesn't change frequently

Getting Help