Skip to main content

Introduction

API Version

This reference is about API version 3. If you are using old sites you cannot use this API to have access to the devices on this sites.

See our 3.0 overview to learn new features.

API Base URL

Use the following base URLs to access this API:

  • Enapter Cloud: https://api.enapter.com/v3
  • Enapter Gateway: http://enapter-gateway.local/api/v3

Authentication

Enapter HTTP API uses API tokens to authenticate requests. The token must be provided for every API request via custom HTTP header X-Enapter-Auth-Token:

$ curl https://api.enapter.com/v3/devices -X GET \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}'
$ curl http://enapter-gateway.local/api/v3/devices -X GET \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}'

Errors

Enapter uses conventional HTTP response codes to indicate success or failure of an API request. Codes in the 2xx range indicate success. Codes in the 4xx range indicate request payload errors. Codes in the 5xx range indicate Enapter servers' errors.

HTTP Status CodeExplanation
200 — OKEverything worked as expected.
400 — Bad RequestThe request payload has failed parsing or validation.
401 — UnauthorizedAuthentication token is missed.
403 — ForbiddenAuthentication token is invalid or expired.
404 — Not FoundA non-existent resource is requested.
409 — ConflictEntity already exists.
422 — Unprocessable EntityUnable to process the contained instructions.
429 — Too Many RequestsToo many requests hit the API too quickly.
500 — Internal Server ErrorSomething went wrong on Enapter's end.

Error Response

Any error response contains at least one error in the body.

{
"errors: [
...
]
}

Error Object

Each error has a common format.

codestringrequired#

A short string indicating the reported error code.

messagestringrequired#

A human-readable message that provides more details about the error.

detailsobject#

Additional error-specific fields.

Sample error object
{
"code": "invalid_header",
"message": "Authentication token is invalid.",
"details": {
"header": "X-Enapter-Auth-Token"
}
}

All Rights Reserved © 2025 Enapter AG.