Skip to content
Resource · Banking

Bank accounts

A bank account, connected through a consent or managed offline, holds its transactions and past balances.

bank-accounts:readbank-accounts:write
MethodPathSummary
GET…/bank-accountsList bank accounts in the workspace
PATCH…/bank-accounts/{bankAccountId}Update a bank account
POST…/bank-accounts/archiveArchive bank accounts so they no longer appear in active lists
POST…/bank-accounts/create-offlineCreate an offline bank account not connected to a banking provider
DELETE…/bank-accounts/{bankAccountId}/delete-offlineDelete an offline bank account
POST…/bank-accounts/create-account-counterpartyCreate a counterparty bank account record
GET…/bank-accounts/transactions/searchSearch bank transactions across the workspace
POST…/bank-accounts/transactions/approve-allApprove all matching bank transactions in bulk
POST…/bank-accounts/transactions/exportExport bank transactions to a downloadable file
POST…/bank-accounts/transactions/request-cash-codingRequest AI-suggested cash coding for bank transactions
GET…/bank-accounts/{bankAccountId}/transactionsList transactions on a bank account
POST…/bank-accounts/{bankAccountId}/transactions/{transactionId}/reviewReview a single bank transaction (approve, reject, or update)
GET…/bank-accounts/{bankAccountId}/balance-historyList historical balances for a bank account
POST…/bank-accounts/{bankAccountId}/attachments/uploadGet an upload URL for an attachment of the bank account
POST…/bank-accounts/{bankAccountId}/attachments/{attachmentId}/parse-transactionsParse the transactions of a PDF bank statement attached to the bank account in the background

Paths start with /workspaces/{workspaceId}. GET endpoints need bank-accounts:read, the others bank-accounts:write.

The BankAccount object

firestoreIdstringrequired

ID of the bank account.

namestringrequired
productsstring[]required
Show 11 values

identityaccountsbeneficiariesbalancestransactionsstatementsdirect_debitsdraft_paymentssingle_paymentsscheduled_paymentsstanding_order_payments

featuresstring[]required
Show 38 values

identity.detailsaccounts.listaccounts.detailsbeneficiaries.listbeneficiaries.detailsbalances.intradaybalances.closingtransactions.intradaytransactions.historystatements.liststatements.iso_camt053_xmlstatements.pdfdirect_debits.listdirect_debits.detailsdraft_payments.revolut_csvdraft_payments.iso_pain001_ch_xmldraft_payments.iso_pain001_xmldraft_payments.domesticdraft_payments.internationaldraft_payments.bulkdraft_payments.listdraft_payments.detailssingle_payments.domesticsingle_payments.internationalsingle_payments.instantsingle_payments.bulksingle_payments.listsingle_payments.detailsscheduled_payments.domesticscheduled_payments.internationalscheduled_payments.bulkscheduled_payments.listscheduled_payments.detailsstanding_order_payments.domesticstanding_order_payments.internationalstanding_order_payments.bulkstanding_order_payments.liststanding_order_payments.details

usagestring

Kind of entity: an individual or an organization.

  • individual

    A natural person.

  • organization

    A company or another organization.

workspaceIdstringrequired

ID of the workspace.

serviceProviderIdstringrequired

ID of the service provider.

Show all 22 fields
consentIdstring

ID of the read consent.

creationobjectrequired

When and by whom the resource was created.

Show 2 child fields
creationDateTimestringdate-timerequired

Date and time when the resource was created.

createdBystring

ID of the user who created the resource, when recorded.

activationobjectrequired

Whether the resource is enabled, and when and by whom it was last enabled or disabled.

Show 3 child fields
enabledbooleanrequired

Whether the resource is enabled.

updateDateTimestringdate-timerequired

Date and time when enabled was last set.

updatedBystring

ID of the user who last set enabled, when recorded.

archivedbooleanrequired
isOfflinebooleanrequired
enrichWithCamtboolean
tasksnumberrequired
lastRequestedDateForBalancesstringdate-time
lastRequestedDateForTransactionsstringdate-time
lastTaskRunDateForBalancesstringdate-time
lastTaskRunDateForTransactionsstringdate-time
lastAvailableDateForBalancesstring
lastAvailableDateForTransactionsstring
cashAccountsobject[]required
Show 4 child fields
accountIdentificationsobject[]required
Show 2 child fields
typestringrequired

Kind of identifier of a bank account or of its bank.

Show 14 values
  • bic

    Bank Identifier Code of the bank.

  • sortCode

    Six-digit code of a bank and branch in the United Kingdom.

  • iban

    International Bank Account Number.

  • bban

    Basic Bank Account Number, the country-specific format of an account number.

  • accountNumber

    Account number that the bank assigns, unique within the bank or the branch.

  • pan

    Primary Account Number, the number of a credit or debit card.

  • email

    Email address that identifies the account.

  • msisdn

    Mobile phone number that identifies the account.

  • virtualAccountId

    Identifier of a virtual sub-account of a main account.

  • globalWallet

    Identifier of a digital wallet that holds and pays in several currencies.

  • clabe

    CLABE, the 18-digit standardized bank code of a Mexican bank account.

  • bitcoinAddress

    Single Bitcoin address, the only address the account tracks.

  • bitcoinXpub

    Bitcoin extended public key (xpub, ypub or zpub), from which the addresses of the wallet are derived.

  • other

    Another kind of identifier.

