---
title: "POST /carbonCredits/cancel/credits"
method: POST
path: "/carbonCredits/cancel/credits"
tags: ["CarbonCredits"]
---

# POST /carbonCredits/cancel/credits

`POST /carbonCredits/cancel/credits`

## Request

- Base URL: `https://api.carbonregistry.com`
- URL: `https://api.carbonregistry.com/carbonCredits/cancel/credits`
- Auth: none declared
- TypeScript: <https://skmtc.dev/carbonregistry/apis/carbon-registry-rest-api/docs/carbonCredits/cancel/credits/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- CancelCreditsRequestDto
  - `credit` TransferCredit, required
    - `tokenId` string, required
    - `amount` number, required: The amount of credits to transfer
  - `reason` string, required: The reason for cancellation
  - `fromPublicKey` string, required: The wallet where the credits will come from
  - `projectAddress` string, required: The project address
  - `comment` string: An optional transaction comment
  - `receiptEmails` EmailDto[]: An optional list of emails to send the transaction receipt to
    - `email` string, required

## Response `200`

- CancelCreditsResponseDto
  - `success` boolean, required: Whether the transaction was successful or not
  - `transactionId` string, required: The id of the possibly pending transaction

---

[API](https://skmtc.dev/carbonregistry/apis/carbon-registry-rest-api.md) - [All operations](https://skmtc.dev/carbonregistry/apis/carbon-registry-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/carbonregistry/apis/carbon-registry-rest-api/revisions/a9f1b102faca?raw)
