---
title: "Create a reconciliation source"
method: POST
path: "/v1/contexts/{contextId}/sources"
tags: ["Configuration Sources"]
---

# Create a reconciliation source

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

Use this endpoint to create a new reconciliation source under a specific context. Sources define where transaction data comes from for reconciliation.

## Path parameters

- `contextId` string, required

## Headers

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

## Request body

- CreateSourceRequest
  - `name` string, required
  - `type` 'LEDGER' | 'BANK' | 'GATEWAY' | 'CUSTOM' | 'FETCHER', required — Category of data source for reconciliation
  - `side` 'LEFT' | 'RIGHT', required — Side of the reconciliation this source feeds
  - `config` object

## Response `201`

Successfully created source.

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.

- ReconciliationSourceResponse
  - `id` string
  - `contextId` string
  - `name` string
  - `type` 'LEDGER' | 'BANK' | 'GATEWAY' | 'CUSTOM' | 'FETCHER' — Category of data source for reconciliation
  - `side` 'LEFT' | 'RIGHT' — Side of the reconciliation this source feeds
  - `config` object
  - `createdAt` string
  - `updatedAt` string

## Other responses

- `400` — Invalid request 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)