identificationstringrequired
currencystring
namestring
ownerNamestring
relationshipsobjectrequired
Show 4 child fields
readConsentReadConsent
counterpartyCounterparty
latestBalanceobject
Show 2 child fields
datestringrequired
balanceobjectrequired
Show 4 child fields
dateTimestringdate-timerequired
currencystringrequired
amountnumberrequired
isClosingbooleanrequired
recentBalancesRecord<string, object>
Show 2 child fields
datestringrequired
balanceobjectrequired
Show 4 child fields
dateTimestringdate-timerequired
currencystringrequired
amountnumberrequired
isClosingbooleanrequired
The BankAccount object
{
  "firestoreId": "bacc_Q0gzMTA4NzY1NDM",
  "name": "string",
  "products": [
    "identity"
  ],
  "features": [
    "identity.details"
  ],
  "usage": "individual",
  "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
  "serviceProviderId": "sprov_SUlEUDAwMjMw",
  "consentId": "rcons_UkVBRC0wMDQy",
  "creation": {
    "creationDateTime": "2026-03-02T09:15:00.000Z",
    "createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
  },
  "activation": {
    "enabled": true,
    "updateDateTime": "2026-03-02T09:15:00.000Z",
    "updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
  },
  "archived": true,
  "isOffline": true,
  "enrichWithCamt": true,
  "tasks": 0,
  "lastRequestedDateForBalances": "2026-03-02T09:30:00.000Z",
  "lastRequestedDateForTransactions": "2026-03-02T09:30:00.000Z",
  "lastTaskRunDateForBalances": "2026-03-02T09:30:00.000Z",
  "lastTaskRunDateForTransactions": "2026-03-02T09:30:00.000Z",
  "lastAvailableDateForBalances": "2026-03-02",
  "lastAvailableDateForTransactions": "2026-03-02",
  "cashAccounts": [
    {
      "accountIdentifications": [
        {
          "type": "bic",
          "identification": "string"
        }
      ],
      "currency": "string",
      "name": "string",
      "ownerName": "string"
    }
  ],
  "relationships": {
    "readConsent": {
      "firestoreId": "rcons_UkVBRC0wMDQy",
      "expirationDateTime": "2026-03-02T09:30:00.000Z",
      "authorizationStatus": {
        "status": "pending",
        "updateDateTime": "2026-03-02T09:30:00.000Z"
      },
      "products": [
        "identity"
      ],
      "features": [
        "identity.details"
      ],
      "range": {
        "fromDateTime": "2026-03-02T09:30:00.000Z",
        "toDateTime": "2026-03-02T09:30:00.000Z"
      },
      "reference": "string",
      "serviceProviderId": "sprov_SUlEUDAwMjMw",
      "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
      "creation": {
        "creationDateTime": "2026-03-02T09:15:00.000Z",
        "createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
      },
      "solved": true
    },
    "counterparty": {
      "firestoreId": "Cp2nG7vB4xLq9wRt5hMz",
      "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
      "creation": {
        "creationDateTime": "2026-03-02T09:15:00.000Z",
        "createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
      },
      "activation": {
        "enabled": true,
        "updateDateTime": "2026-03-02T09:15:00.000Z",
        "updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
      },
      "entityType": "individual",
      "name": "string",
      "phones": [
        "string"
      ],
      "emails": [
        "string"
      ],
      "address": {
        "country": "CH",
        "postCode": "8001",
        "townName": "Zürich",
        "streetName": "Bahnhofstrasse",
        "buildingNumber": "10",
        "name": "Haus zur Linde",
        "sortingCode": "string",
        "postBox": "Postfach 1234",
        "administrativeArea": "Zürich",
        "recipients": [
          "Anna Meier"
        ],
        "organization": "Muster AG",
        "source": [
          "Muster AG",
          "Bahnhofstrasse 10",
          "8001 Zürich"
        ]
      },
      "contactPersons": [
        {
          "name": "string",
          "phone": "string",
          "email": "string"
        }
      ],
      "taxIdentification": "string",
      "notes": "string",
      "cashAccounts": [
        {
          "identifications": [
            {
              "type": "bic",
              "value": "string"
            }
          ],
          "currency": "CHF",
          "bankAddress": {
            "country": "CH",
            "postCode": "8001",
            "townName": "Zürich",
            "streetName": "Bahnhofstrasse",
            "buildingNumber": "10",
            "name": "Haus zur Linde",
            "sortingCode": "string",
            "postBox": "Postfach 1234",
            "administrativeArea": "Zürich",
            "recipients": [
              "Anna Meier"
            ],
            "organization": "Muster AG",
            "source": [
              "Muster AG",
              "Bahnhofstrasse 10",
              "8001 Zürich"
            ]
          },
          "internalId": "string",
          "nickname": "string",
          "verification": {
            "id": "3f2c8a1e-6b4d-4e7a-9c15-8d2b7f0e4a61",
            "status": "verified",
            "holderName": "string",
            "dateTime": "2026-03-02T09:30:00.000Z"
          }
        }
      ],
      "cashAccountIdentifications": [
        "string"
      ],
      "approvedCashAccountIds": [
        "string"
      ],
      "bankAccountId": "string"
    },
    "latestBalance": {
      "date": "2026-03-02",
      "balance": {
        "dateTime": "2026-03-02T09:30:00.000Z",
        "currency": "string",
        "amount": 0,
        "isClosing": true
      }
    },
    "recentBalances": {
      "key": {
        "date": "2026-03-02",
        "balance": {
          "dateTime": "2026-03-02T09:30:00.000Z",
          "currency": "string",
          "amount": 0,
          "isClosing": true
        }
      }
    }
  }
}
GET/workspaces/{workspaceId}/bank-accounts

