---
title: "Create a transfer between the client's own accounts"
method: POST
path: "/swaps"
tags: ["transfers"]
---

# Create a transfer between the client's own accounts

`POST /swaps`

## Request

- The document declares no server URL.
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/hevn-inc/apis/hevn-api/docs/swaps/post.ts> (a function with typed inputs; its response is checked against the schema)

Price a move between two accounts the client owns, reserve it idempotently and return the approval to sign. `authorization` says what that approval covers: a `debit` of the client's wallet that funds the move, or an `intent` its smart wallet signs so the backend can settle it.

## Headers

- `X-Hevn-Account` string, nullable: The client account to act for, as a `cl_…` id. Omit it to act as yourself.
- `Idempotency-Key` string, nullable: Your own key for this write, `^[A-Za-z0-9._:-]{1,128}$`. A retry with the same key replays the first answer; the same key with a different request is refused.

## Request body

- SwapCreateRequest
  - `sourceAccount` 'USDC' | 'EURC' | 'RD' | 'USDC_ARB' | 'FDIC_USD' | 'FDIC_EUR' | 'KYC_CARDS', required
  - `destinationAccount` 'USDC' | 'EURC' | 'RD' | 'USDC_ARB' | 'FDIC_USD' | 'FDIC_EUR' | 'KYC_CARDS', required
  - `amount` string, nullable: Exact amount to debit from the source account.
  - `amountTo` string, nullable: Exact amount the destination account should receive.
  - `publicKey` string, required: Base64 DER SubjectPublicKeyInfo for the registered P-256 developer key.

## Response `201`

Successful Response

- SwapResponse
  - `id` string, required: Stable public identifier for this swap.
  - `status` 'awaitingSignature' | 'submitted' | 'settled' | 'failed', required
  - `idempotencyKey` string, required: Caller-supplied key that makes an identical retry return this result.
  - `sourceAccount` 'USDC' | 'EURC' | 'RD' | 'USDC_ARB' | 'FDIC_USD' | 'FDIC_EUR' | 'KYC_CARDS', required
  - `destinationAccount` 'USDC' | 'EURC' | 'RD' | 'USDC_ARB' | 'FDIC_USD' | 'FDIC_EUR' | 'KYC_CARDS', required
  - `quote` SwapQuoteView, required
    - `fromAmount` string, required: Amount debited from the source account.
    - `fromCurrency` string, required: Currency or digital asset debited.
    - `toAmount` string, required: Amount credited to the destination account.
    - `toCurrency` string, required: Currency or digital asset credited.
    - `rate` string, required: Conversion rate from the source amount to the destination amount.
    - `feeAmount` string, required: Total fee charged in feeCurrency.
    - `feeCurrency` string, required: Currency in which the fee is charged.
    - `minimumToAmount` string, nullable: Worst-case amount credited when the route carries slippage.
    - `estimated` boolean: Whether the delivered amount is an estimate settled later, rather than a locked price.
    - `etaHours` integer, nullable: Expected hours until the destination account is credited.
    - `expiresAt` string, date-time, nullable: UTC timestamp after which this price is no longer honored.
  - `authorization` 'debit' | 'intent' | 'client', required
  - `approval` ApprovalView, required
    - `id` string, required: Single-use approval identifier.
    - `payload` string, required: Base64 canonical authorization payload to sign with the developer key.
    - `expiresAt` string, date-time, required: UTC timestamp after which this approval is refused.
  - `debit` DebitView
    - `address` string, required: On-chain address receiving the funding debit.
    - `amount` string, required: Human-readable token amount debited.
    - `amountAtomic` string, required: Integer token amount in the asset's smallest unit.
    - `token` string, required: Digital asset debited to fund the transfer.
    - `chainId` integer, required: Numeric network identifier on which the debit executes.
  - `intent` IntentView
    - `digest` string, required: EIP-712 digest of the terms authorized by this approval.
    - `settles` string, required: How the backend settles once the intent is authorized.

## Other responses

- `422`: Request validation failed

## Changes

- **2026-11-12** `299a3aa6f521`: 3 warning, 4 info
  - added the new `FDIC_EUR` enum value to the `destinationAccount` response property for the response status `201`
  - added the new `FDIC_EUR` enum value to the `sourceAccount` response property for the response status `201`
  - added the new `verification_not_applicable` enum value to the `error/code` response property for the response status `422`
  - added the new `FDIC_EUR` enum value to the request property `destinationAccount`
  - …3 more
- **2026-10-23** `a02795de2d2b`: 16 warning, 11 info
  - deleted the `header` request parameter `x-api-key`
  - added the new `KYC_CARDS` enum value to the `destinationAccount` response property for the response status `201`
  - added the new `KYC_CARDS` enum value to the `sourceAccount` response property for the response status `201`
  - added the new `RD` enum value to the `destinationAccount` response property for the response status `201`
  - …23 more
- **2026-10-20** `19eb00e9f258`: 1 info
  - removed the `phone_in_use` enum value from the `error/code` response property for the response status `422`
- **2026-10-20** `bd6c9d69540e`: 1 warning
  - added the new `phone_in_use` enum value to the `error/code` response property for the response status `422`
- **2026-10-20** `19eb00e9f258`: 1 info
  - removed the `document_fields_missing` enum value from the `error/code` response property for the response status `422`

[Operation history](https://skmtc.dev/hevn-inc/apis/hevn-api/changes/swaps/post.md)

---

[API](https://skmtc.dev/hevn-inc/apis/hevn-api.md) - [All operations](https://skmtc.dev/hevn-inc/apis/hevn-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hevn-inc/apis/hevn-api/revisions/299a3aa6f521?raw)
