API
Documentation
All of our API documentation is hosted as an OpenAPI specification, with hosted interactive docs.
Authentication
API access tokens are managed in your User profile in the Enertel App. You can create and revoke tokens from your User profile. To navigate to your user profile click on the User icon at the right of the top navigation bar.
Once created, the application will show you your new access token, it will look like this:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTY1ODkzNjcyNywianRpIjoiMmY5Y2IyZDItMWNmYy00NzNlLWIzYWQtZjU1MTg1MTYwODA2IiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IkdvZDlFR25yQWVUZVpiVTFWWFZKVFloVGZpV1hxeUhuaGZTaXd0WXlpaFZtOVNZRXJ6TDI3SlZ6bjlvdTFvNG8yU09keVVOSzJ2R09KbWlfSmdlN0F3IiwibmJmIjoxNjU4OTM2NzI3LCJleHAiOjE2NTg5NjU1Mjd9.oYQOuoGsa0TxCBYUQu80I6WiQAu5ZlExbq6XD2S0OfM
How to Use
All API calls will require the access token string as part of the authorization header, as seen below.
Key | Value |
---|---|
authorization | Bearer <access_token> |
Example:
curl -H "authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTY1ODkzNTQ3OCwianRpIjoiOWFhM2E5ZjYtZWMwMC00NmVlLWJjYzctMDU5NTUyOGEwZmEzIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6InZHUkNTOGNtWkUxVHhsN2N5ZFJFejNlUl8tMC0xU2FmVS1kcDJKQnhGakRneFFWN0FPcHNyWHByZTdGdGlBVHNUWmtuSDlfU08ySGp1Z0pSRGY3M01RIiwibmJmIjoxNjU4OTM1NDc4LCJleHAiOjE2NTg5NjQyNzh9.ZJynWyDKwezY7O62WsXmayH4giqFfSqzfXyfBRiEh2g" https://app.enertel.ai/api/me