List bank accounts in the workspace

Scopebank-accounts:read

Path parameters

workspaceIdstringrequired

ID of the workspace.

Query parameters

limitinteger

Maximum number of items to return, from 1 to 100. A missing, invalid or non-positive value falls back to 20, and a larger value to 100.

Default20

startAfterstring

Cursor of the page to return: the nextCursor of the previous page.

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

idsstring[]

Comma-separated IDs of the items to return, up to 30. When set, limit, startAfter and the filters are ignored.

Returns

200

List of items

dataBankAccount[]required

Items of the page, in list order.

limitintegerrequired

Page size of the request, or the number of requested ids.

nextCursorstring

Cursor of the next page, to pass as startAfter. Absent when the page holds fewer items than limit; a full last page still has one, and the page it points to is empty.

curl 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "data": [
    {
      "firestoreId": "bacc_Q0gzMTA4NzY1NDM",
      "name": "string",
      "products": [
        "identity"
      ],
      "features": [
        "identity.details"
      ],
      "usage": "individual",
      "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
      "serviceProviderId": "sprov_SUlEUDAwMjMw",
      "consentId": "rcons_UkVBRC0wMDQy",
      "creation": {
        "creationDateTime": "2026-03-02T09:15:00.000Z",
        "createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
      },
      "activation": {
        "enabled": true,
        "updateDateTime": "2026-03-02T09:15:00.000Z",
        "updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
      },
      "archived": true,
      "isOffline": true,
      "enrichWithCamt": true,
      "tasks": 0,
      "lastRequestedDateForBalances": "2026-03-02T09:30:00.000Z",
      "lastRequestedDateForTransactions": "2026-03-02T09:30:00.000Z",
      "lastTaskRunDateForBalances": "2026-03-02T09:30:00.000Z",
      "lastTaskRunDateForTransactions": "2026-03-02T09:30:00.000Z",
      "lastAvailableDateForBalances": "2026-03-02",
      "lastAvailableDateForTransactions": "2026-03-02",
      "cashAccounts": […],
      "relationships": {…}
    }
  ],
  "limit": 0,
  "nextCursor": "string"
}
PATCH/workspaces/{workspaceId}/bank-accounts/{bankAccountId}

Update a bank account

Scopebank-accounts:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

bankAccountIdstringrequired

ID of the bank account.

Query parameters

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request body

namestring
bicstring
ownerNamestring
accountTypeCodestring
Show 23 values

CACCCARDCASHCHARCISHCOMMCPACLLSVLOANMGLDMOMANFCANREXODFTONDPOTHRSACCSLRYSVGSTAXETRANTRASVACC

enabledboolean
enrichWithCamtboolean

Returns

200

Successful response

dataBankAccountrequired
curl -X PATCH 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM' \
  -H "Authorization: Bearer $SWAY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "accountTypeCode": "CACC"
}'
{
  "data": {
    "firestoreId": "bacc_Q0gzMTA4NzY1NDM",
    "name": "string",
    "products": [
      "identity"
    ],
    "features": [
      "identity.details"
    ],
    "usage": "individual",
    "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
    "serviceProviderId": "sprov_SUlEUDAwMjMw",
    "consentId": "rcons_UkVBRC0wMDQy",
    "creation": {
      "creationDateTime": "2026-03-02T09:15:00.000Z",
      "createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
    },
    "activation": {
      "enabled": true,
      "updateDateTime": "2026-03-02T09:15:00.000Z",
      "updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
    },
    "archived": true,
    "isOffline": true,
    "enrichWithCamt": true,
    "tasks": 0,
    "lastRequestedDateForBalances": "2026-03-02T09:30:00.000Z",
    "lastRequestedDateForTransactions": "2026-03-02T09:30:00.000Z",
    "lastTaskRunDateForBalances": "2026-03-02T09:30:00.000Z",
    "lastTaskRunDateForTransactions": "2026-03-02T09:30:00.000Z",
    "lastAvailableDateForBalances": "2026-03-02",
    "lastAvailableDateForTransactions": "2026-03-02",
    "cashAccounts": […],
    "relationships": {…}
  }
}
POST/workspaces/{workspaceId}/bank-accounts/archive

Archive bank accounts so they no longer appear in active lists

Scopebank-accounts:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

Returns

204

No content

curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/archive' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
POST/workspaces/{workspaceId}/bank-accounts/create-offline

Create an offline bank account not connected to a banking provider

