Clean up connections
Connections you no longer need still count toward your monthly usage if they sync. A connection is considered active for billing if it has synced at least 1 time during the month (see FAQ: How are connections per month measured?). Periodically removing stale connections keeps your active-connection count — and your bill — accurate.
When to delete a connection
Vezgo does not expose a "list all users" endpoint, since each user is identified by your own loginName. To find unnecessary connections, iterate through the users in your own system and, for each one, list their Vezgo accounts and decide which are no longer needed.
Common signals that a connection can be removed:
- The user has churned, deleted their account in your application, or asked you to delete their data.
- The connection has been in a
disconnectedorerrorstate for a long time and the user has not attempted to reconnect. - It is a test, duplicate, or otherwise abandoned connection.
- The user explicitly removed the connection in your UI.
How to delete a connection
For each user you want to clean up:
Obtain a fresh user token for that user — see Authentication. Tokens are short-lived (10 minutes by default).
List the user's connections:
curl 'VEZGO_API_URL/accounts' \
-H 'Authorization: Bearer VEZGO_USER_TOKEN'Delete each connection that is no longer needed:
curl 'VEZGO_API_URL/accounts/ACCOUNT_ID' \
-X DELETE \
-H 'Authorization: Bearer VEZGO_USER_TOKEN'A successful delete returns
204 No Content.
Or via the SDK:
const user = vezgo.login('USERNAME_FROM_YOUR_SYSTEM');
const accounts = await user.accounts.getList();
for (const account of accounts) {
if (shouldDelete(account)) {
await user.accounts.remove(account.id);
}
}
See the Vezgo API reference for full request and response details.
What deletion does
- Permanently removes the Vezgo account and all of its synced data (balances, transactions, history, positions). This cannot be undone.
- Only removes the link between Vezgo and the exchange / wallet — it does not affect the user's actual account at the provider, and does not revoke any API keys the user generated.
- Frees up the connection so it no longer counts toward your active-connection total in subsequent months.
Deletion is irreversible. If you may need the data later, export it before calling DELETE. If you only want to stop syncing temporarily, leaving the account in a disconnected state is enough — disconnected accounts that don't sync in a given month are not counted as active.