FlipFlip Energy API

Authentication

All endpoints are protected and require authentication. The only supported method is Bearer Token. Add the following header to your request, replacing token with the proper value:

Authorization: Bearer <token>

There are two types of tokens: client tokens, and site tokens.

Client tokens

Client tokens can be generated by you in the developer portal.

They unlock access to all functions of the API, and as such should be stored securely. They are intended to be used for server to server communications only. They never expire, but can be revoked manually if needed.

To protect you and security of our systems, Flip doesn't store the tokens, and cannot retrieve them if they are ever lost. Please make sure you store them securely.

Site tokens

Site tokens are created by calling POST /v1/auth/site/{siteId}, and are specific to a given site. They are intended to be used for communications between your mobile app and Flip's API. They expire after one hour, after which you will need to request a new one.

A site token can only be used to access data for the site it was created for. If you try to access or act on data from a different site, a 401 UNAUTHORIZED or 403 FORBIDDEN error will be returned.

Which type of token for which endpoint

EndpointClient tokenSite token
POST /v1/auth/site/{siteId}YesNo
POST /v1/commissionYesNo
GET /v1/commandsYesNo
PATCH /v1/command/{commandId}YesNo
POST /v1/telemetry/BATTERYYesNo
POST /v1/telemetry/BATTERY_COUNTERYesNo
PATCH /v1/settings/{settingsRequestId}YesNo
POST /v1/supplementsYesNo
GET /v1/sitesYesNo
GET /v1/programsYesNo
GET /v1/site/{siteId}NoYes
PATCH /v1/site/{siteId}NoYes
GET /v1/site/{siteId}/devicesNoYes
GET /v1/site/{siteId}/device/{deviceId}NoYes
PATCH /v1/site/{siteId}/device/{deviceId}NoYes
DELETE /v1/site/{siteId}/device/{deviceId}NoYes
POST /v1/site/{siteId}/enrollmentsNoYes
GET /v1/site/{siteId}/enrollmentsNoYes
DELETE /v1/site/{siteId}/enrollment/{enrollmentId}NoYes
GET /v1/site/{siteId}/programsNoYes
GET /v1/site/{siteId}/program/{programId}NoYes
GET /v1/site/{siteId}/eventsNoYes
GET /v1/site/{siteId}/event/{eventId}NoYes
PATCH /v1/site/{siteId}/event/{eventId}NoYes