evcc (self-hosted) Sessions API

The sessions API from evcc (self-hosted) — 3 operation(s) for sessions.

Operations 4

PUT /session/{id} Update charging session #
DELETE /session/{id} Delete charging session #
GET /gridsessions Grid limitation sessions #
GET /sessions Charging sessions #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/evcc:evcc-sessions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

evcc-sessions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: evcc Sessions API
  description: smart charging. open source energy management.
  version: 0.2.0
  contact:
    url: https://github.com/evcc-io/evcc
servers:
- url: https://demo.evcc.io/api
tags:
- name: Sessions
paths:
  /session/{id}:
    parameters:
    - $ref: '#/components/parameters/id'
    put:
      operationId: updateSession
      summary: Update charging session
      description: Update vehicle, loadpoint or odometer of a charging session. Only provided fields are changed; a null odometer clears the stored value.
      externalDocs:
        url: https://docs.evcc.io/en/features/sessions
      tags:
      - Sessions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                vehicle:
                  $ref: '#/components/schemas/VehicleName'
                loadpoint:
                  $ref: '#/components/schemas/LoadpointName'
                odometer:
                  $ref: '#/components/schemas/Odometer'
      responses:
        '200':
          description: Success
    delete:
      operationId: deleteSession
      summary: Delete charging session
      description: Delete charging session.
      externalDocs:
        url: https://docs.evcc.io/en/features/sessions
      tags:
      - Sessions
      responses:
        '200':
          $ref: '#/components/responses/NullResult'
  /gridsessions:
    get:
      operationId: getGridSessions
      summary: Grid limitation sessions
      description: Returns a list of HEMS grid limitation events.
      tags:
      - Sessions
      parameters:
      - name: format
        in: query
        description: Response format (default json)
        schema:
          type: string
          enum:
          - csv
      - name: lang
        in: query
        description: Language (defaults to accept header)
        schema:
          type: string
          example: de
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GridSessions'
            text/csv:
              schema:
                description: Download csv-file
                type: string
                format: binary
  /sessions:
    get:
      operationId: getSessions
      summary: Charging sessions
      description: Returns a list of charging sessions.
      externalDocs:
        url: https://docs.evcc.io/en/features/sessions
      tags:
      - Sessions
      parameters:
      - name: format
        in: query
        description: Response format (default json)
        schema:
          type: string
          enum:
          - csv
      - name: lang
        in: query
        description: Language (defaults to accept header)
        schema:
          type: string
          example: de
      - name: month
        in: query
        description: Month filter
        schema:
          type: integer
          example: 2
          minimum: 1
          maximum: 12
      - name: year
        in: query
        description: Year filter
        schema:
          type: integer
          example: 2025
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargingSessions'
            text/csv:
              schema:
                description: Download csv-file
                type: string
                format: binary
components:
  parameters:
    id:
      name: id
      description: Loadpoint index starting at 1
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/Id'
  schemas:
    ChargingSessions:
      description: Charging sessions
      type: array
      items:
        type: object
        properties:
          id:
            $ref: '#/components/schemas/Id'
          created:
            $ref: '#/components/schemas/Timestamp'
          finished:
            $ref: '#/components/schemas/Timestamp'
          loadpoint:
            $ref: '#/components/schemas/LoadpointName'
          vehicle:
            $ref: '#/components/schemas/VehicleName'
          odometer:
            $ref: '#/components/schemas/Odometer'
          meterStart:
            nullable: true
            type: number
            description: Meter reading at start of charging session
          meterStop:
            nullable: true
            type: number
            description: Meter reading at end of charging session
          chargedEnergy:
            type: number
            description: Charged energy in kWh
    GridSessions:
      description: Grid limitation sessions
      type: array
      items:
        type: object
        properties:
          id:
            $ref: '#/components/schemas/Id'
          created:
            $ref: '#/components/schemas/Timestamp'
          finished:
            $ref: '#/components/schemas/Timestamp'
          type:
            type: string
            enum:
            - consumption
            - feedin
            description: Type of grid limitation event
          gridPower:
            type: number
            description: Grid power in watts
          limitPower:
            type: number
            description: Limitation power in watts
          chargeDuration:
            type: number
            description: Duration of active charging
          solarPercentage:
            type: number
            description: Solar percentage of the session
          price:
            type: number
            description: Total price of the session
          pricePerKWh:
            type: number
            description: Average price per kWh
          co2PerKWh:
            type: number
            description: Average CO₂ emissions per kWh
    LoadpointName:
      externalDocs:
        url: https://docs.evcc.io/en/reference/configuration/loadpoints#title
      type: string
      example: Garage
    Odometer:
      nullable: true
      type: number
      description: Vehicle odometer reading in kilometers
    Id:
      description: Loadpoint index starting at 1.
      type: integer
      example: 1
      minimum: 1
    VehicleName:
      externalDocs:
        url: https://docs.evcc.io/en/reference/configuration/vehicles#name
      type: string
      minLength: 1
      pattern: '[a-zA-Z0-9_.:-]+'
      example: vehicle_1
    Timestamp:
      description: Timestamp in RFC3339 format
      type: string
      format: date-time
  responses:
    NullResult:
      description: Success - Null result
      content:
        application/json:
          schema:
            description: Value is always null
            nullable: true
            type: object
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: auth
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Long-lived API key (prefixed `evcc_`, managed via /auth/apikey).

        Grants access to /api/db/* without requiring the X-Admin-Password header.

        '