---
title: "Update an operation"
method: PATCH
path: "/collateral_management/operations/{operationId}"
tags: ["Collateral Management"]
---

# Update an operation

`PATCH /collateral_management/operations/{operationId}`

Permissions required: **Manage Collateral Packages** and **Read vault activity**


Update an existing operation in the Collateral Management service.
Only the fields provided in the request body will be updated.

## Path parameters

- `operationId` string, required

## Headers

- `Api-Signature` string, required
- `Api-Timestamp` integer, required

## Request body

- CMUpdateOperationRequest — Fields for updating a Collateral Management operation. Any fields left null or omitted will not be updated.
  - `action` 'INITIAL_DEPOSIT' | 'INITIAL_FUNDING' | 'MARGIN_RETURN' | 'PAY_DOWN' | 'PAY_UP' | 'INTEREST_PAYDOWN' | 'INTEREST_ACCRUAL' | 'TOP_UP' | 'CLOSE_RETURN' | 'REHYPE_IN' | 'REHYPE_OUT' — The specific action to be performed in the operation. Valid actions for exposures are: 1. `INITIAL_FUNDING` 2. `PAY_DOWN` 3. `PAY_UP` 4. `INTEREST_PAYDOWN` 5. `INTEREST_ACCRUAL` Valid actions for collateral packages are: 1. `INITIAL_DEPOSIT` 2. `MARGIN_RETURN`, 3. `TOP_UP` 4. `CLOSE_RETURN`. 5. `REHYPE_IN` 6. `REHYPE_OUT`
  - `asset` CMAssetType — Asset symbol or ticker (e.g. BTC)
    - `assetType` string, required
    - `type` 'ANCHORAGECUSTODY' | 'EXTERNAL', required — The type of asset held in the Collateral Package. This can be either `ANCHORAGECUSTODY` for assets held in Anchorage custody, or `EXTERNAL` for assets held outside of Anchorage custody.
  - `notes` string — Optional notes or comments related to the operation. Providing a new value will overwrite existing notes.
  - `quantity` string — The quantity of the asset to be used in the operation, expressed as a decimal string.
  - `type` 'COLLATERAL_PACKAGE' | 'EXPOSURE' — The type of entity the operation is being performed on. This can be either a `COLLATERAL_PACKAGE` or an `EXPOSURE`.
  - `typeId` string — The ID of the collateral package (packageId) or exposure (exposureId) for this operation

## Response `200`

The updated operation.

- UpdateCMOperationResponse — In the context of Collateral Management, an operation is a recorded transaction or activity performed on either a Collateral Package or an Exposure. Operations represent specific actions that affect the balance or status of collateral or loan exposures.
  - `action` 'INITIAL_DEPOSIT' | 'INITIAL_FUNDING' | 'MARGIN_RETURN' | 'PAY_DOWN' | 'PAY_UP' | 'INTEREST_PAYDOWN' | 'INTEREST_ACCRUAL' | 'TOP_UP' | 'CLOSE_RETURN' | 'FULL_LIQUIDATION' | 'PARTIAL_LIQUIDATION' | 'SWEEP' | 'REHYPE_IN' | 'REHYPE_OUT' | 'GAS_FEE', required — The specific action to be performed in the operation. Valid actions for exposures are: 1. `INITIAL_FUNDING` 2. `PAY_DOWN` 3. `PAY_UP` 4. `INTEREST_PAYDOWN` 5. `INTEREST_ACCRUAL` Valid actions for collateral packages are: 1. `INITIAL_DEPOSIT` 2. `MARGIN_RETURN` 3. `TOP_UP` 4. `CLOSE_RETURN`. 5. `REHYPE_IN` 6. `REHYPE_OUT`
  - `asset` CMAssetType, required — Asset symbol or ticker (e.g. BTC)
    - `assetType` string, required
    - `type` 'ANCHORAGECUSTODY' | 'EXTERNAL', required — The type of asset held in the Collateral Package. This can be either `ANCHORAGECUSTODY` for assets held in Anchorage custody, or `EXTERNAL` for assets held outside of Anchorage custody.
  - `createdAt` string, date-time, required — The timestamp of when this record was created not necessarily when the operation was executed.
  - `id` string, required — Unique identifier for the operation (operationId)
  - `liquidationCollateralPackageId` string — The unique identifier of the collateral package that is being liquidated
  - `liquidationProceedAsset` CMAssetType — Asset symbol or ticker (e.g. BTC)
    - `assetType` string, required
    - `type` 'ANCHORAGECUSTODY' | 'EXTERNAL', required — The type of asset held in the Collateral Package. This can be either `ANCHORAGECUSTODY` for assets held in Anchorage custody, or `EXTERNAL` for assets held outside of Anchorage custody.
  - `liquidationProceedQuantity` string — The decimal quantity of the proceeds received from the liquidation
  - `notes` string — An optional field for additional comments or contextual information related to the operation.
  - `quantity` string, required — The decimal amount of the asset being added, removed, or modified in the operation, expressed as a string
  - `type` 'COLLATERAL_PACKAGE' | 'EXPOSURE' | 'LIQUIDATION', required — The type of entity the operation is being performed on. This can be either a `COLLATERAL_PACKAGE` or an `EXPOSURE`.
  - `typeId` string, required — Contains the unique identifier of either the collateral package (packageId) or exposure (exposureId) that the operation is being performed on, depending on the value in the type field
  - `updatedAt` string, date-time, required — The timestamp of when this record was last updated

## Other responses

- `401` — Unauthenticated
- `403` — Forbidden
- `404` — The specified operation was not found.
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.net/anchorage/apis/anchorage-digital-api-reference.md) · [All operations](https://skmtc.net/anchorage/apis/anchorage-digital-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/anchorage/anchorage-digital-api-reference/versions/166864b1ec6d/schema)
