---
title: "Create a new gas contract"
method: POST
path: "/users/{userId}/gas-contracts"
tags: ["Contracts|Gas"]
---

# Create a new gas contract

`POST /users/{userId}/gas-contracts`

## Request

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

Creates a new gas contract with the provided details

:::tip
**Recommended guide**
If you are unsure which parameters to include when creating a gas contract, refer to the [complete documentation](https://docs.clever.gy/developer/how-to-set-up/contracts).
:::

## Path parameters

- `userId` string, required

## Request body

- GasContractRequest: Request to create a new gas contract
  - `startDate` string, date, required: Start date of the gas contract
  - `endDate` string, date: End date of the gas contract
  - `status` 'ACTIVE' | 'INACTIVE', required: Status of the gas contract
  - `address` string, required: Address associated with the gas contract
  - `postalCode` string: Postal code associated with the gas contract
  - `cups` string, required: Universal Point of Supply Code (CUPS)
  - `tariffAccess` 'RL01' | 'RL02' | 'RL03' | 'RL04' | 'RL05' | 'RL06' | 'RL07' | 'RL08' | 'RL09' | 'RL10' | 'RL11', required: Tariff access code
  - `tariffName` string, required: Name of the tariff applied to the contract
  - `iban` string: IBAN for billing purposes
  - `distributorName` string: Name of the gas distributor company
  - `holderName` string: Name of the contract holder
  - `commercialName` string: Name of the commercial gas company
  - `fixedPrice` number: Fixed price component of the gas contract (€/day)
  - `energyPrice` number: Energy price component of the gas contract (€/kWh)
  - `pressure` number: Supply pressure in bar
  - `contractNumber` string: Contract number

## Response `201`

Gas contract created successfully

- GasContract: Gas contract details
  - `id` string, required: Unique identifier of the gas contract
  - `startDate` string, date, required: Start date of the gas contract
  - `endDate` string, date: End date of the gas contract
  - `status` 'ACTIVE' | 'INACTIVE', required: Status of the gas contract
  - `address` string, required: Address associated with the gas contract
  - `postalCode` string: Postal code associated with the gas contract
  - `connectionId` string: UUID of the gas connection
  - `connectionContractId` string: ID of the connection contract
  - `cups` string, required: Universal Point of Supply Code (CUPS)
  - `tariffAccess` 'RL01' | 'RL02' | 'RL03' | 'RL04' | 'RL05' | 'RL06' | 'RL07' | 'RL08' | 'RL09' | 'RL10' | 'RL11', required: Tariff access code
  - `tariffName` string, required: Name of the tariff applied to the contract
  - `iban` string: IBAN for billing purposes
  - `distributorName` string: Name of the gas distributor company
  - `holderName` string: Name of the contract holder
  - `commercialName` string: Name of the commercial gas company
  - `fixedPrice` number: Fixed price component of the gas contract (€/day)
  - `energyPrice` number: Energy price component of the gas contract (€/kWh)
  - `pressure` number: Supply pressure in bar
  - `fileUrl` string, required: URL to access the gas contract file. Also used to upload a new contract file as response in POST and PUT methods.
  - `contractNumber` string: Contract number

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: User not found
- `409`: Contract already exists (only if contract number is provided), or the contract is INACTIVE and its CUPS already has an active contract
- `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)