Scopebank-accounts:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

Query parameters

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request body

serviceProviderIdstringrequired

ID of the service provider.

accountTypeCodestringrequired
Show 23 values

CACCCARDCASHCHARCISHCOMMCPACLLSVLOANMGLDMOMANFCANREXODFTONDPOTHRSACCSLRYSVGSTAXETRANTRASVACC

countrystringrequired

ISO 3166-1 alpha-2 country code

currencystringrequired

ISO 4217 currency code

identificationstringrequired
identificationTypestringrequired
Show 12 values

ibanbbanaccountNumberpanemailmsisdnvirtualAccountIdglobalWalletclabebitcoinAddressbitcoinXpubother

namestring
ownerNamestring

Returns

200

Successful response

dataBankAccountrequired
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/create-offline' \
  -H "Authorization: Bearer $SWAY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "serviceProviderId": "sprov_SUlEUDAwMjMw",
  "accountTypeCode": "CACC",
  "country": "CH",
  "currency": "CHF",
  "identification": "string",
  "identificationType": "iban",
  "name": "string",
  "ownerName": "string"
}'
{
  "data": {
    "firestoreId": "bacc_Q0gzMTA4NzY1NDM",
    "name": "string",
    "products": [
      "identity"
    ],
    "features": [
      "identity.details"
    ],
    "usage": "individual",
    "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
    "serviceProviderId": "sprov_SUlEUDAwMjMw",
    "consentId": "rcons_UkVBRC0wMDQy",
    "creation": {
      "creationDateTime": "2026-03-02T09:15:00.000Z",
      "createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
    },
    "activation": {
      "enabled": true,
      "updateDateTime": "2026-03-02T09:15:00.000Z",
      "updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
    },
    "archived": true,
    "isOffline": true,
    "enrichWithCamt": true,
    "tasks": 0,
    "lastRequestedDateForBalances": "2026-03-02T09:30:00.000Z",
    "lastRequestedDateForTransactions": "2026-03-02T09:30:00.000Z",
    "lastTaskRunDateForBalances": "2026-03-02T09:30:00.000Z",
    "lastTaskRunDateForTransactions": "2026-03-02T09:30:00.000Z",
    "lastAvailableDateForBalances": "2026-03-02",
    "lastAvailableDateForTransactions": "2026-03-02",
    "cashAccounts": […],
    "relationships": {…}
  }
}
DELETE/workspaces/{workspaceId}/bank-accounts/{bankAccountId}/delete-offline

Delete an offline bank account

Scopebank-accounts:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

bankAccountIdstringrequired

ID of the bank account.

Returns

204

No content

curl -X DELETE 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/delete-offline' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
POST/workspaces/{workspaceId}/bank-accounts/create-account-counterparty

Create a counterparty bank account record

Scopebank-accounts:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

Query parameters

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request body

bankAccountIdstringrequired

ID of the bank account.

typestringrequired

Kind of entity: an individual or an organization.

  • individual

    A natural person.

  • organization

    A company or another organization.

namestringrequired
addressPostalAddressrequired

Postal address, with the parts of an ISO 20022 postal address.

Show 12 child fields
countrystringrequired

ISO 3166-1 alpha-2 country code

postCodestringrequired

Post code of the address.

townNamestringrequired

Name of the town or city.

streetNamestring

Name of the street.

buildingNumberstring

Number of the building in the street.

namestring

Name of the building or place.

sortingCodestring

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring

Post office box.

administrativeAreastring

Region of the country, such as a canton or a state.

recipientsstring[]

Names of the people the address is for.

organizationstring

Name of the organization at the address.

sourcestring[]

Text the address was read from, one item per line.

Returns

200

Successful response

dataCounterpartyrequired
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/create-account-counterparty' \
  -H "Authorization: Bearer $SWAY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
  "type": "individual",
  "name": "string",
  "address": {
    "country": "CH",
    "postCode": "8001",
    "townName": "Zürich",
    "streetName": "Bahnhofstrasse",
    "buildingNumber": "10",
    "name": "Haus zur Linde",
    "sortingCode": "string",
    "postBox": "Postfach 1234",
    "administrativeArea": "Zürich",
    "recipients": [
      "Anna Meier"
    ],
    "organization": "Muster AG",
    "source": [
      "Muster AG",
      "Bahnhofstrasse 10",
      "8001 Zürich"
    ]
  }
}'
{
  "data": {
    "firestoreId": "Cp2nG7vB4xLq9wRt5hMz",
    "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
    "creation": {
      "creationDateTime": "2026-03-02T09:15:00.000Z",
      "createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
    },
    "activation": {
      "enabled": true,
      "updateDateTime": "2026-03-02T09:15:00.000Z",
      "updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
    },
    "entityType": "individual",
    "name": "string",
    "phones": [
      "string"
    ],
    "emails": [
      "string"
    ],
    "address": {…},
    "contactPersons": […],
    "taxIdentification": "string",
    "notes": "string",
    "cashAccounts": […],
    "cashAccountIdentifications": [
      "string"
    ],
    "approvedCashAccountIds": [
      "string"
    ],
    "bankAccountId": "string"
  }
}
POST/workspaces/{workspaceId}/bank-accounts/transactions/approve-all

