---
title: "Clone a reconciliation context"
method: POST
path: "/v1/contexts/{contextId}/clone"
tags: ["Configuration Contexts"]
---

# Clone a reconciliation context

`POST /v1/contexts/{contextId}/clone`

Use this endpoint to clone an existing reconciliation context with its associated sources, rules, and fee schedules. You can selectively include or exclude specific components.

## Path parameters

- `contextId` string, required

## Headers

- `X-Request-Id` string
- `X-Idempotency-Key` string

## Request body

- CloneContextRequest — Request payload for cloning a reconciliation context
  - `name` string, required — Name for the cloned context
  - `includeSources` boolean — Whether to clone associated sources
  - `includeRules` boolean — Whether to clone associated match rules

## Response `201`

Successfully cloned context.

The response includes the `X-Idempotency-Replayed` header.

If the value is false, the request was just processed. If the value is true, the response is a replay of a previously processed request.

See [Retries and idempotency](/en/reference/retries-idempotency) for more details.

- CloneContextResponse — Response after cloning a reconciliation context
  - `context` ReconciliationContextResponse — Configuration context for matching rules
    - `id` string — Unique identifier for the context
    - `tenantId` string — Tenant ID this context belongs to
    - `name` string — Name of the reconciliation context
    - `type` '1:1' | '1:N' | 'N:M' — Reconciliation topology type
    - `interval` string — Execution interval
    - `status` 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED' — Current status of the context
    - `feeToleranceAbs` string — Absolute fee tolerance amount
    - `feeTolerancePct` string — Percentage fee tolerance
    - `feeNormalization` 'NET' | 'GROSS' — Fee normalization mode
    - `autoMatchOnUpload` boolean — Whether matching triggers automatically after file upload
    - `createdAt` string — Creation timestamp in RFC3339 format
    - `updatedAt` string — Last update timestamp in RFC3339 format
  - `sourcesCloned` integer — Number of sources cloned
  - `rulesCloned` integer — Number of match rules cloned
  - `fieldMapsCloned` integer — Number of field maps cloned
  - `feeRulesCloned` integer — Number of fee rules cloned

## Other responses

- `400` — The request contains invalid parameters or payload.
- `401` — The request lacks valid authentication credentials.
- `403` — You do not have permission to access this resource.
- `404` — Context not found
- `409` — Idempotency conflict: request with same key in progress
- `500` — An unexpected error occurred on the server.

---

[API](https://skmtc.net/lerian/apis/identity-plugin.md) · [All operations](https://skmtc.net/lerian/apis/identity-plugin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lerian/identity-plugin/versions/25daba385532/schema)
