---
title: "Create a currency exchange between two accounts holding different currencies"
method: POST
path: "/v1/exchange"
tags: ["Exchange"]
---

# Create a currency exchange between two accounts holding different currencies

`POST /v1/exchange`

Create a currency exchange between two accounts holding different currencies

## Headers

- `Idempotency-Key` string, uuid, required

## Request body

- CreateExchangeRequest
  - `external_reference` string, required
  - `from` ExchangeAccountDetails, required
    - `account_id` string, uuid, required
    - `amount` integer, nullable
  - `to` ExchangeAccountDetails, required
    - `account_id` string, uuid, required
    - `amount` integer, nullable

## Response `201`

Customer payment has been created

- CreateExchangeResponse
  - `transaction_id` string, uuid, required

## Other responses

- `400` — Unable to complete request with data provided
- `404` — Account not found
- `409` — Idempotency-Key concurrency conflict
- `422` — Idempotency-Key reuse for a different request

---

[API](https://skmtc.net/lorum/apis/auth-api.md) · [All operations](https://skmtc.net/lorum/apis/auth-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lorum/auth-api/revisions/f9b8935027e3/schema)