Approve all matching bank transactions in bulk

Scopebank-accounts:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

Returns

204

No content

curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/approve-all' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
POST/workspaces/{workspaceId}/bank-accounts/transactions/export

Export bank transactions to a downloadable file

Scopebank-accounts:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

Query parameters

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request body

bankAccountIdstringrequired

ID of the bank account.

fromDatestringrequired
toDatestringrequired
exportTypestringrequired

Format of the bank transaction export.

Show 13 values
  • xero

    Deprecated alias of csv_xero.

  • csv_xero

    CSV file to import into Xero.

  • quickbooks

    Deprecated alias of csv_quickbooks.

  • csv_quickbooks

    CSV file to import into QuickBooks.

  • csv_winbiz

    CSV file of accounting entries to import into Winbiz.

  • tsv_cresus

    Tab-separated file of accounting entries to import into Crésus.

  • csv_wineur

    Deprecated alias of tsv_wineur.

  • tsv_wineur

    Tab-separated file of accounting entries to import into WinEUR.

  • xml_camt053

    ISO 20022 camt.053 XML bank statement, one file per day.

  • csv_statement

    CSV bank statement.

  • html_statement

    HTML bank statement.

  • pdf_statement

    PDF bank statement.

  • dsv_custom

    Delimited text file with the columns in fields, separated by separator.

fieldsobject[]
Show 4 child fields
typestringrequired
Show 37 values

account_identificationtransaction_idstatustransaction_codebalancebooking_datebooking_date_timevalue_datevalue_date_timetransaction_amount_signedtransaction_amount_valuetransaction_amount_debittransaction_amount_credittransaction_amount_currencytransaction_amount_textinstructed_amount_valueinstructed_amount_currencyinstructed_amount_textfees_amount_valuefees_amount_currencyfees_amount_textexchange_rate_valueexchange_rate_textcounterparty_namecounterparty_addresscounterparty_account_identificationcommunicationreferenceadditional_informationfull_descriptionsmart_descriptioncustom_stringcustom_numbercustom_booleancustom_datecustom_iso_datecustom_empty

namestring
defaultValuestring
formatstring
configRecord<string, string | number>
separatorstring
generateHeadersboolean
transliterateboolean
messagingTokenstring
isWorkspaceFileboolean

Returns

200

Successful response

dataBankTransactionExportrequired
Show 4 child fields
startedbooleanrequired
workspaceIdstringrequired
bankAccountIdstringrequired
filesobject[]required
Show 4 child fields
exportIdstringrequired
targetFileNamestringrequired
downloadUrlstringurirequired

Time-limited URL to download the file. The file may not be ready the moment the export call returns: poll this URL and retry while it responds with 404 until the download succeeds.

expiresAtstringrequired

Instant after which downloadUrl stops working.

curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/export' \
  -H "Authorization: Bearer $SWAY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
  "fromDate": "2026-03-02",
  "toDate": "2026-03-02",
  "exportType": "xero",
  "fields": [
    {
      "type": "account_identification"
    }
  ]
}'
{
  "data": {
    "started": true,
    "workspaceId": "string",
    "bankAccountId": "string",
    "files": [
      {
        "exportId": "string",
        "targetFileName": "string",
        "downloadUrl": "https://example.com",
        "expiresAt": "2026-03-02T09:30:00.000Z"
      }
    ]
  }
}
POST/workspaces/{workspaceId}/bank-accounts/transactions/request-cash-coding

Request AI-suggested cash coding for bank transactions

Takes at most 10 distinct bankTransactionIds. A request with more, or with the same id twice, returns a 400.

Scopebank-accounts:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

Request body

bankAccountIdstringrequired

ID of the bank account.

bankTransactionIdsstring[]required

ID of the bank transaction.

Returns

204

No content

curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/request-cash-coding' \
  -H "Authorization: Bearer $SWAY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
  "bankTransactionIds": [
    "trx_MjAyNjAzMDJUMDk"
  ]
}'
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
GET/workspaces/{workspaceId}/bank-accounts/{bankAccountId}/transactions

List transactions on a bank account

Scopebank-accounts:read

Path parameters

workspaceIdstringrequired

ID of the workspace.

bankAccountIdstringrequired

ID of the bank account.

Query parameters

limitinteger

Maximum number of items to return, from 1 to 100. A missing, invalid or non-positive value falls back to 20, and a larger value to 100.

Default20

startAfterstring

Cursor of the page to return: the nextCursor of the previous page.

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

idsstring[]

Comma-separated IDs of the items to return, up to 30. When set, limit, startAfter and the filters are ignored.

approvalStatusstring

Review status of the bank transaction.

  • pending

    The transaction waits for a review. A new transaction starts in this status, except the older transactions of a newly connected bank account.

  • approved

    A user approved the transaction, or Sway approved it as an older transaction when the bank account was connected.

  • rejected

    A user rejected the transaction.

Returns

200

List of items

dataBankTransaction[]required

Items of the page, in list order.

Show 19 child fields
firestoreIdstringrequired

ID of the bank transaction.

dateTimestringdate-timerequired
executionStatusstringrequired

