# Move money between two of your bank accounts

`POST /accounting/bank/transfer` · Rivier · accounting

Move money between two of your bank accounts.

- Scope: accounting:write
- Sdk: accounting.bank.transfer
- Cli: accounting bank transfer

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "fromBankAccountId": {
      "type": "string",
      "format": "uuid"
    },
    "toBankAccountId": {
      "type": "string",
      "format": "uuid"
    },
    "amountMinor": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 99999999999
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "ref": {
      "type": "string",
      "maxLength": 120,
      "default": ""
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "fromBankAccountId",
    "toBankAccountId",
    "amountMinor",
    "idempotencyKey"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/accounting/bank/transfer' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "fromBankAccountId": "string",
  "toBankAccountId": "string",
  "amountMinor": 0,
  "idempotencyKey": "string"
}'
```
