Aller au contenu
Ressource · Banking

Bank accounts

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

bank-accounts:readbank-accounts:write
MéthodeCheminRésumé
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

Les chemins commencent par /workspaces/{workspaceId}. Les endpoints GET demandent bank-accounts:read, les autres bank-accounts:write.

L’objet BankAccount

firestoreIdstringobligatoire

ID of the bank account.

namestringobligatoire
productsstring[]obligatoire
Afficher les 11 valeurs

identityaccountsbeneficiariesbalancestransactionsstatementsdirect_debitsdraft_paymentssingle_paymentsscheduled_paymentsstanding_order_payments

featuresstring[]obligatoire
Afficher les 38 valeurs

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.

workspaceIdstringobligatoire

ID of the workspace.

serviceProviderIdstringobligatoire

ID of the service provider.

Afficher les 22 champs
consentIdstring

ID of the read consent.

creationobjectobligatoire

When and by whom the resource was created.

Afficher les 2 champs enfants
creationDateTimestringdate-timeobligatoire

Date and time when the resource was created.

createdBystring

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

activationobjectobligatoire

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

Afficher les 3 champs enfants
enabledbooleanobligatoire

Whether the resource is enabled.

updateDateTimestringdate-timeobligatoire

Date and time when enabled was last set.

updatedBystring

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

archivedbooleanobligatoire
isOfflinebooleanobligatoire
enrichWithCamtboolean
tasksnumberobligatoire
lastRequestedDateForBalancesstringdate-time
lastRequestedDateForTransactionsstringdate-time
lastTaskRunDateForBalancesstringdate-time
lastTaskRunDateForTransactionsstringdate-time
lastAvailableDateForBalancesstring
lastAvailableDateForTransactionsstring
cashAccountsobject[]obligatoire
Afficher les 4 champs enfants
accountIdentificationsobject[]obligatoire
Afficher les 2 champs enfants
typestringobligatoire

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

Afficher les 14 valeurs
  • 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.