Execution status of the transaction at the bank.

  • booked

    The bank booked the transaction on the account.

  • pending

    The bank has not booked the transaction yet; the transaction is removed when the bank stops reporting it.

  • rejected

    The bank did not execute the transaction.

workspaceIdstringrequired

ID of the workspace.

bankAccountIdstringrequired

ID of the bank account.

serviceProviderIdstringrequired

ID of the service provider.

reconciledbooleanrequired
milliAmountnumberrequired
instructedMilliAmountnumber
accountingStatusstring

Valuespendingpartially_bookedbooked

accountingSuggestionobject
Show 4 child fields
scorestring

Valueshighmediumlow

historicalMatchingBankTransactionobject
Show 2 child fields
firestoreIdstringrequired

ID of the bank transaction.

bankAccountIdstringrequired

ID of the bank account.

rationalestring
entriesobject[]required
Show 5 child fields
accountCodestring
creditAccountstring
debitAccountstring
descriptionstring
milliAmountnumber
accountingSuggestionStatusstring

Valuespendingprocessed

transactionobjectrequired
Show 15 child fields
bookingDatestring
bookingDateTimestring
valueDatestring
valueDateTimestring
currencystring
instructedMilliAmountnumber
instructedCurrencystring
feesAmountnumber
feesCurrencystring
exchangeRatenumber
exchangeRateTextstring
counterpartyNamestring
referencestring
communicationstring
additionalInformationstring
cashBalanceobject
Show 4 child fields
dateTimestringdate-timerequired
currencystringrequired
amountnumberrequired
isClosingbooleanrequired
addressPostalAddress

Postal address, with the parts of an ISO 20022 postal address.

Show 12 child fields
countrystringrequired

ISO 3166-1 alpha-2 country code

postCodestringrequired

Post code of the address.

townNamestringrequired

Name of the town or city.

streetNamestring

Name of the street.

buildingNumberstring

Number of the building in the street.

namestring

Name of the building or place.

sortingCodestring

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring

Post office box.

administrativeAreastring

Region of the country, such as a canton or a state.

recipientsstring[]

Names of the people the address is for.

organizationstring

Name of the organization at the address.

sourcestring[]

Text the address was read from, one item per line.

invoiceCandidateMatchIdsstring[]
invoiceConfirmedMatchIdsstring[]
invoiceCandidateMatchesInvoiceMatch[]
Show 2 child fields
targetstringrequired
dataobjectrequired
Show 1 child field
confidencenumberrequired
invoiceConfirmedMatchesInvoiceMatch[]
Show 2 child fields
targetstringrequired
dataobjectrequired
Show 1 child field
confidencenumberrequired
limitintegerrequired

Page size of the request, or the number of requested ids.

nextCursorstring

Cursor of the next page, to pass as startAfter. Absent when the page holds fewer items than limit; a full last page still has one, and the page it points to is empty.

curl 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/transactions' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "data": [
    {
      "firestoreId": "trx_MjAyNjAzMDJUMDk",
      "dateTime": "2026-03-02T09:30:00.000Z",
      "executionStatus": "booked",
      "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
      "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
      "serviceProviderId": "sprov_SUlEUDAwMjMw",
      "reconciled": true,
      "milliAmount": 0,
      "instructedMilliAmount": 0,
      "accountingStatus": "pending",
      "accountingSuggestion": {
        "score": "high",
        "historicalMatchingBankTransaction": {
          "firestoreId": "trx_MjAyNjAzMDJUMDk",
          "bankAccountId": "bacc_Q0gzMTA4NzY1NDM"
        },
        "rationale": "string",
        "entries": [
          {
            "accountCode": "string",
            "creditAccount": "string",
            "debitAccount": "string",
            "description": "string",
            "milliAmount": 0
          }
        ]
      },
      "accountingSuggestionStatus": "pending",
      "transaction": {
        "bookingDate": "string",
        "bookingDateTime": "string",
        "valueDate": "string",
        "valueDateTime": "string",
        "currency": "string",
        "instructedMilliAmount": 0,
        "instructedCurrency": "string",
        "feesAmount": 0,
        "feesCurrency": "string",
        "exchangeRate": 0,
        "exchangeRateText": "string",
        "counterpartyName": "string",
        "reference": "string",
        "communication": "string",
        "additionalInformation": "string"
      },
      "cashBalance": {
        "dateTime": "2026-03-02T09:30:00.000Z",
        "currency": "string",
        "amount": 0,
        "isClosing": true
      },
      "address": {
        "country": "CH",
        "postCode": "8001",
        "townName": "Zürich",
        "streetName": "Bahnhofstrasse",
        "buildingNumber": "10",
        "name": "Haus zur Linde",
        "sortingCode": "string",
        "postBox": "Postfach 1234",
        "administrativeArea": "Zürich",
        "recipients": [
          "Anna Meier"
        ],
        "organization": "Muster AG",
        "source": [
          "Muster AG",
          "Bahnhofstrasse 10",
          "8001 Zürich"
        ]
      },
      "invoiceCandidateMatchIds": [
        "string"
      ],
      "invoiceConfirmedMatchIds": [
        "string"
      ],
      "invoiceCandidateMatches": [
        {
          "target": "string",
          "data": {
            "confidence": 0
          }
        }
      ],
      "invoiceConfirmedMatches": [
        {
          "target": "string",
          "data": {
            "confidence": 0
          }
        }
      ]
    }
  ],
  "limit": 0,
  "nextCursor": "string"
}
POST/workspaces/{workspaceId}/bank-accounts/{bankAccountId}/transactions/{transactionId}/review

