Enode Webhooks API

Manage event webhooks.

OpenAPI Specification

enode-webhooks-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Enode Batteries Webhooks API
  description: Enode connects and controls electric vehicles, EV chargers, HVAC systems, home batteries, solar inverters, and smart meters through a single API. End users authorize access to their devices via the Enode Link OAuth flow; applications then read normalized device telemetry, issue control actions (charging, climate, battery mode), configure smart charging, and subscribe to webhooks. Access tokens are obtained via the OAuth 2.0 client_credentials grant and presented as a Bearer token.
  termsOfService: https://enode.com/legal/terms-of-service
  contact:
    name: Enode Support
    url: https://developers.enode.com
  version: '2024-10-01'
servers:
- url: https://enode-api.production.enode.io
  description: Production
- url: https://enode-api.sandbox.enode.io
  description: Sandbox
security:
- bearerAuth: []
tags:
- name: Webhooks
  description: Manage event webhooks.
paths:
  /webhooks:
    get:
      operationId: listWebhooks
      tags:
      - Webhooks
      summary: List webhooks.
      responses:
        '200':
          description: A list of webhooks.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Webhook'
    post:
      operationId: createWebhook
      tags:
      - Webhooks
      summary: Create a webhook.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookRequest'
      responses:
        '201':
          description: Webhook created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
  /webhooks/{webhookId}:
    get:
      operationId: getWebhook
      tags:
      - Webhooks
      summary: Get a webhook.
      parameters:
      - $ref: '#/components/parameters/webhookId'
      responses:
        '200':
          description: A webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
    delete:
      operationId: deleteWebhook
      tags:
      - Webhooks
      summary: Delete a webhook.
      parameters:
      - $ref: '#/components/parameters/webhookId'
      responses:
        '204':
          description: Webhook deleted.
  /webhooks/{webhookId}/test:
    post:
      operationId: testWebhook
      tags:
      - Webhooks
      summary: Send a test event to a webhook.
      parameters:
      - $ref: '#/components/parameters/webhookId'
      responses:
        '204':
          description: Test event dispatched.
components:
  schemas:
    WebhookRequest:
      type: object
      required:
      - url
      - events
      properties:
        url:
          type: string
          format: uri
        secret:
          type: string
        events:
          type: array
          items:
            type: string
            example: user:vehicle:updated
        authentication:
          type: object
          properties:
            headerName:
              type: string
            headerValue:
              type: string
    Webhook:
      type: object
      properties:
        id:
          type: string
        url:
          type: string
          format: uri
        events:
          type: array
          items:
            type: string
        isActive:
          type: boolean
        createdAt:
          type: string
          format: date-time
  parameters:
    webhookId:
      name: webhookId
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2.0 access token obtained via the client_credentials grant from the Enode OAuth token endpoint (https://oauth.production.enode.io/oauth2/token for production, https://oauth.sandbox.enode.io/oauth2/token for sandbox), presented as a Bearer token.