identificationstringobligatoire
currencystring
namestring
ownerNamestring
relationshipsobjectobligatoire
Afficher les 4 champs enfants
readConsentReadConsent
counterpartyCounterparty
latestBalanceobject
Afficher les 2 champs enfants
datestringobligatoire
balanceobjectobligatoire
Afficher les 4 champs enfants
dateTimestringdate-timeobligatoire
currencystringobligatoire
amountnumberobligatoire
isClosingbooleanobligatoire
recentBalancesRecord<string, object>
Afficher les 2 champs enfants
datestringobligatoire
balanceobjectobligatoire
Afficher les 4 champs enfants
dateTimestringdate-timeobligatoire
currencystringobligatoire
amountnumberobligatoire
isClosingbooleanobligatoire
L’objet BankAccount
{
  "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

Portéebank-accounts:read

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

Paramètres de requête

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.

Par défaut20

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.

Renvoie

200

List of items

dataBankAccount[]obligatoire

Items of the page, in list order.

limitintegerobligatoire

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

Portéebank-accounts:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

bankAccountIdstringobligatoire

ID of the bank account.

Paramètres de requête

fieldsstring

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

Corps de la requête

namestring
bicstring
ownerNamestring
accountTypeCodestring
Afficher les 23 valeurs

CACCCARDCASHCHARCISHCOMMCPACLLSVLOANMGLDMOMANFCANREXODFTONDPOTHRSACCSLRYSVGSTAXETRANTRASVACC

enabledboolean
enrichWithCamtboolean

Renvoie

200

Successful response

dataBankAccountobligatoire
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

Portéebank-accounts:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

Renvoie

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

Portéebank-accounts:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

Paramètres de requête

fieldsstring

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

Corps de la requête

serviceProviderIdstringobligatoire

ID of the service provider.

accountTypeCodestringobligatoire
Afficher les 23 valeurs

CACCCARDCASHCHARCISHCOMMCPACLLSVLOANMGLDMOMANFCANREXODFTONDPOTHRSACCSLRYSVGSTAXETRANTRASVACC

countrystringobligatoire

ISO 3166-1 alpha-2 country code

currencystringobligatoire

ISO 4217 currency code

identificationstringobligatoire
identificationTypestringobligatoire
Afficher les 12 valeurs

ibanbbanaccountNumberpanemailmsisdnvirtualAccountIdglobalWalletclabebitcoinAddressbitcoinXpubother

namestring
ownerNamestring

Renvoie

200

Successful response

dataBankAccountobligatoire
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

Portéebank-accounts:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

bankAccountIdstringobligatoire

ID of the bank account.

Renvoie

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

Portéebank-accounts:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

Paramètres de requête

fieldsstring

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

Corps de la requête

bankAccountIdstringobligatoire

ID of the bank account.

typestringobligatoire

Kind of entity: an individual or an organization.

  • individual

    A natural person.

  • organization

    A company or another organization.

namestringobligatoire
addressPostalAddressobligatoire

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

Afficher les 12 champs enfants
countrystringobligatoire

ISO 3166-1 alpha-2 country code

postCodestringobligatoire

Post code of the address.

townNamestringobligatoire

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.

Renvoie

200

Successful response

dataCounterpartyobligatoire
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

Portéebank-accounts:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

Renvoie

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

Portéebank-accounts:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

Paramètres de requête

fieldsstring

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

Corps de la requête

bankAccountIdstringobligatoire

ID of the bank account.

fromDatestringobligatoire
toDatestringobligatoire
exportTypestringobligatoire

Format of the bank transaction export.

Afficher les 13 valeurs
  • 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[]
Afficher les 4 champs enfants
typestringobligatoire
Afficher les 37 valeurs

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

Renvoie

200

Successful response

dataBankTransactionExportobligatoire
Afficher les 4 champs enfants
startedbooleanobligatoire
workspaceIdstringobligatoire
bankAccountIdstringobligatoire
filesobject[]obligatoire
Afficher les 4 champs enfants
exportIdstringobligatoire
targetFileNamestringobligatoire
downloadUrlstringuriobligatoire

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.

expiresAtstringobligatoire

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.

Portéebank-accounts:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

Corps de la requête

bankAccountIdstringobligatoire

ID of the bank account.

bankTransactionIdsstring[]obligatoire

ID of the bank transaction.

Renvoie

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

Portéebank-accounts:read

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

bankAccountIdstringobligatoire

ID of the bank account.

Paramètres de requête

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.

Par défaut20

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.

Renvoie

200

List of items

dataBankTransaction[]obligatoire

Items of the page, in list order.

Afficher les 19 champs enfants
firestoreIdstringobligatoire

ID of the bank transaction.

dateTimestringdate-timeobligatoire
executionStatusstringobligatoire

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.

workspaceIdstringobligatoire

ID of the workspace.

bankAccountIdstringobligatoire

ID of the bank account.

serviceProviderIdstringobligatoire

ID of the service provider.

reconciledbooleanobligatoire
milliAmountnumberobligatoire
instructedMilliAmountnumber
accountingStatusstring

Valeurspendingpartially_bookedbooked

accountingSuggestionobject
Afficher les 4 champs enfants
scorestring

Valeurshighmediumlow

historicalMatchingBankTransactionobject
Afficher les 2 champs enfants
firestoreIdstringobligatoire

ID of the bank transaction.

bankAccountIdstringobligatoire

ID of the bank account.

rationalestring
entriesobject[]obligatoire
Afficher les 5 champs enfants
accountCodestring
creditAccountstring
debitAccountstring
descriptionstring
milliAmountnumber
accountingSuggestionStatusstring

Valeurspendingprocessed

transactionobjectobligatoire
Afficher les 15 champs enfants
bookingDatestring
bookingDateTimestring
valueDatestring
valueDateTimestring
currencystring
instructedMilliAmountnumber
instructedCurrencystring
feesAmountnumber
feesCurrencystring
exchangeRatenumber
exchangeRateTextstring
counterpartyNamestring
referencestring
communicationstring
additionalInformationstring
cashBalanceobject
Afficher les 4 champs enfants
dateTimestringdate-timeobligatoire
currencystringobligatoire
amountnumberobligatoire
isClosingbooleanobligatoire
addressPostalAddress

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

Afficher les 12 champs enfants
countrystringobligatoire

ISO 3166-1 alpha-2 country code

postCodestringobligatoire

Post code of the address.

townNamestringobligatoire

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[]
Afficher les 2 champs enfants
targetstringobligatoire
dataobjectobligatoire
Afficher 1 champ enfant
confidencenumberobligatoire
invoiceConfirmedMatchesInvoiceMatch[]
Afficher les 2 champs enfants
targetstringobligatoire
dataobjectobligatoire
Afficher 1 champ enfant
confidencenumberobligatoire
limitintegerobligatoire

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)