Review a single bank transaction (approve, reject, or update)

Scopebank-accounts:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

bankAccountIdstringrequired

ID of the bank account.

transactionIdstringrequired

ID of the bank transaction.

Query parameters

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request body

statusstringrequired

Review status of the bank transaction.

  • pending

    The transaction waits for a review. A new transaction starts in this status, except the older transactions of a newly connected bank account.

  • approved

    A user approved the transaction, or Sway approved it as an older transaction when the bank account was connected.

  • rejected

    A user rejected the transaction.

Returns

200

Successful response

dataBankTransactionrequired
Show 19 child fields
firestoreIdstringrequired

ID of the bank transaction.

dateTimestringdate-timerequired
executionStatusstringrequired

Execution status of the transaction at the bank.

  • booked

    The bank booked the transaction on the account.

  • pending

    The bank has not booked the transaction yet; the transaction is removed when the bank stops reporting it.

  • rejected

    The bank did not execute the transaction.

workspaceIdstringrequired

ID of the workspace.

bankAccountIdstringrequired

ID of the bank account.

serviceProviderIdstringrequired

ID of the service provider.

reconciledbooleanrequired
milliAmountnumberrequired
instructedMilliAmountnumber
accountingStatusstring

Valuespendingpartially_bookedbooked

accountingSuggestionobject
Show 4 child fields
scorestring

Valueshighmediumlow

historicalMatchingBankTransactionobject
Show 2 child fields
firestoreIdstringrequired

ID of the bank transaction.

bankAccountIdstringrequired

ID of the bank account.

rationalestring
entriesobject[]required
Show 5 child fields
accountCodestring
creditAccountstring
debitAccountstring
descriptionstring
milliAmountnumber
accountingSuggestionStatusstring

Valuespendingprocessed

transactionobjectrequired
Show 15 child fields
bookingDatestring
bookingDateTimestring
valueDatestring
valueDateTimestring
currencystring
instructedMilliAmountnumber
instructedCurrencystring
feesAmountnumber
feesCurrencystring
exchangeRatenumber
exchangeRateTextstring
counterpartyNamestring
referencestring
communicationstring
additionalInformationstring
cashBalanceobject
Show 4 child fields
dateTimestringdate-timerequired
currencystringrequired
amountnumberrequired
isClosingbooleanrequired
addressPostalAddress

Postal address, with the parts of an ISO 20022 postal address.

Show 12 child fields
countrystringrequired

ISO 3166-1 alpha-2 country code

postCodestringrequired

Post code of the address.

townNamestringrequired

Name of the town or city.

streetNamestring

Name of the street.

buildingNumberstring

Number of the building in the street.

namestring

Name of the building or place.

sortingCodestring

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring

Post office box.

administrativeAreastring

Region of the country, such as a canton or a state.

recipientsstring[]

Names of the people the address is for.

organizationstring

Name of the organization at the address.

sourcestring[]

Text the address was read from, one item per line.

invoiceCandidateMatchIdsstring[]
invoiceConfirmedMatchIdsstring[]
invoiceCandidateMatchesInvoiceMatch[]
Show 2 child fields
targetstringrequired
dataobjectrequired
Show 1 child field
confidencenumberrequired
invoiceConfirmedMatchesInvoiceMatch[]
Show 2 child fields
targetstringrequired
dataobjectrequired
Show 1 child field
confidencenumberrequired
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/transactions/trx_MjAyNjAzMDJUMDk/review' \
  -H "Authorization: Bearer $SWAY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "status": "pending"
}'
{
  "data": {
    "firestoreId": "trx_MjAyNjAzMDJUMDk",
    "dateTime": "2026-03-02T09:30:00.000Z",
    "executionStatus": "booked",
    "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
    "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
    "serviceProviderId": "sprov_SUlEUDAwMjMw",
    "reconciled": true,
    "milliAmount": 0,
    "instructedMilliAmount": 0,
    "accountingStatus": "pending",
    "accountingSuggestion": {
      "score": "high",
      "historicalMatchingBankTransaction": {
        "firestoreId": "trx_MjAyNjAzMDJUMDk",
        "bankAccountId": "bacc_Q0gzMTA4NzY1NDM"
      },
      "rationale": "string",
      "entries": [
        {
          "accountCode": "string",
          "creditAccount": "string",
          "debitAccount": "string",
          "description": "string",
          "milliAmount": 0
        }
      ]
    },
    "accountingSuggestionStatus": "pending",
    "transaction": {
      "bookingDate": "string",
      "bookingDateTime": "string",
      "valueDate": "string",
      "valueDateTime": "string",
      "currency": "string",
      "instructedMilliAmount": 0,
      "instructedCurrency": "string",
      "feesAmount": 0,
      "feesCurrency": "string",
      "exchangeRate": 0,
      "exchangeRateText": "string",
      "counterpartyName": "string",
      "reference": "string",
      "communication": "string",
      "additionalInformation": "string"
    },
    "cashBalance": {
      "dateTime": "2026-03-02T09:30:00.000Z",
      "currency": "string",
      "amount": 0,
      "isClosing": true
    },
    "address": {
      "country": "CH",
      "postCode": "8001",
      "townName": "Zürich",
      "streetName": "Bahnhofstrasse",
      "buildingNumber": "10",
      "name": "Haus zur Linde",
      "sortingCode": "string",
      "postBox": "Postfach 1234",
      "administrativeArea": "Zürich",
      "recipients": [
        "Anna Meier"
      ],
      "organization": "Muster AG",
      "source": [
        "Muster AG",
        "Bahnhofstrasse 10",
        "8001 Zürich"
      ]
    },
    "invoiceCandidateMatchIds": [
      "string"
    ],
    "invoiceConfirmedMatchIds": [
      "string"
    ],
    "invoiceCandidateMatches": [
      {
        "target": "string",
        "data": {
          "confidence": 0
        }
      }
    ],
    "invoiceConfirmedMatches": [
      {
        "target": "string",
        "data": {
          "confidence": 0
        }
      }
    ]
  }
}
GET/workspaces/{workspaceId}/bank-accounts/{bankAccountId}/balance-history

