> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kodelabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a meter

> Changes the details of a meter.

> [!NOTE]
>
> Send the fields you want to change. Use `locatedIn` to put the meter in a space. To link a meter to a space it serves or measures, use [Assign a meter to a space](https://docs.kodelabs.com/products/kode-api/api-reference/meters/assign-a-meter-to-a-space.md).

> [!NOTE]
>
> `status` must be `ACTIVE`, `OUT_OF_SERVICE`, or `DECOMMISSIONED`, in capitals. `installationDate` must be a date in `YYYY-MM-DD` format.


## OpenAPI

````yaml /openapi/kode-api.yaml put /api/v1/buildings/{buildingId}/meters/{meterId}
openapi: 3.1.0
info:
  title: KODE API
  version: 1.0.0
  summary: Programmatic access to KODE OS resources and operations.
  description: >
    Use the KODE API to work with buildings, data sources, connectors, devices,
    points, virtual devices,

    timeseries data, schedules, the ontology, templating, mass writes, spaces,
    space assignments, tenants, meters, users, actions,

    and AssetOps work orders.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.kodelabs.com/kodeos
    description: KODE API
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: OAuth 2.0 discovery, token, and revocation endpoints.
  - name: Buildings
    description: Buildings and their areas.
  - name: Data sources
    description: Data sources connected to a building.
  - name: Devices
    description: Devices and their points.
  - name: Points
    description: Point queries and point writes.
  - name: Timeseries
    description: Current and historical point values.
  - name: Actions
    description: Actions exposed by building data sources.
  - name: Work orders
    description: AssetOps work orders, lookups, comments, and attachments.
  - name: Connectors
    description: KODE API connectors and the devices and points ingested through them.
  - name: Schedules
    description: Schedules discovered on building data sources.
  - name: Templating
    description: Apply ontology templates to groups of points.
  - name: Virtual devices
    description: Virtual devices that group points from other devices.
  - name: Ontology
    description: Canonical types, fields, units, and connections of the KODE ontology.
  - name: Users
    description: Users of the organization and their app access.
  - name: Mass write
    description: Write values to many points across buildings, and follow each run.
  - name: Spaces
    description: Levels and space units of a building, and the meters located in them.
  - name: Space assignments
    description: Assign tenants to leasable spaces of a building for a period.
  - name: Tenants
    description: Tenants of a building, the people or companies that lease its spaces.
  - name: Meters
    description: >-
      Meters of a building, their space assignments, parent and child links, and
      readings.
paths:
  /api/v1/buildings/{buildingId}/meters/{meterId}:
    put:
      tags:
        - Meters
      summary: Update a meter
      description: Changes the details of a meter.
      operationId: updateMeter
      parameters:
        - $ref: '#/components/parameters/BuildingId'
        - name: meterId
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the meter to update.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMeterRequest'
        required: true
      responses:
        '200':
          description: The updated meter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeterPublic'
        '400':
          description: >-
            A value has the wrong type, `status` is not one of the listed
            values, `installationDate` is not a valid date, or `locatedIn` is
            blank or is not a space of the building.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            The building does not exist or is not assigned to the service
            account. KODE API answers `403` in both cases so that building ids
            cannot be probed.
        '404':
          description: No meter with this `meterId` exists in the building.
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    BuildingId:
      name: buildingId
      in: path
      required: true
      description: Building identifier from List buildings.
      schema:
        type: string
      example: 67c960faffaa42223163099e
  schemas:
    UpdateMeterRequest:
      type: object
      properties:
        name:
          description: Name of the meter.
          type: string
        areaServed:
          description: Area the meter serves.
          type: integer
          format: int32
        installationDate:
          $ref: '#/components/schemas/LocalDate'
          description: Date the meter was installed (`YYYY-MM-DD`).
        condition:
          description: Condition of the meter.
          type: string
        serialNumber:
          description: Serial number.
          type: string
        storageUnitSymbol:
          description: Unit symbol of the stored readings.
          type: string
        conversionFactor:
          description: Factor that converts a reading to the storage unit.
          type: number
          format: double
        model:
          description: Model of the meter.
          type: string
        vendor:
          description: Vendor of the meter.
          type: string
        manufacturer:
          description: Manufacturer of the meter.
          type: string
        tenant:
          description: Tenant the meter belongs to.
          type: string
        deviceClass:
          description: Device class of the meter.
          type: string
        zone:
          description: Zone of the meter.
          type: string
        siteLevel:
          description: Whether the meter is a site-level meter.
          type: boolean
        location:
          description: Location of the meter.
          type: string
        description:
          description: Description of the meter.
          type: string
        isMain:
          description: Whether this is the main meter of the building.
          type: boolean
        endUse:
          description: End use of the meter.
          type: string
        dataInterval:
          description: Interval of the meter data.
          type: string
        identifier:
          description: Your own identifier for the meter.
          type: string
        locatedIn:
          description: Identifier of the space the meter is in. The space must exist.
          type: string
        status:
          $ref: '#/components/schemas/Status3'
          description: >-
            `ACTIVE`, `OUT_OF_SERVICE`, or `DECOMMISSIONED`. The value is
            case-sensitive.
        utilityAccountId:
          description: Utility account of the meter.
          type: string
        utilityProvider:
          description: Utility provider.
          type: string
        utilityMeterId:
          description: Meter id at the utility.
          type: string
        meterReaderDeviceId:
          description: Device that reads the meter.
          type: string
    MeterPublic:
      type: object
      properties:
        _id:
          description: Meter identifier.
          type: string
        organizationId:
          type: string
        createdAt:
          $ref: '#/components/schemas/Date'
          type: string
          readOnly: true
        updatedAt:
          $ref: '#/components/schemas/Date'
          type: string
          readOnly: true
        name:
          description: Name of the meter.
          type: string
        area:
          $ref: '#/components/schemas/AreaSimple1'
        locatedIn:
          $ref: '#/components/schemas/SpaceRef1'
          description: The space the meter is in.
        building:
          $ref: '#/components/schemas/BuildingRef'
        canonicalType:
          description: Canonical type of the meter.
          type: string
        connector:
          $ref: '#/components/schemas/PublicDatasourceRef'
        fieldsInConnector:
          $ref: '#/components/schemas/FieldsInConnector2'
        location:
          type: string
        ontology:
          $ref: '#/components/schemas/Ontology3'
        originType:
          $ref: '#/components/schemas/OriginType2'
          description: >-
            How the meter was created: `ORIGIN` for a meter from a data source,
            `VIRTUAL` for a calculated meter, or `MANUAL` for a meter you add by
            hand.
        references:
          description: Meters and devices this meter reads from.
          type: array
          items:
            $ref: '#/components/schemas/MeterReference'
        spaceReferences:
          description: Spaces the meter serves or measures.
          type: array
          items:
            $ref: '#/components/schemas/SpaceReference'
        pointsCount:
          type: integer
          format: int32
        points:
          type: array
          items:
            $ref: '#/components/schemas/PointRefPublic'
        areaServed:
          type: integer
          format: int32
        installationDate:
          $ref: '#/components/schemas/LocalDate'
          description: Date the meter was installed.
        condition:
          type: string
        serialNumber:
          type: string
        model:
          type: string
        description:
          type: string
        vendor:
          type: string
        manufacturer:
          type: string
        status:
          $ref: '#/components/schemas/Status3'
          description: '`ACTIVE`, `OUT_OF_SERVICE`, or `DECOMMISSIONED`.'
        identifier:
          description: Your own identifier for the meter.
          type: string
        apiMeta:
          $ref: '#/components/schemas/ApiMeta1'
        sourceForm:
          type: string
        utilityAccountId:
          type: string
        utilityProvider:
          type: string
        utilityMeterId:
          type: string
        meterReaderDeviceId:
          type: string
        meterCategory:
          type: string
        conversionFactor:
          type: number
          format: double
        dataInterval:
          type: string
        isMain:
          description: Whether this is the main meter of the building.
          type: boolean
        endUse:
          type: string
    LocalDate:
      type: string
      format: date
      examples:
        - '2022-03-10T00:00:00.000Z'
    Status3:
      type: string
      enum:
        - ACTIVE
        - OUT_OF_SERVICE
        - DECOMMISSIONED
    Date:
      type: string
      description: >-
        Date and time in UTC, with a numeric offset and no colon, for example
        `2026-10-28T13:51:31+0000`.
      examples:
        - 2026-10-28T13:51:31+0000
    AreaSimple1:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
          pattern: \S
        order:
          type: integer
          format: int32
      required:
        - name
    SpaceRef1:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
        category:
          type: string
    BuildingRef:
      type: object
      properties:
        _id:
          type: string
        organizationId:
          type: string
        createdAt:
          $ref: '#/components/schemas/Date'
          type: string
          readOnly: true
        updatedAt:
          $ref: '#/components/schemas/Date'
          type: string
          readOnly: true
        name:
          type: string
    PublicDatasourceRef:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
        type:
          type: string
          deprecated: true
        integrationType:
          type: string
    FieldsInConnector2:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
        navName:
          type: string
        axSlotPath:
          type: string
        device:
          type: string
    Ontology3:
      type: object
      properties:
        canonicalType:
          type: string
        entities:
          type: array
          items:
            type: string
        messages:
          type: array
          items:
            type: string
        virtualPoints:
          type: array
          items:
            $ref: '#/components/schemas/VirtualPoint'
        requiredRefs:
          type: array
          items:
            $ref: '#/components/schemas/RequiredRef'
        match:
          type: boolean
    OriginType2:
      type: string
      enum:
        - VIRTUAL
        - ORIGIN
        - MANUAL
    MeterReference:
      type: object
      properties:
        device:
          $ref: '#/components/schemas/DeviceRef1'
        type:
          $ref: '#/components/schemas/ReferenceType1'
        key:
          type: string
        ontology:
          $ref: '#/components/schemas/ReferenceOntology'
        manuallyAdded:
          type: boolean
        deviceId:
          type: string
        refKey:
          type: string
    SpaceReference:
      type: object
      properties:
        space:
          $ref: '#/components/schemas/SpaceRef1'
        key:
          $ref: '#/components/schemas/Key2'
    PointRefPublic:
      type: object
      properties:
        _id:
          type: string
        field:
          type: string
        name:
          type: string
        unit:
          $ref: '#/components/schemas/PublicUnit'
        dataInterval:
          type: string
    ApiMeta1:
      type: object
      properties:
        spareMeter:
          type: string
        multiplyBy:
          type: number
          format: double
        multiplyTotalBy:
          type: number
          format: double
        certificationDate:
          type: string
        nextCertificationDate:
          type: string
        externalMeterCode:
          type: string
    VirtualPoint:
      type: object
      properties:
        cName:
          type: string
        cFunc:
          type: string
    RequiredRef:
      type: object
      properties:
        key:
          type: string
        value:
          type: integer
          format: int32
        canonicalType:
          type: string
    DeviceRef1:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
    ReferenceType1:
      type: string
      enum:
        - INPUT
        - OUTPUT
    ReferenceOntology:
      type: object
      properties:
        canonicalType:
          type: string
        entities:
          type: array
          items:
            type: string
    Key2:
      type: string
      enum:
        - serves
        - measures
    PublicUnit:
      type: object
      properties:
        _id:
          type: string
        category:
          type: string
        baseSymbol:
          type: string
        symbol:
          type: string
  responses:
    Unauthorized:
      description: The access token is missing, invalid, or expired. Request a new token.
    TooManyRequests:
      description: >-
        A rate-limit window is exhausted. Wait, then retry with increasing
        delays.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Paste an access token from [Create an access
        token](/products/kode-api/api-reference/authentication/create-an-access-token).
        Tokens expire, so request a new one if you receive `401`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.