---
title: "Create a reconciliation context"
method: POST
path: "/v1/contexts"
tags: ["Configuration Contexts"]
---

# Create a reconciliation context

`POST /v1/contexts`

Use this endpoint to create a new reconciliation context. Contexts are used to scope matching rules and organize your reconciliation configuration.

## Headers

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

## Request body

- CreateContextRequest
  - `name` string, required
  - `type` '1:1' | '1:N' | 'N:M', required — Reconciliation topology (cardinality between sources)
  - `interval` string, required
  - `feeToleranceAbs` string — Absolute fee tolerance amount
  - `feeTolerancePct` string — Percentage fee tolerance
  - `feeNormalization` 'NET' | 'GROSS' — Fee normalization mode
  - `autoMatchOnUpload` boolean — Whether to trigger matching automatically after file upload
  - `sources` CreateContextSourceRequest[] — Optional list of sources to create inline with the context
    - `name` string, required — Source name
    - `type` 'LEDGER' | 'BANK' | 'GATEWAY' | 'CUSTOM' | 'FETCHER', required — Source type
    - `side` 'LEFT' | 'RIGHT', required — Which side of the reconciliation this source represents
    - `config` object — Source-specific configuration
    - `mapping` object — Optional field mapping for this source
  - `rules` object[] — Optional list of match rules to create inline with the context
    - `priority` integer, required — Rule priority (lower number = higher priority)
    - `type` 'EXACT' | 'TOLERANCE' | 'DATE_LAG', required — Matching strategy type
    - `config` object — Rule-specific configuration

## Response `201`

Successfully created 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.

- 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

## Other responses

- `400` — Invalid request payload
- `401` — The request lacks valid authentication credentials.
- `403` — You do not have permission to access this resource.
- `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)
