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
- Log into the Enertel application at https://app.enertel.ai
- Click the user icon in the top-right navigation bar
- Navigate to your user profile
- Create a new API token
- 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:
| Header | Value |
|---|---|
Authorization | Bearer <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
- Interactive documentation: https://app.enertel.ai/api/redoc
- Sample code: See our tutorials for practical examples
- Support: Contact our team through the Enertel application for technical assistance