Flip Energy API
  1. Sessions
Flip Energy API
  • Overview
  • Important concepts
  • Authentication
  • Enrollment process
  • End-user app design
  • Monitoring / Telemetry
  • Control
  • Change log
  • Mobile App API
    • Devices
      • Create Device
      • Read Devices
      • Read Device
      • Update Device
      • Delete Device
    • Enrollments
      • Create Enrollment
      • Read Enrollments
      • Read Enrollment
      • Delete Enrollment
    • Events
      • Read Events
      • Read Event
      • Update Event Participation
    • Programs
      • Read Programs
      • Read Program
    • Sites
      • Read Site
      • Update Site
  • Cloud API
    • Sites
      • Get Site Token
      • Get Sites
    • Commissioning
      • Commission Site And Devices
    • Sessions
      • Sessions
        POST
    • Commands
      • Command Created
      • Update Command Status
    • Programs
      • Read Programs
    • Telemetry
      • Report Battery Telemetry
    • Webhooks
      • Overview
      • List of events
      • Webhook headers
      • Schemas
        • Command
        • Enrollment
        • Event
  1. Sessions

Sessions

Cloud Mock
https://mock.apidog.com/m1/479670-0-default
Cloud Mock
https://mock.apidog.com/m1/479670-0-default
POST
/v1/sessions
Create a session for the provided site. If the site does not exist in Flip's system, it will be commissioned, otherwise it will be reused.
If a site already exists, it is possible to only provide site.id in the body, otherwise the schema is as described below.
Session tokens can only be used once.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
    "site": {
        "id": "abc-789",
        "first_name": "John",
        "last_name": "Doe",
        "company_name": "ABC Co.",
        "email": "[email protected]",
        "state_code": "AK",
        "city": "San Francisco",
        "zip_code": "88800",
        "street_address": "123 Main St",
        "street_address2": "string"
    },
    "devices": [
        {
            "id": "xyz-123",
            "manufacturer_name": "DeviceMaker",
            "product_name": "Model 1",
            "serial_number": "123456789",
            "type": "BATTERY",
            "attributes": {
                "battery_capacity_wh": 15000,
                "battery_power_input_w": 6000,
                "battery_power_output_w": 7500
            },
            "install_date": "2025-06-19T15:30:00-07:00"
        }
    ]
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mock.apidog.com/m1/479670-0-default/v1/sessions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "site": {
        "id": "abc-789",
        "first_name": "John",
        "last_name": "Doe",
        "company_name": "ABC Co.",
        "email": "[email protected]",
        "state_code": "AK",
        "city": "San Francisco",
        "zip_code": "88800",
        "street_address": "123 Main St",
        "street_address2": "string"
    },
    "devices": [
        {
            "id": "xyz-123",
            "manufacturer_name": "DeviceMaker",
            "product_name": "Model 1",
            "serial_number": "123456789",
            "type": "BATTERY",
            "attributes": {
                "battery_capacity_wh": 15000,
                "battery_power_input_w": 6000,
                "battery_power_output_w": 7500
            },
            "install_date": "2025-06-19T15:30:00-07:00"
        }
    ]
}'

Responses

🟢200OK
application/json
Body

Example
{
    "token": "xyz-abc",
    "has_programs": true
}
🟠400Invalid input
Modified at 2025-06-12 14:18:18
Previous
Commission Site And Devices
Next
Command Created
Built with