FlipFlip Utility API

Getting Started

All examples use the sandbox URL. Replace with the production URL when you're ready to go live.

1. List Enrollments

GET /v1/enrollments returns all enrolled sites for a program, including devices and group memberships.

curl "https://api-utility-sandbox.flip.energy/v1/enrollments?program_id=your_program_id" \
  -H "Authorization: Bearer fl_your_api_key"

2. Create Groups

POST /v1/programs/{programId}/groups creates a group you can use to target a subset of enrollments. You provide the group ID — use whatever identifier fits your system (e.g. LZ_HOUSTON, beta-testers).

curl -X POST "https://api-utility-sandbox.flip.energy/v1/programs/your_program_id/groups" \
  -H "Authorization: Bearer fl_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"id": "LZ_HOUSTON", "name": "Houston Load Zone"}'

Assign sites to groups via PATCH /v1/enrollments/{id} with a group_ids array. Sites can belong to multiple groups.

3. Dispatch an Event

POST /v1/events dispatches a demand response event. Target an entire program, a group, or specific devices.

curl -X POST https://api-utility-sandbox.flip.energy/v1/events \
  -H "Authorization: Bearer fl_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "program_id": "your_program_id",
    "target_type": "GROUP",
    "target_ids": ["LZ_HOUSTON"],
    "actions": [{
      "mode": "DISCHARGE",
      "starts_at": "2025-07-15T14:00:00Z",
      "duration_s": 7200
    }]
  }'

4. Monitor Telemetry

POST /v1/telemetry/latest returns the most recent telemetry for each device in a program.

curl -X POST https://api-utility-sandbox.flip.energy/v1/telemetry/latest \
  -H "Authorization: Bearer fl_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"program_id": "your_program_id"}'

For historical data, use POST /v1/telemetry/historical with a start_time and end_time.

Next Steps

See the API Reference in the sidebar for complete request and response schemas.