List historical balances for a bank account

Scopebank-accounts:read

Path parameters

workspaceIdstringrequired

ID of the workspace.

bankAccountIdstringrequired

ID of the bank account.

Query parameters

limitinteger

Maximum number of items to return, from 1 to 100. A missing, invalid or non-positive value falls back to 20, and a larger value to 100.

Default20

startAfterstring

Cursor of the page to return: the nextCursor of the previous page.

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

idsstring[]

Comma-separated IDs of the items to return, up to 30. When set, limit, startAfter and the filters are ignored.

Returns

200

List of items

dataBalanceHistory[]required

Items of the page, in list order.

Show 5 child fields
firestoreIdstringrequired

ID of the balance history.

bankAccountIdstringrequired

ID of the bank account.

workspaceIdstringrequired

ID of the workspace.

yearnumberrequired
balancesRecord<string, object>required
Show 4 child fields
dateTimestringdate-timerequired
currencystringrequired
amountnumberrequired
isClosingbooleanrequired
limitintegerrequired

Page size of the request, or the number of requested ids.

nextCursorstring

Cursor of the next page, to pass as startAfter. Absent when the page holds fewer items than limit; a full last page still has one, and the page it points to is empty.

curl 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/balance-history' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "data": [
    {
      "firestoreId": "2026",
      "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
      "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
      "year": 0,
      "balances": {
        "key": {
          "dateTime": "2026-03-02T09:30:00.000Z",
          "currency": "string",
          "amount": 0,
          "isClosing": true
        }
      }
    }
  ],
  "limit": 0,
  "nextCursor": "string"
}
POST/workspaces/{workspaceId}/bank-accounts/{bankAccountId}/attachments/upload

Get an upload URL for an attachment of the bank account

The attachment is a PDF, CSV, XML or image file. The characters <>:"/\|?*#^ are removed from fileName, and a name left empty is rejected. PUT the file bytes to uploadUrl with the returned contentType. The file is kept as an attachment of the bank account, visible in the web app, under the returned attachmentId.

Scopebank-accounts:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

bankAccountIdstringrequired

ID of the bank account.

Query parameters

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request body

fileNamestringrequired
contentTypestringrequired
sizeintegerrequired

Returns

200

Successful response

dataAttachmentUploadUrlrequired
Show 4 child fields
uploadUrlstringurirequired
contentTypestringrequired
sizeintegerrequired
attachmentIdstringrequired
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/attachments/upload' \
  -H "Authorization: Bearer $SWAY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "fileName": "string",
  "contentType": "string",
  "size": 0
}'
{
  "data": {
    "uploadUrl": "https://example.com",
    "contentType": "string",
    "size": 0,
    "attachmentId": "string"
  }
}
POST/workspaces/{workspaceId}/bank-accounts/{bankAccountId}/attachments/{attachmentId}/parse-transactions

Parse the transactions of a PDF bank statement attached to the bank account in the background

Takes the attachmentId returned by upload. Returns a 404 until the PUT to uploadUrl completes and the attachment is registered, and for a file that is not an attachment of this bank account. Returns a 400 for an attachment that is not a PDF. When parsing completes, the caller receives an email linking to the statement preview in the web app, where they review and confirm the import. Calling it again within 6 hours of the previous parsing start starts no new parsing and sends no new email. A later call, or a call after the import was confirmed, parses the statement again and sends another email.

Scopebank-accounts:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

bankAccountIdstringrequired

ID of the bank account.

attachmentIdstringrequired

ID of the attachment, returned with its upload URL.

Returns

204

No content

curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/attachments/At5kV8pW2nQx7rLs3mYd/parse-transactions' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}

Start building on your own data.

Create an account, open Profile › Developer and create a key scoped to the resources you need. Questions about an integration? The team answers them on a call.