---
title: "Add energy prices to a contract"
method: PUT
path: "/users/{userId}/electricity-contracts/{contractId}/energy-prices"
tags: ["Contracts"]
---

# Add energy prices to a contract

`PUT /users/{userId}/electricity-contracts/{contractId}/energy-prices`

## Request

- Base URL: `https://connect.clever.gy`
- URL: `https://connect.clever.gy/users/{userId}/electricity-contracts/{contractId}/energy-prices`
- Auth: API key in header `clevergy-api-key`

Adds the contract energy prices for specific dates. The given dates should be in UTC, and set the price (in €/kWh) for the given hour.

## Path parameters

- `userId` string, required
- `contractId` string, required

## Request body

- ContractEnergyPriceRequest: Request to put energy prices for a contract
  - `prices` ContractEnergyPriceItem[]: List of energy prices and dates
    - `date` string, date-time: UTC date and hour of the price
    - `price` number: Price of the energy
    - `surplusPrice` number: Price of the surplus energy

## Response `200`

Contract prices added successfully

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `default`: Unexpected error

---

[API](https://skmtc.dev/clevergy/apis/clevergy-connect-api.md) - [All operations](https://skmtc.dev/clevergy/apis/clevergy-connect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/clevergy/apis/clevergy-connect-api/revisions/d333c5eecb5b?raw)
