| Method | Path | Summary |
|---|---|---|
| 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 |
Paths start with /workspaces/{workspaceId}. GET endpoints need bank-accounts:read, the others bank-accounts:write.
The BankAccount object
firestoreIdstringrequiredID of the bank account.
namestringrequiredproductsstring[]requiredShow 11 values
identityaccountsbeneficiariesbalancestransactionsstatementsdirect_debitsdraft_paymentssingle_paymentsscheduled_paymentsstanding_order_payments
featuresstring[]requiredShow 38 values
identity.detailsaccounts.listaccounts.detailsbeneficiaries.listbeneficiaries.detailsbalances.intradaybalances.closingtransactions.intradaytransactions.historystatements.liststatements.iso_camt053_xmlstatements.pdfdirect_debits.listdirect_debits.detailsdraft_payments.revolut_csvdraft_payments.iso_pain001_ch_xmldraft_payments.iso_pain001_xmldraft_payments.domesticdraft_payments.internationaldraft_payments.bulkdraft_payments.listdraft_payments.detailssingle_payments.domesticsingle_payments.internationalsingle_payments.instantsingle_payments.bulksingle_payments.listsingle_payments.detailsscheduled_payments.domesticscheduled_payments.internationalscheduled_payments.bulkscheduled_payments.listscheduled_payments.detailsstanding_order_payments.domesticstanding_order_payments.internationalstanding_order_payments.bulkstanding_order_payments.liststanding_order_payments.details
usagestringKind of entity: an individual or an organization.
individualA natural person.
organizationA company or another organization.
workspaceIdstringrequiredID of the workspace.
serviceProviderIdstringrequiredID of the service provider.
Show all 22 fieldsHide the field list
consentIdstringID of the read consent.
creationobjectrequiredWhen and by whom the resource was created.
Show 2 child fields
creationDateTimestringdate-timerequiredDate and time when the resource was created.
createdBystringID of the user who created the resource, when recorded.
activationobjectrequiredWhether the resource is enabled, and when and by whom it was last enabled or disabled.
Show 3 child fields
enabledbooleanrequiredWhether the resource is enabled.
updateDateTimestringdate-timerequiredDate and time when enabled was last set.
updatedBystringID of the user who last set enabled, when recorded.
archivedbooleanrequiredisOfflinebooleanrequiredenrichWithCamtbooleantasksnumberrequiredlastRequestedDateForBalancesstringdate-timelastRequestedDateForTransactionsstringdate-timelastTaskRunDateForBalancesstringdate-timelastTaskRunDateForTransactionsstringdate-timelastAvailableDateForBalancesstringlastAvailableDateForTransactionsstringcashAccountsobject[]requiredShow 4 child fields
accountIdentificationsobject[]requiredShow 2 child fields
typestringrequiredKind of identifier of a bank account or of its bank.
Show 14 values
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.
identificationstringrequiredcurrencystringnamestringownerNamestringrelationshipsobjectrequiredShow 4 child fields
readConsentReadConsentcounterpartyCounterpartylatestBalanceobjectShow 2 child fields
datestringrequiredbalanceobjectrequiredShow 4 child fields
dateTimestringdate-timerequiredcurrencystringrequiredamountnumberrequiredisClosingbooleanrequiredrecentBalancesRecord<string, object>Show 2 child fields
datestringrequiredbalanceobjectrequiredShow 4 child fields
dateTimestringdate-timerequiredcurrencystringrequiredamountnumberrequiredisClosingbooleanrequired{
"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
Scopebank-accounts:read
Path parameters
workspaceIdstringrequiredID of the workspace.
Query parameters
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.
Default20
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.
Returns
List of items
Items of the page, in list order.
limitintegerrequiredPage 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
Scopebank-accounts:write
Path parameters
workspaceIdstringrequiredID of the workspace.
bankAccountIdstringrequiredID of the bank account.
Query parameters
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request body
namestringbicstringownerNamestringaccountTypeCodestringShow 23 values
CACCCARDCASHCHARCISHCOMMCPACLLSVLOANMGLDMOMANFCANREXODFTONDPOTHRSACCSLRYSVGSTAXETRANTRASVACC
enabledbooleanenrichWithCamtbooleanReturns
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
Scopebank-accounts:write
Path parameters
workspaceIdstringrequiredID of the workspace.
Returns
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
Scopebank-accounts:write
Path parameters
workspaceIdstringrequiredID of the workspace.
Query parameters
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request body
serviceProviderIdstringrequiredID of the service provider.
accountTypeCodestringrequiredShow 23 values
CACCCARDCASHCHARCISHCOMMCPACLLSVLOANMGLDMOMANFCANREXODFTONDPOTHRSACCSLRYSVGSTAXETRANTRASVACC
countrystringrequiredISO 3166-1 alpha-2 country code
currencystringrequiredISO 4217 currency code
identificationstringrequiredidentificationTypestringrequiredShow 12 values
ibanbbanaccountNumberpanemailmsisdnvirtualAccountIdglobalWalletclabebitcoinAddressbitcoinXpubother
namestringownerNamestringReturns
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
Scopebank-accounts:write
Path parameters
workspaceIdstringrequiredID of the workspace.
bankAccountIdstringrequiredID of the bank account.
Returns
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
Scopebank-accounts:write
Path parameters
workspaceIdstringrequiredID of the workspace.
Query parameters
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request body
bankAccountIdstringrequiredID of the bank account.
typestringrequiredKind of entity: an individual or an organization.
individualA natural person.
organizationA company or another organization.
namestringrequiredaddressPostalAddressrequiredPostal address, with the parts of an ISO 20022 postal address.
Show 12 child fields
countrystringrequiredISO 3166-1 alpha-2 country code
postCodestringrequiredPost code of the address.
townNamestringrequiredName 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.
Returns
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
Scopebank-accounts:read
Path parameters
workspaceIdstringrequiredID of the workspace.
Query parameters
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.
querystringrequiredpageintegerDefault0
sizeintegerDefault20
Returns
Successful response
dataBankTransaction[]requiredShow 19 child fields
firestoreIdstringrequiredID of the bank transaction.
dateTimestringdate-timerequiredexecutionStatusstringrequiredExecution 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.
workspaceIdstringrequiredID of the workspace.
bankAccountIdstringrequiredID of the bank account.
serviceProviderIdstringrequiredID of the service provider.
reconciledbooleanrequiredmilliAmountnumberrequiredinstructedMilliAmountnumberaccountingStatusstringValuespendingpartially_bookedbooked
accountingSuggestionobjectShow 4 child fields
scorestringValueshighmediumlow
historicalMatchingBankTransactionobjectShow 2 child fields
firestoreIdstringrequiredID of the bank transaction.
bankAccountIdstringrequiredID of the bank account.
rationalestringentriesobject[]requiredShow 5 child fields
accountCodestringcreditAccountstringdebitAccountstringdescriptionstringmilliAmountnumberaccountingSuggestionStatusstringValuespendingprocessed
transactionobjectrequiredShow 15 child fields
bookingDatestringbookingDateTimestringvalueDatestringvalueDateTimestringcurrencystringinstructedMilliAmountnumberinstructedCurrencystringfeesAmountnumberfeesCurrencystringexchangeRatenumberexchangeRateTextstringcounterpartyNamestringreferencestringcommunicationstringadditionalInformationstringcashBalanceobjectShow 4 child fields
dateTimestringdate-timerequiredcurrencystringrequiredamountnumberrequiredisClosingbooleanrequiredaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
Show 12 child fields
countrystringrequiredISO 3166-1 alpha-2 country code
postCodestringrequiredPost code of the address.
townNamestringrequiredName 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[]Show 2 child fields
targetstringrequireddataobjectrequiredShow 1 child field
confidencenumberrequiredinvoiceConfirmedMatchesInvoiceMatch[]Show 2 child fields
targetstringrequireddataobjectrequiredShow 1 child field
confidencenumberrequiredcurl '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
Scopebank-accounts:write
Path parameters
workspaceIdstringrequiredID of the workspace.
Returns
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
Scopebank-accounts:write
Path parameters
workspaceIdstringrequiredID of the workspace.
Query parameters
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request body
bankAccountIdstringrequiredID of the bank account.
fromDatestringrequiredtoDatestringrequiredexportTypestringrequiredFormat of the bank transaction export.
Show 13 values
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[]Show 4 child fields
typestringrequiredShow 37 values
account_identificationtransaction_idstatustransaction_codebalancebooking_datebooking_date_timevalue_datevalue_date_timetransaction_amount_signedtransaction_amount_valuetransaction_amount_debittransaction_amount_credittransaction_amount_currencytransaction_amount_textinstructed_amount_valueinstructed_amount_currencyinstructed_amount_textfees_amount_valuefees_amount_currencyfees_amount_textexchange_rate_valueexchange_rate_textcounterparty_namecounterparty_addresscounterparty_account_identificationcommunicationreferenceadditional_informationfull_descriptionsmart_descriptioncustom_stringcustom_numbercustom_booleancustom_datecustom_iso_datecustom_empty
namestringdefaultValuestringformatstringconfigRecord<string, string | number>separatorstringgenerateHeadersbooleantransliteratebooleanmessagingTokenstringisWorkspaceFilebooleanReturns
Successful response
dataBankTransactionExportrequiredShow 4 child fields
startedbooleanrequiredworkspaceIdstringrequiredbankAccountIdstringrequiredfilesobject[]requiredShow 4 child fields
exportIdstringrequiredtargetFileNamestringrequireddownloadUrlstringurirequiredTime-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.
expiresAtstringrequiredInstant 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.
Scopebank-accounts:write
Path parameters
workspaceIdstringrequiredID of the workspace.
Request body
bankAccountIdstringrequiredID of the bank account.
bankTransactionIdsstring[]requiredID of the bank transaction.
Returns
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
Scopebank-accounts:read
Path parameters
workspaceIdstringrequiredID of the workspace.
bankAccountIdstringrequiredID of the bank account.
Query parameters
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.
Default20
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.
Returns
List of items
dataBankTransaction[]requiredItems of the page, in list order.
Show 19 child fields
firestoreIdstringrequiredID of the bank transaction.
dateTimestringdate-timerequiredexecutionStatusstringrequiredExecution 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.
workspaceIdstringrequiredID of the workspace.
bankAccountIdstringrequiredID of the bank account.
serviceProviderIdstringrequiredID of the service provider.
reconciledbooleanrequiredmilliAmountnumberrequiredinstructedMilliAmountnumberaccountingStatusstringValuespendingpartially_bookedbooked
accountingSuggestionobjectShow 4 child fields
scorestringValueshighmediumlow
historicalMatchingBankTransactionobjectShow 2 child fields
firestoreIdstringrequiredID of the bank transaction.
bankAccountIdstringrequiredID of the bank account.
rationalestringentriesobject[]requiredShow 5 child fields
accountCodestringcreditAccountstringdebitAccountstringdescriptionstringmilliAmountnumberaccountingSuggestionStatusstringValuespendingprocessed
transactionobjectrequiredShow 15 child fields
bookingDatestringbookingDateTimestringvalueDatestringvalueDateTimestringcurrencystringinstructedMilliAmountnumberinstructedCurrencystringfeesAmountnumberfeesCurrencystringexchangeRatenumberexchangeRateTextstringcounterpartyNamestringreferencestringcommunicationstringadditionalInformationstringcashBalanceobjectShow 4 child fields
dateTimestringdate-timerequiredcurrencystringrequiredamountnumberrequiredisClosingbooleanrequiredaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
Show 12 child fields
countrystringrequiredISO 3166-1 alpha-2 country code
postCodestringrequiredPost code of the address.
townNamestringrequiredName 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[]Show 2 child fields
targetstringrequireddataobjectrequiredShow 1 child field
confidencenumberrequiredinvoiceConfirmedMatchesInvoiceMatch[]Show 2 child fields
targetstringrequireddataobjectrequiredShow 1 child field
confidencenumberrequiredlimitintegerrequiredPage 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)
Scopebank-accounts:write
Path parameters
workspaceIdstringrequiredID of the workspace.
bankAccountIdstringrequiredID of the bank account.
transactionIdstringrequiredID of the bank transaction.
Query parameters
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request body
statusstringrequiredReview 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.
Returns
Successful response
dataBankTransactionrequiredShow 19 child fields
firestoreIdstringrequiredID of the bank transaction.
dateTimestringdate-timerequiredexecutionStatusstringrequiredExecution 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.
workspaceIdstringrequiredID of the workspace.
bankAccountIdstringrequiredID of the bank account.
serviceProviderIdstringrequiredID of the service provider.
reconciledbooleanrequiredmilliAmountnumberrequiredinstructedMilliAmountnumberaccountingStatusstringValuespendingpartially_bookedbooked
accountingSuggestionobjectShow 4 child fields
scorestringValueshighmediumlow
historicalMatchingBankTransactionobjectShow 2 child fields
firestoreIdstringrequiredID of the bank transaction.
bankAccountIdstringrequiredID of the bank account.
rationalestringentriesobject[]requiredShow 5 child fields
accountCodestringcreditAccountstringdebitAccountstringdescriptionstringmilliAmountnumberaccountingSuggestionStatusstringValuespendingprocessed
transactionobjectrequiredShow 15 child fields
bookingDatestringbookingDateTimestringvalueDatestringvalueDateTimestringcurrencystringinstructedMilliAmountnumberinstructedCurrencystringfeesAmountnumberfeesCurrencystringexchangeRatenumberexchangeRateTextstringcounterpartyNamestringreferencestringcommunicationstringadditionalInformationstringcashBalanceobjectShow 4 child fields
dateTimestringdate-timerequiredcurrencystringrequiredamountnumberrequiredisClosingbooleanrequiredaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
Show 12 child fields
countrystringrequiredISO 3166-1 alpha-2 country code
postCodestringrequiredPost code of the address.
townNamestringrequiredName 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[]Show 2 child fields
targetstringrequireddataobjectrequiredShow 1 child field
confidencenumberrequiredinvoiceConfirmedMatchesInvoiceMatch[]Show 2 child fields
targetstringrequireddataobjectrequiredShow 1 child field
confidencenumberrequiredcurl -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
Scopebank-accounts:read
Path parameters
workspaceIdstringrequiredID of the workspace.
bankAccountIdstringrequiredID of the bank account.
Query parameters
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.
Default20
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.
Returns
List of items
dataBalanceHistory[]requiredItems of the page, in list order.
Show 5 child fields
firestoreIdstringrequiredID of the balance history.
bankAccountIdstringrequiredID of the bank account.
workspaceIdstringrequiredID of the workspace.
yearnumberrequiredbalancesRecord<string, object>requiredShow 4 child fields
dateTimestringdate-timerequiredcurrencystringrequiredamountnumberrequiredisClosingbooleanrequiredlimitintegerrequiredPage 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.
Scopebank-accounts:write
Path parameters
workspaceIdstringrequiredID of the workspace.
bankAccountIdstringrequiredID of the bank account.
Query parameters
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request body
fileNamestringrequiredcontentTypestringrequiredsizeintegerrequiredReturns
Successful response
dataAttachmentUploadUrlrequiredShow 4 child fields
uploadUrlstringurirequiredcontentTypestringrequiredsizeintegerrequiredattachmentIdstringrequiredcurl -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.
Scopebank-accounts:write
Path parameters
workspaceIdstringrequiredID of the workspace.
bankAccountIdstringrequiredID of the bank account.
attachmentIdstringrequiredID of the attachment, returned with its upload URL.
Returns
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"
}
}