Portéebank-accounts:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

bankAccountIdstringobligatoire

ID of the bank account.

transactionIdstringobligatoire

ID of the bank transaction.

Paramètres de requête

fieldsstring

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

Corps de la requête

statusstringobligatoire

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.

Renvoie

200

Successful response

dataBankTransactionobligatoire
Afficher les 19 champs enfants
firestoreIdstringobligatoire

ID of the bank transaction.

dateTimestringdate-timeobligatoire
executionStatusstringobligatoire

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.

workspaceIdstringobligatoire

ID of the workspace.

bankAccountIdstringobligatoire

ID of the bank account.

serviceProviderIdstringobligatoire

ID of the service provider.

reconciledbooleanobligatoire
milliAmountnumberobligatoire
instructedMilliAmountnumber
accountingStatusstring

Valeurspendingpartially_bookedbooked

accountingSuggestionobject
Afficher les 4 champs enfants
scorestring

Valeurshighmediumlow

historicalMatchingBankTransactionobject
Afficher les 2 champs enfants
firestoreIdstringobligatoire

ID of the bank transaction.

bankAccountIdstringobligatoire

ID of the bank account.

rationalestring
entriesobject[]obligatoire
Afficher les 5 champs enfants
accountCodestring
creditAccountstring
debitAccountstring
descriptionstring
milliAmountnumber
accountingSuggestionStatusstring

Valeurspendingprocessed

transactionobjectobligatoire
Afficher les 15 champs enfants
bookingDatestring
bookingDateTimestring
valueDatestring
valueDateTimestring
currencystring
instructedMilliAmountnumber
instructedCurrencystring
feesAmountnumber
feesCurrencystring
exchangeRatenumber
exchangeRateTextstring
counterpartyNamestring
referencestring
communicationstring
additionalInformationstring
cashBalanceobject
Afficher les 4 champs enfants
dateTimestringdate-timeobligatoire
currencystringobligatoire
amountnumberobligatoire
isClosingbooleanobligatoire
addressPostalAddress

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

Afficher les 12 champs enfants
countrystringobligatoire

ISO 3166-1 alpha-2 country code

postCodestringobligatoire

Post code of the address.

townNamestringobligatoire

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[]
Afficher les 2 champs enfants
targetstringobligatoire
dataobjectobligatoire
Afficher 1 champ enfant
confidencenumberobligatoire
invoiceConfirmedMatchesInvoiceMatch[]
Afficher les 2 champs enfants
targetstringobligatoire
dataobjectobligatoire
Afficher 1 champ enfant
confidencenumberobligatoire
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

Portéebank-accounts:read

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

bankAccountIdstringobligatoire

ID of the bank account.

Paramètres de requête

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.

Par défaut20

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.

Renvoie

200

List of items

dataBalanceHistory[]obligatoire

Items of the page, in list order.

Afficher les 5 champs enfants
firestoreIdstringobligatoire

ID of the balance history.

bankAccountIdstringobligatoire

ID of the bank account.

workspaceIdstringobligatoire

ID of the workspace.

yearnumberobligatoire
balancesRecord<string, object>obligatoire
Afficher les 4 champs enfants
dateTimestringdate-timeobligatoire
currencystringobligatoire
amountnumberobligatoire
isClosingbooleanobligatoire
limitintegerobligatoire

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.

Portéebank-accounts:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

bankAccountIdstringobligatoire

ID of the bank account.

Paramètres de requête

fieldsstring

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

Corps de la requête

fileNamestringobligatoire
contentTypestringobligatoire
sizeintegerobligatoire

Renvoie

200

Successful response

dataAttachmentUploadUrlobligatoire
Afficher les 4 champs enfants
uploadUrlstringuriobligatoire
contentTypestringobligatoire
sizeintegerobligatoire
attachmentIdstringobligatoire
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.

Portéebank-accounts:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

bankAccountIdstringobligatoire

ID of the bank account.

attachmentIdstringobligatoire

ID of the attachment, returned with its upload URL.

Renvoie

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"
  }
}

Construisez sur vos propres données.

Créez un compte, ouvrez Profil › Développeur et créez une clé limitée aux ressources dont vous avez besoin. Une question sur une intégration ? L’équipe y répond lors d’un appel.