| Méthode | Chemin | Résumé |
|---|---|---|
| GET | …/bank-accounts | List bank accounts in the workspace |
| PATCH | …/bank-accounts/{bankAccountId} | Update a bank account |
| POST | …/bank-accounts/archive | Archive bank accounts so they no longer appear in active lists |
| POST | …/bank-accounts/create-offline | Create an offline bank account not connected to a banking provider |
| DELETE | …/bank-accounts/{bankAccountId}/delete-offline | Delete an offline bank account |
| POST | …/bank-accounts/create-account-counterparty | Create a counterparty bank account record |
| GET | …/bank-accounts/transactions/search | Search bank transactions across the workspace |
| POST | …/bank-accounts/transactions/approve-all | Approve all matching bank transactions in bulk |
| POST | …/bank-accounts/transactions/export | Export bank transactions to a downloadable file |
| POST | …/bank-accounts/transactions/request-cash-coding | Request AI-suggested cash coding for bank transactions |
| GET | …/bank-accounts/{bankAccountId}/transactions | List transactions on a bank account |
| POST | …/bank-accounts/{bankAccountId}/transactions/{transactionId}/review | Review a single bank transaction (approve, reject, or update) |
| GET | …/bank-accounts/{bankAccountId}/balance-history | List historical balances for a bank account |
| POST | …/bank-accounts/{bankAccountId}/attachments/upload | Get an upload URL for an attachment of the bank account |
| POST | …/bank-accounts/{bankAccountId}/attachments/{attachmentId}/parse-transactions | Parse 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
firestoreIdstringobligatoireID of the bank account.
namestringobligatoireproductsstring[]obligatoireAfficher les 11 valeurs
identityaccountsbeneficiariesbalancestransactionsstatementsdirect_debitsdraft_paymentssingle_paymentsscheduled_paymentsstanding_order_payments
featuresstring[]obligatoireAfficher 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
usagestringKind of entity: an individual or an organization.
individualA natural person.
organizationA company or another organization.
workspaceIdstringobligatoireID of the workspace.
serviceProviderIdstringobligatoireID of the service provider.
Afficher les 22 champsMasquer la liste des champs
consentIdstringID of the read consent.
creationobjectobligatoireWhen and by whom the resource was created.
Afficher les 2 champs enfants
creationDateTimestringdate-timeobligatoireDate and time when the resource was created.
createdBystringID of the user who created the resource, when recorded.
activationobjectobligatoireWhether the resource is enabled, and when and by whom it was last enabled or disabled.
Afficher les 3 champs enfants
enabledbooleanobligatoireWhether the resource is enabled.
updateDateTimestringdate-timeobligatoireDate and time when enabled was last set.
updatedBystringID of the user who last set enabled, when recorded.
archivedbooleanobligatoireisOfflinebooleanobligatoireenrichWithCamtbooleantasksnumberobligatoirelastRequestedDateForBalancesstringdate-timelastRequestedDateForTransactionsstringdate-timelastTaskRunDateForBalancesstringdate-timelastTaskRunDateForTransactionsstringdate-timelastAvailableDateForBalancesstringlastAvailableDateForTransactionsstringcashAccountsobject[]obligatoireAfficher les 4 champs enfants
accountIdentificationsobject[]obligatoireAfficher les 2 champs enfants
typestringobligatoireKind of identifier of a bank account or of its bank.
Afficher les 14 valeurs
bicBank Identifier Code of the bank.
sortCodeSix-digit code of a bank and branch in the United Kingdom.
ibanInternational Bank Account Number.
bbanBasic Bank Account Number, the country-specific format of an account number.
accountNumberAccount number that the bank assigns, unique within the bank or the branch.
panPrimary Account Number, the number of a credit or debit card.
emailEmail address that identifies the account.
msisdnMobile phone number that identifies the account.
virtualAccountIdIdentifier of a virtual sub-account of a main account.
globalWalletIdentifier of a digital wallet that holds and pays in several currencies.
clabeCLABE, the 18-digit standardized bank code of a Mexican bank account.
bitcoinAddressSingle Bitcoin address, the only address the account tracks.
bitcoinXpubBitcoin extended public key (xpub, ypub or zpub), from which the addresses of the wallet are derived.
otherAnother kind of identifier.
identificationstringobligatoirecurrencystringnamestringownerNamestringrelationshipsobjectobligatoireAfficher les 4 champs enfants
readConsentReadConsentcounterpartyCounterpartylatestBalanceobjectAfficher les 2 champs enfants
datestringobligatoirebalanceobjectobligatoireAfficher les 4 champs enfants
dateTimestringdate-timeobligatoirecurrencystringobligatoireamountnumberobligatoireisClosingbooleanobligatoirerecentBalancesRecord<string, object>Afficher les 2 champs enfants
datestringobligatoirebalanceobjectobligatoireAfficher les 4 champs enfants
dateTimestringdate-timeobligatoirecurrencystringobligatoireamountnumberobligatoireisClosingbooleanobligatoire{
"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
}
}
}
}
}/workspaces/{workspaceId}/bank-accountsList bank accounts in the workspace
Portéebank-accounts:read
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
Paramètres de requête
limitintegerMaximum 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
startAfterstringCursor of the page to return: the nextCursor of the previous page.
fieldsstringComma-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
List of items
Items of the page, in list order.
limitintegerobligatoirePage size of the request, or the number of requested ids.
nextCursorstringCursor 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"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts', {
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(await response.json());import os
import requests
response = requests.get(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.json()){
"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"
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/{bankAccountId}Update a bank account
Portéebank-accounts:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
bankAccountIdstringobligatoireID of the bank account.
Paramètres de requête
fieldsstringComma-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
namestringbicstringownerNamestringaccountTypeCodestringAfficher les 23 valeurs
CACCCARDCASHCHARCISHCOMMCPACLLSVLOANMGLDMOMANFCANREXODFTONDPOTHRSACCSLRYSVGSTAXETRANTRASVACC
enabledbooleanenrichWithCamtbooleanRenvoie
Successful response
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"
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"accountTypeCode": "CACC"
}),
});
console.log(await response.json());import os
import requests
response = requests.patch(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"accountTypeCode": "CACC",
},
)
print(response.json()){
"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": {…}
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/archiveArchive bank accounts so they no longer appear in active lists
Portéebank-accounts:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
Renvoie
No content
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/archive' \
-H "Authorization: Bearer $SWAY_API_KEY"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/archive', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(response.status);import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/archive",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.status_code){
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/create-offlineCreate an offline bank account not connected to a banking provider
Portéebank-accounts:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
Paramètres de requête
fieldsstringComma-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
serviceProviderIdstringobligatoireID of the service provider.
accountTypeCodestringobligatoireAfficher les 23 valeurs
CACCCARDCASHCHARCISHCOMMCPACLLSVLOANMGLDMOMANFCANREXODFTONDPOTHRSACCSLRYSVGSTAXETRANTRASVACC
countrystringobligatoireISO 3166-1 alpha-2 country code
currencystringobligatoireISO 4217 currency code
identificationstringobligatoireidentificationTypestringobligatoireAfficher les 12 valeurs
ibanbbanaccountNumberpanemailmsisdnvirtualAccountIdglobalWalletclabebitcoinAddressbitcoinXpubother
namestringownerNamestringRenvoie
Successful response
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"
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/create-offline', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"serviceProviderId": "sprov_SUlEUDAwMjMw",
"accountTypeCode": "CACC",
"country": "CH",
"currency": "CHF",
"identification": "string",
"identificationType": "iban",
"name": "string",
"ownerName": "string"
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/create-offline",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"serviceProviderId": "sprov_SUlEUDAwMjMw",
"accountTypeCode": "CACC",
"country": "CH",
"currency": "CHF",
"identification": "string",
"identificationType": "iban",
"name": "string",
"ownerName": "string",
},
)
print(response.json()){
"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": {…}
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/{bankAccountId}/delete-offlineDelete an offline bank account
Portéebank-accounts:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
bankAccountIdstringobligatoireID of the bank account.
Renvoie
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"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/delete-offline', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(response.status);import os
import requests
response = requests.delete(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/delete-offline",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.status_code){
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/create-account-counterpartyCreate a counterparty bank account record
Portéebank-accounts:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
Paramètres de requête
fieldsstringComma-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
bankAccountIdstringobligatoireID of the bank account.
typestringobligatoireKind of entity: an individual or an organization.
individualA natural person.
organizationA company or another organization.
namestringobligatoireaddressPostalAddressobligatoirePostal address, with the parts of an ISO 20022 postal address.
Afficher les 12 champs enfants
countrystringobligatoireISO 3166-1 alpha-2 country code
postCodestringobligatoirePost code of the address.
townNamestringobligatoireName of the town or city.
streetNamestringName of the street.
buildingNumberstringNumber of the building in the street.
namestringName of the building or place.
sortingCodestringAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstringPost office box.
administrativeAreastringRegion of the country, such as a canton or a state.
recipientsstring[]Names of the people the address is for.
organizationstringName of the organization at the address.
sourcestring[]Text the address was read from, one item per line.
Renvoie
Successful response
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"
]
}
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/create-account-counterparty', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"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"
]
}
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/create-account-counterparty",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"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",
],
},
},
)
print(response.json()){
"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"
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/transactions/searchSearch bank transactions across the workspace
Portéebank-accounts:read
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
Paramètres de requête
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
bankAccountIdstringID of the bank account.
querystringobligatoirepageintegerPar défaut0
sizeintegerPar défaut20
Renvoie
Successful response
dataBankTransaction[]obligatoireAfficher les 19 champs enfants
firestoreIdstringobligatoireID of the bank transaction.
dateTimestringdate-timeobligatoireexecutionStatusstringobligatoireExecution status of the transaction at the bank.
bookedThe bank booked the transaction on the account.
pendingThe bank has not booked the transaction yet; the transaction is removed when the bank stops reporting it.
rejectedThe bank did not execute the transaction.
workspaceIdstringobligatoireID of the workspace.
bankAccountIdstringobligatoireID of the bank account.
serviceProviderIdstringobligatoireID of the service provider.
reconciledbooleanobligatoiremilliAmountnumberobligatoireinstructedMilliAmountnumberaccountingStatusstringValeurspendingpartially_bookedbooked
accountingSuggestionobjectAfficher les 4 champs enfants
scorestringValeurshighmediumlow
historicalMatchingBankTransactionobjectAfficher les 2 champs enfants
firestoreIdstringobligatoireID of the bank transaction.
bankAccountIdstringobligatoireID of the bank account.
rationalestringentriesobject[]obligatoireAfficher les 5 champs enfants
accountCodestringcreditAccountstringdebitAccountstringdescriptionstringmilliAmountnumberaccountingSuggestionStatusstringValeurspendingprocessed
transactionobjectobligatoireAfficher les 15 champs enfants
bookingDatestringbookingDateTimestringvalueDatestringvalueDateTimestringcurrencystringinstructedMilliAmountnumberinstructedCurrencystringfeesAmountnumberfeesCurrencystringexchangeRatenumberexchangeRateTextstringcounterpartyNamestringreferencestringcommunicationstringadditionalInformationstringcashBalanceobjectAfficher les 4 champs enfants
dateTimestringdate-timeobligatoirecurrencystringobligatoireamountnumberobligatoireisClosingbooleanobligatoireaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
Afficher les 12 champs enfants
countrystringobligatoireISO 3166-1 alpha-2 country code
postCodestringobligatoirePost code of the address.
townNamestringobligatoireName of the town or city.
streetNamestringName of the street.
buildingNumberstringNumber of the building in the street.
namestringName of the building or place.
sortingCodestringAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstringPost office box.
administrativeAreastringRegion of the country, such as a canton or a state.
recipientsstring[]Names of the people the address is for.
organizationstringName 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
targetstringobligatoiredataobjectobligatoireAfficher 1 champ enfant
confidencenumberobligatoireinvoiceConfirmedMatchesInvoiceMatch[]Afficher les 2 champs enfants
targetstringobligatoiredataobjectobligatoireAfficher 1 champ enfant
confidencenumberobligatoirecurl 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/search?query=string' \
-H "Authorization: Bearer $SWAY_API_KEY"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/search?query=string', {
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(await response.json());import os
import requests
response = requests.get(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/search?query=string",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.json()){
"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
}
}
]
}
]
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/transactions/approve-allApprove all matching bank transactions in bulk
Portéebank-accounts:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
Renvoie
No content
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/approve-all' \
-H "Authorization: Bearer $SWAY_API_KEY"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/approve-all', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(response.status);import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/approve-all",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.status_code){
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/transactions/exportExport bank transactions to a downloadable file
Portéebank-accounts:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
Paramètres de requête
fieldsstringComma-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
bankAccountIdstringobligatoireID of the bank account.
fromDatestringobligatoiretoDatestringobligatoireexportTypestringobligatoireFormat of the bank transaction export.
Afficher les 13 valeurs
xeroDeprecated alias of
csv_xero.csv_xeroCSV file to import into Xero.
quickbooksDeprecated alias of
csv_quickbooks.csv_quickbooksCSV file to import into QuickBooks.
csv_winbizCSV file of accounting entries to import into Winbiz.
tsv_cresusTab-separated file of accounting entries to import into Crésus.
csv_wineurDeprecated alias of
tsv_wineur.tsv_wineurTab-separated file of accounting entries to import into WinEUR.
xml_camt053ISO 20022 camt.053 XML bank statement, one file per day.
csv_statementCSV bank statement.
html_statementHTML bank statement.
pdf_statementPDF bank statement.
dsv_customDelimited text file with the columns in
fields, separated byseparator.
fieldsobject[]Afficher les 4 champs enfants
typestringobligatoireAfficher 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
namestringdefaultValuestringformatstringconfigRecord<string, string | number>separatorstringgenerateHeadersbooleantransliteratebooleanmessagingTokenstringisWorkspaceFilebooleanRenvoie
Successful response
dataBankTransactionExportobligatoireAfficher les 4 champs enfants
startedbooleanobligatoireworkspaceIdstringobligatoirebankAccountIdstringobligatoirefilesobject[]obligatoireAfficher les 4 champs enfants
exportIdstringobligatoiretargetFileNamestringobligatoiredownloadUrlstringuriobligatoireTime-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.
expiresAtstringobligatoireInstant 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"
}
]
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/export', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"fromDate": "2026-03-02",
"toDate": "2026-03-02",
"exportType": "xero",
"fields": [
{
"type": "account_identification"
}
]
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/export",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"fromDate": "2026-03-02",
"toDate": "2026-03-02",
"exportType": "xero",
"fields": [
{
"type": "account_identification",
},
],
},
)
print(response.json()){
"data": {
"started": true,
"workspaceId": "string",
"bankAccountId": "string",
"files": [
{
"exportId": "string",
"targetFileName": "string",
"downloadUrl": "https://example.com",
"expiresAt": "2026-03-02T09:30:00.000Z"
}
]
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/transactions/request-cash-codingRequest 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
workspaceIdstringobligatoireID of the workspace.
Corps de la requête
bankAccountIdstringobligatoireID of the bank account.
bankTransactionIdsstring[]obligatoireID of the bank transaction.
Renvoie
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"
]
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/request-cash-coding', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"bankTransactionIds": [
"trx_MjAyNjAzMDJUMDk"
]
}),
});
console.log(response.status);import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/transactions/request-cash-coding",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"bankTransactionIds": [
"trx_MjAyNjAzMDJUMDk",
],
},
)
print(response.status_code){
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/{bankAccountId}/transactionsList transactions on a bank account
Portéebank-accounts:read
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
bankAccountIdstringobligatoireID of the bank account.
Paramètres de requête
limitintegerMaximum 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
startAfterstringCursor of the page to return: the nextCursor of the previous page.
fieldsstringComma-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.
approvalStatusstringReview status of the bank transaction.
pendingThe transaction waits for a review. A new transaction starts in this status, except the older transactions of a newly connected bank account.
approvedA user approved the transaction, or Sway approved it as an older transaction when the bank account was connected.
rejectedA user rejected the transaction.
Renvoie
List of items
dataBankTransaction[]obligatoireItems of the page, in list order.
Afficher les 19 champs enfants
firestoreIdstringobligatoireID of the bank transaction.
dateTimestringdate-timeobligatoireexecutionStatusstringobligatoireExecution status of the transaction at the bank.
bookedThe bank booked the transaction on the account.
pendingThe bank has not booked the transaction yet; the transaction is removed when the bank stops reporting it.
rejectedThe bank did not execute the transaction.
workspaceIdstringobligatoireID of the workspace.
bankAccountIdstringobligatoireID of the bank account.
serviceProviderIdstringobligatoireID of the service provider.
reconciledbooleanobligatoiremilliAmountnumberobligatoireinstructedMilliAmountnumberaccountingStatusstringValeurspendingpartially_bookedbooked
accountingSuggestionobjectAfficher les 4 champs enfants
scorestringValeurshighmediumlow
historicalMatchingBankTransactionobjectAfficher les 2 champs enfants
firestoreIdstringobligatoireID of the bank transaction.
bankAccountIdstringobligatoireID of the bank account.
rationalestringentriesobject[]obligatoireAfficher les 5 champs enfants
accountCodestringcreditAccountstringdebitAccountstringdescriptionstringmilliAmountnumberaccountingSuggestionStatusstringValeurspendingprocessed
transactionobjectobligatoireAfficher les 15 champs enfants
bookingDatestringbookingDateTimestringvalueDatestringvalueDateTimestringcurrencystringinstructedMilliAmountnumberinstructedCurrencystringfeesAmountnumberfeesCurrencystringexchangeRatenumberexchangeRateTextstringcounterpartyNamestringreferencestringcommunicationstringadditionalInformationstringcashBalanceobjectAfficher les 4 champs enfants
dateTimestringdate-timeobligatoirecurrencystringobligatoireamountnumberobligatoireisClosingbooleanobligatoireaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
Afficher les 12 champs enfants
countrystringobligatoireISO 3166-1 alpha-2 country code
postCodestringobligatoirePost code of the address.
townNamestringobligatoireName of the town or city.
streetNamestringName of the street.
buildingNumberstringNumber of the building in the street.
namestringName of the building or place.
sortingCodestringAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstringPost office box.
administrativeAreastringRegion of the country, such as a canton or a state.
recipientsstring[]Names of the people the address is for.
organizationstringName 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
targetstringobligatoiredataobjectobligatoireAfficher 1 champ enfant
confidencenumberobligatoireinvoiceConfirmedMatchesInvoiceMatch[]Afficher les 2 champs enfants
targetstringobligatoiredataobjectobligatoireAfficher 1 champ enfant
confidencenumberobligatoirelimitintegerobligatoirePage size of the request, or the number of requested ids.
nextCursorstringCursor 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"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/transactions', {
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(await response.json());import os
import requests
response = requests.get(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/transactions",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.json()){
"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"
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/{bankAccountId}/transactions/{transactionId}/reviewReview a single bank transaction (approve, reject, or update)
Portéebank-accounts:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
bankAccountIdstringobligatoireID of the bank account.
transactionIdstringobligatoireID of the bank transaction.
Paramètres de requête
fieldsstringComma-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
statusstringobligatoireReview status of the bank transaction.
pendingThe transaction waits for a review. A new transaction starts in this status, except the older transactions of a newly connected bank account.
approvedA user approved the transaction, or Sway approved it as an older transaction when the bank account was connected.
rejectedA user rejected the transaction.
Renvoie
Successful response
dataBankTransactionobligatoireAfficher les 19 champs enfants
firestoreIdstringobligatoireID of the bank transaction.
dateTimestringdate-timeobligatoireexecutionStatusstringobligatoireExecution status of the transaction at the bank.
bookedThe bank booked the transaction on the account.
pendingThe bank has not booked the transaction yet; the transaction is removed when the bank stops reporting it.
rejectedThe bank did not execute the transaction.
workspaceIdstringobligatoireID of the workspace.
bankAccountIdstringobligatoireID of the bank account.
serviceProviderIdstringobligatoireID of the service provider.
reconciledbooleanobligatoiremilliAmountnumberobligatoireinstructedMilliAmountnumberaccountingStatusstringValeurspendingpartially_bookedbooked
accountingSuggestionobjectAfficher les 4 champs enfants
scorestringValeurshighmediumlow
historicalMatchingBankTransactionobjectAfficher les 2 champs enfants
firestoreIdstringobligatoireID of the bank transaction.
bankAccountIdstringobligatoireID of the bank account.
rationalestringentriesobject[]obligatoireAfficher les 5 champs enfants
accountCodestringcreditAccountstringdebitAccountstringdescriptionstringmilliAmountnumberaccountingSuggestionStatusstringValeurspendingprocessed
transactionobjectobligatoireAfficher les 15 champs enfants
bookingDatestringbookingDateTimestringvalueDatestringvalueDateTimestringcurrencystringinstructedMilliAmountnumberinstructedCurrencystringfeesAmountnumberfeesCurrencystringexchangeRatenumberexchangeRateTextstringcounterpartyNamestringreferencestringcommunicationstringadditionalInformationstringcashBalanceobjectAfficher les 4 champs enfants
dateTimestringdate-timeobligatoirecurrencystringobligatoireamountnumberobligatoireisClosingbooleanobligatoireaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
Afficher les 12 champs enfants
countrystringobligatoireISO 3166-1 alpha-2 country code
postCodestringobligatoirePost code of the address.
townNamestringobligatoireName of the town or city.
streetNamestringName of the street.
buildingNumberstringNumber of the building in the street.
namestringName of the building or place.
sortingCodestringAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstringPost office box.
administrativeAreastringRegion of the country, such as a canton or a state.
recipientsstring[]Names of the people the address is for.
organizationstringName 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
targetstringobligatoiredataobjectobligatoireAfficher 1 champ enfant
confidencenumberobligatoireinvoiceConfirmedMatchesInvoiceMatch[]Afficher les 2 champs enfants
targetstringobligatoiredataobjectobligatoireAfficher 1 champ enfant
confidencenumberobligatoirecurl -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"
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/transactions/trx_MjAyNjAzMDJUMDk/review', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"status": "pending"
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/transactions/trx_MjAyNjAzMDJUMDk/review",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"status": "pending",
},
)
print(response.json()){
"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
}
}
]
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/{bankAccountId}/balance-historyList historical balances for a bank account
Portéebank-accounts:read
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
bankAccountIdstringobligatoireID of the bank account.
Paramètres de requête
limitintegerMaximum 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
startAfterstringCursor of the page to return: the nextCursor of the previous page.
fieldsstringComma-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
List of items
dataBalanceHistory[]obligatoireItems of the page, in list order.
Afficher les 5 champs enfants
firestoreIdstringobligatoireID of the balance history.
bankAccountIdstringobligatoireID of the bank account.
workspaceIdstringobligatoireID of the workspace.
yearnumberobligatoirebalancesRecord<string, object>obligatoireAfficher les 4 champs enfants
dateTimestringdate-timeobligatoirecurrencystringobligatoireamountnumberobligatoireisClosingbooleanobligatoirelimitintegerobligatoirePage size of the request, or the number of requested ids.
nextCursorstringCursor 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"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/balance-history', {
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(await response.json());import os
import requests
response = requests.get(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/balance-history",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.json()){
"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"
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/{bankAccountId}/attachments/uploadGet 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
workspaceIdstringobligatoireID of the workspace.
bankAccountIdstringobligatoireID of the bank account.
Paramètres de requête
fieldsstringComma-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
fileNamestringobligatoirecontentTypestringobligatoiresizeintegerobligatoireRenvoie
Successful response
dataAttachmentUploadUrlobligatoireAfficher les 4 champs enfants
uploadUrlstringuriobligatoirecontentTypestringobligatoiresizeintegerobligatoireattachmentIdstringobligatoirecurl -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
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/attachments/upload', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"fileName": "string",
"contentType": "string",
"size": 0
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/attachments/upload",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"fileName": "string",
"contentType": "string",
"size": 0,
},
)
print(response.json()){
"data": {
"uploadUrl": "https://example.com",
"contentType": "string",
"size": 0,
"attachmentId": "string"
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/bank-accounts/{bankAccountId}/attachments/{attachmentId}/parse-transactionsParse 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
workspaceIdstringobligatoireID of the workspace.
bankAccountIdstringobligatoireID of the bank account.
attachmentIdstringobligatoireID of the attachment, returned with its upload URL.
Renvoie
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"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/attachments/At5kV8pW2nQx7rLs3mYd/parse-transactions', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(response.status);import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/bank-accounts/bacc_Q0gzMTA4NzY1NDM/attachments/At5kV8pW2nQx7rLs3mYd/parse-transactions",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.status_code){
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}