| Methode | Pfad | Zusammenfassung |
|---|---|---|
| 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 |
Die Pfade beginnen mit /workspaces/{workspaceId}. GET-Endpunkte brauchen bank-accounts:read, die übrigen bank-accounts:write.
Das Objekt BankAccount
firestoreIdstringerforderlichID of the bank account.
namestringerforderlichproductsstring[]erforderlich11 Werte anzeigen
identityaccountsbeneficiariesbalancestransactionsstatementsdirect_debitsdraft_paymentssingle_paymentsscheduled_paymentsstanding_order_payments
featuresstring[]erforderlich38 Werte anzeigen
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.
workspaceIdstringerforderlichID of the workspace.
serviceProviderIdstringerforderlichID of the service provider.
Alle 22 Felder anzeigenFeldliste ausblenden
consentIdstringID of the read consent.
creationobjecterforderlichWhen and by whom the resource was created.
2 untergeordnete Felder anzeigen
creationDateTimestringdate-timeerforderlichDate and time when the resource was created.
createdBystringID of the user who created the resource, when recorded.
activationobjecterforderlichWhether the resource is enabled, and when and by whom it was last enabled or disabled.
3 untergeordnete Felder anzeigen
enabledbooleanerforderlichWhether the resource is enabled.
updateDateTimestringdate-timeerforderlichDate and time when enabled was last set.
updatedBystringID of the user who last set enabled, when recorded.
archivedbooleanerforderlichisOfflinebooleanerforderlichenrichWithCamtbooleantasksnumbererforderlichlastRequestedDateForBalancesstringdate-timelastRequestedDateForTransactionsstringdate-timelastTaskRunDateForBalancesstringdate-timelastTaskRunDateForTransactionsstringdate-timelastAvailableDateForBalancesstringlastAvailableDateForTransactionsstringcashAccountsobject[]erforderlich4 untergeordnete Felder anzeigen
accountIdentificationsobject[]erforderlich2 untergeordnete Felder anzeigen
typestringerforderlichKind of identifier of a bank account or of its bank.
14 Werte anzeigen
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.
identificationstringerforderlichcurrencystringnamestringownerNamestringrelationshipsobjecterforderlich4 untergeordnete Felder anzeigen
readConsentReadConsentcounterpartyCounterpartylatestBalanceobject2 untergeordnete Felder anzeigen
datestringerforderlichbalanceobjecterforderlich4 untergeordnete Felder anzeigen
dateTimestringdate-timeerforderlichcurrencystringerforderlichamountnumbererforderlichisClosingbooleanerforderlichrecentBalancesRecord<string, object>2 untergeordnete Felder anzeigen
datestringerforderlichbalanceobjecterforderlich4 untergeordnete Felder anzeigen
dateTimestringdate-timeerforderlichcurrencystringerforderlichamountnumbererforderlichisClosingbooleanerforderlich{
"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
Bereichbank-accounts:read
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Abfrageparameter
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.
Standard20
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.
Rückgabe
List of items
Items of the page, in list order.
limitintegererforderlichPage 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
Bereichbank-accounts:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
bankAccountIdstringerforderlichID of the bank account.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
namestringbicstringownerNamestringaccountTypeCodestring23 Werte anzeigen
CACCCARDCASHCHARCISHCOMMCPACLLSVLOANMGLDMOMANFCANREXODFTONDPOTHRSACCSLRYSVGSTAXETRANTRASVACC
enabledbooleanenrichWithCamtbooleanRückgabe
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
Bereichbank-accounts:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Rückgabe
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
Bereichbank-accounts:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
serviceProviderIdstringerforderlichID of the service provider.
accountTypeCodestringerforderlich23 Werte anzeigen
CACCCARDCASHCHARCISHCOMMCPACLLSVLOANMGLDMOMANFCANREXODFTONDPOTHRSACCSLRYSVGSTAXETRANTRASVACC
countrystringerforderlichISO 3166-1 alpha-2 country code
currencystringerforderlichISO 4217 currency code
identificationstringerforderlichidentificationTypestringerforderlich12 Werte anzeigen
ibanbbanaccountNumberpanemailmsisdnvirtualAccountIdglobalWalletclabebitcoinAddressbitcoinXpubother
namestringownerNamestringRückgabe
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
Bereichbank-accounts:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
bankAccountIdstringerforderlichID of the bank account.
Rückgabe
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
Bereichbank-accounts:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
bankAccountIdstringerforderlichID of the bank account.
typestringerforderlichKind of entity: an individual or an organization.
individualA natural person.
organizationA company or another organization.
namestringerforderlichaddressPostalAddresserforderlichPostal address, with the parts of an ISO 20022 postal address.
12 untergeordnete Felder anzeigen
countrystringerforderlichISO 3166-1 alpha-2 country code
postCodestringerforderlichPost code of the address.
townNamestringerforderlichName 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.
Rückgabe
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
Bereichbank-accounts:read
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Abfrageparameter
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.
querystringerforderlichpageintegerStandard0
sizeintegerStandard20
Rückgabe
Successful response
dataBankTransaction[]erforderlich19 untergeordnete Felder anzeigen
firestoreIdstringerforderlichID of the bank transaction.
dateTimestringdate-timeerforderlichexecutionStatusstringerforderlichExecution 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.
workspaceIdstringerforderlichID of the workspace.
bankAccountIdstringerforderlichID of the bank account.
serviceProviderIdstringerforderlichID of the service provider.
reconciledbooleanerforderlichmilliAmountnumbererforderlichinstructedMilliAmountnumberaccountingStatusstringWertependingpartially_bookedbooked
accountingSuggestionobject4 untergeordnete Felder anzeigen
scorestringWertehighmediumlow
historicalMatchingBankTransactionobject2 untergeordnete Felder anzeigen
firestoreIdstringerforderlichID of the bank transaction.
bankAccountIdstringerforderlichID of the bank account.
rationalestringentriesobject[]erforderlich5 untergeordnete Felder anzeigen
accountCodestringcreditAccountstringdebitAccountstringdescriptionstringmilliAmountnumberaccountingSuggestionStatusstringWertependingprocessed
transactionobjecterforderlich15 untergeordnete Felder anzeigen
bookingDatestringbookingDateTimestringvalueDatestringvalueDateTimestringcurrencystringinstructedMilliAmountnumberinstructedCurrencystringfeesAmountnumberfeesCurrencystringexchangeRatenumberexchangeRateTextstringcounterpartyNamestringreferencestringcommunicationstringadditionalInformationstringcashBalanceobject4 untergeordnete Felder anzeigen
dateTimestringdate-timeerforderlichcurrencystringerforderlichamountnumbererforderlichisClosingbooleanerforderlichaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
12 untergeordnete Felder anzeigen
countrystringerforderlichISO 3166-1 alpha-2 country code
postCodestringerforderlichPost code of the address.
townNamestringerforderlichName 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[]2 untergeordnete Felder anzeigen
targetstringerforderlichdataobjecterforderlich1 untergeordnetes Feld anzeigen
confidencenumbererforderlichinvoiceConfirmedMatchesInvoiceMatch[]2 untergeordnete Felder anzeigen
targetstringerforderlichdataobjecterforderlich1 untergeordnetes Feld anzeigen
confidencenumbererforderlichcurl '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
Bereichbank-accounts:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Rückgabe
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
Bereichbank-accounts:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
bankAccountIdstringerforderlichID of the bank account.
fromDatestringerforderlichtoDatestringerforderlichexportTypestringerforderlichFormat of the bank transaction export.
13 Werte anzeigen
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[]4 untergeordnete Felder anzeigen
typestringerforderlich37 Werte anzeigen
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>separatorstringgenerateHeadersbooleantransliteratebooleanmessagingTokenstringisWorkspaceFilebooleanRückgabe
Successful response
dataBankTransactionExporterforderlich4 untergeordnete Felder anzeigen
startedbooleanerforderlichworkspaceIdstringerforderlichbankAccountIdstringerforderlichfilesobject[]erforderlich4 untergeordnete Felder anzeigen
exportIdstringerforderlichtargetFileNamestringerforderlichdownloadUrlstringurierforderlichTime-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.
expiresAtstringerforderlichInstant 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.
Bereichbank-accounts:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Request-Body
bankAccountIdstringerforderlichID of the bank account.
bankTransactionIdsstring[]erforderlichID of the bank transaction.
Rückgabe
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
Bereichbank-accounts:read
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
bankAccountIdstringerforderlichID of the bank account.
Abfrageparameter
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.
Standard20
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.
Rückgabe
List of items
dataBankTransaction[]erforderlichItems of the page, in list order.
19 untergeordnete Felder anzeigen
firestoreIdstringerforderlichID of the bank transaction.
dateTimestringdate-timeerforderlichexecutionStatusstringerforderlichExecution 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.
workspaceIdstringerforderlichID of the workspace.
bankAccountIdstringerforderlichID of the bank account.
serviceProviderIdstringerforderlichID of the service provider.
reconciledbooleanerforderlichmilliAmountnumbererforderlichinstructedMilliAmountnumberaccountingStatusstringWertependingpartially_bookedbooked
accountingSuggestionobject4 untergeordnete Felder anzeigen
scorestringWertehighmediumlow
historicalMatchingBankTransactionobject2 untergeordnete Felder anzeigen
firestoreIdstringerforderlichID of the bank transaction.
bankAccountIdstringerforderlichID of the bank account.
rationalestringentriesobject[]erforderlich5 untergeordnete Felder anzeigen
accountCodestringcreditAccountstringdebitAccountstringdescriptionstringmilliAmountnumberaccountingSuggestionStatusstringWertependingprocessed
transactionobjecterforderlich15 untergeordnete Felder anzeigen
bookingDatestringbookingDateTimestringvalueDatestringvalueDateTimestringcurrencystringinstructedMilliAmountnumberinstructedCurrencystringfeesAmountnumberfeesCurrencystringexchangeRatenumberexchangeRateTextstringcounterpartyNamestringreferencestringcommunicationstringadditionalInformationstringcashBalanceobject4 untergeordnete Felder anzeigen
dateTimestringdate-timeerforderlichcurrencystringerforderlichamountnumbererforderlichisClosingbooleanerforderlichaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
12 untergeordnete Felder anzeigen
countrystringerforderlichISO 3166-1 alpha-2 country code
postCodestringerforderlichPost code of the address.
townNamestringerforderlichName 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[]2 untergeordnete Felder anzeigen
targetstringerforderlichdataobjecterforderlich1 untergeordnetes Feld anzeigen
confidencenumbererforderlichinvoiceConfirmedMatchesInvoiceMatch[]2 untergeordnete Felder anzeigen
targetstringerforderlichdataobjecterforderlich1 untergeordnetes Feld anzeigen
confidencenumbererforderlichlimitintegererforderlichPage 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)
Bereichbank-accounts:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
bankAccountIdstringerforderlichID of the bank account.
transactionIdstringerforderlichID of the bank transaction.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
statusstringerforderlichReview 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.
Rückgabe
Successful response
dataBankTransactionerforderlich19 untergeordnete Felder anzeigen
firestoreIdstringerforderlichID of the bank transaction.
dateTimestringdate-timeerforderlichexecutionStatusstringerforderlichExecution 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.
workspaceIdstringerforderlichID of the workspace.
bankAccountIdstringerforderlichID of the bank account.
serviceProviderIdstringerforderlichID of the service provider.
reconciledbooleanerforderlichmilliAmountnumbererforderlichinstructedMilliAmountnumberaccountingStatusstringWertependingpartially_bookedbooked
accountingSuggestionobject4 untergeordnete Felder anzeigen
scorestringWertehighmediumlow
historicalMatchingBankTransactionobject2 untergeordnete Felder anzeigen
firestoreIdstringerforderlichID of the bank transaction.
bankAccountIdstringerforderlichID of the bank account.
rationalestringentriesobject[]erforderlich5 untergeordnete Felder anzeigen
accountCodestringcreditAccountstringdebitAccountstringdescriptionstringmilliAmountnumberaccountingSuggestionStatusstringWertependingprocessed
transactionobjecterforderlich15 untergeordnete Felder anzeigen
bookingDatestringbookingDateTimestringvalueDatestringvalueDateTimestringcurrencystringinstructedMilliAmountnumberinstructedCurrencystringfeesAmountnumberfeesCurrencystringexchangeRatenumberexchangeRateTextstringcounterpartyNamestringreferencestringcommunicationstringadditionalInformationstringcashBalanceobject4 untergeordnete Felder anzeigen
dateTimestringdate-timeerforderlichcurrencystringerforderlichamountnumbererforderlichisClosingbooleanerforderlichaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
12 untergeordnete Felder anzeigen
countrystringerforderlichISO 3166-1 alpha-2 country code
postCodestringerforderlichPost code of the address.
townNamestringerforderlichName 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[]2 untergeordnete Felder anzeigen
targetstringerforderlichdataobjecterforderlich1 untergeordnetes Feld anzeigen
confidencenumbererforderlichinvoiceConfirmedMatchesInvoiceMatch[]2 untergeordnete Felder anzeigen
targetstringerforderlichdataobjecterforderlich1 untergeordnetes Feld anzeigen
confidencenumbererforderlichcurl -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
Bereichbank-accounts:read
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
bankAccountIdstringerforderlichID of the bank account.
Abfrageparameter
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.
Standard20
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.
Rückgabe
List of items
dataBalanceHistory[]erforderlichItems of the page, in list order.
5 untergeordnete Felder anzeigen
firestoreIdstringerforderlichID of the balance history.
bankAccountIdstringerforderlichID of the bank account.
workspaceIdstringerforderlichID of the workspace.
yearnumbererforderlichbalancesRecord<string, object>erforderlich4 untergeordnete Felder anzeigen
dateTimestringdate-timeerforderlichcurrencystringerforderlichamountnumbererforderlichisClosingbooleanerforderlichlimitintegererforderlichPage 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.
Bereichbank-accounts:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
bankAccountIdstringerforderlichID of the bank account.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
fileNamestringerforderlichcontentTypestringerforderlichsizeintegererforderlichRückgabe
Successful response
dataAttachmentUploadUrlerforderlich4 untergeordnete Felder anzeigen
uploadUrlstringurierforderlichcontentTypestringerforderlichsizeintegererforderlichattachmentIdstringerforderlichcurl -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.
Bereichbank-accounts:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
bankAccountIdstringerforderlichID of the bank account.
attachmentIdstringerforderlichID of the attachment, returned with its upload URL.
Rückgabe
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"
}
}