---
title: "Metering Event"
url: "https://nov18-dev.movespot.fyi/apis/konnect-metering-billing-0/versions/1801ac42-b9c2-4bc2-8094-1177df9ed25c/schemas/MeteringEvent"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-metering-billing-0/versions/1801ac42-b9c2-4bc2-8094-1177df9ed25c.md

# Metering Event

Metering event following the CloudEvents specification.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Konnect Metering & Billing
  version: 0.0.1
servers:
  - url: https://us.api.konghq.com/v3
    description: United-States Production region
  - url: https://eu.api.konghq.com/v3
    description: Europe Production region
  - url: https://au.api.konghq.com/v3
    description: Australia Production region
  - url: https://me.api.konghq.com/v3
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v3
    description: India Production region
  - url: https://sg.api.konghq.com/v3
    description: Singapore Production region
components:
  schemas:
    MeteringEvent:
      description: Metering event following the CloudEvents specification.
      type: object
      properties:
        id:
          description: Identifies the event.
          type: string
          example: 5c10fade-1c9e-4d6c-8275-c52c36731d3c
          minLength: 1
        source:
          description: Identifies the context in which an event happened.
          type: string
          format: uri-reference
          example: service-name
          minLength: 1
        specversion:
          description: The version of the CloudEvents specification which the event uses.
          type: string
          example: "1.0"
          default: "1.0"
          minLength: 1
        type:
          description: Contains a value describing the type of event related to the
            originating occurrence.
          type: string
          example: com.example.someevent
          minLength: 1
        datacontenttype:
          description: Content type of the CloudEvents data value. Only the value
            "application/json" is allowed over HTTP.
          type: string
          example: application/json
          enum:
            - application/json
          nullable: true
        dataschema:
          description: Identifies the schema that data adheres to.
          type: string
          format: uri
          minLength: 1
          nullable: true
        subject:
          description: Describes the subject of the event in the context of the event
            producer (identified by source).
          type: string
          example: customer-id
          minLength: 1
        time:
          description: Timestamp of when the occurrence happened. Must adhere to RFC 3339.
          type: string
          format: date-time
          example: 2023-01-01T01:01:01.001Z
          nullable: true
          title: RFC3339 Date-Time
        data:
          description: |-
            The event payload.
            Optional, if present it must be a JSON object.
          type: object
          additionalProperties: {}
          nullable: true
      example:
        specversion: "1.0"
        id: 5c10fade-1c9e-4d6c-8275-c52c36731d3c
        source: service-name
        type: prompt
        subject: customer-id
        time: 2023-01-01T01:01:01.001Z
        data:
          prompt: Hello, world!
          tokens: 100
          model: gpt-4o
          type: input
      required:
        - id
        - source
        - specversion
        - type
        - subject
      title: Metering Event
```
