Detach Financial Account from Authorized User
The /api/subProfiles/detachFromFinancialAccount endpoint dissociates a financial account from a specific subprofile (authorized user) within a business customer's account. Once detached, the subprofile loses all access rights to that financial account. This is a critical access-management operation for maintaining least-privilege security across your organization.
Endpoint
POST /api/subProfiles/detachFromFinancialAccount
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint when a subprofile (authorized user) should no longer have access to a specific financial account — for example, when an employee leaves the organization, changes roles, or when a business partner relationship ends. It ensures that subprofiles only retain access to the financial accounts relevant to their current responsibilities. Pairing this call with a review of remaining subprofile permissions is recommended after any personnel or role change.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| SubProfileId | integer (int32) | Yes | The unique numeric identifier of the subprofile (authorized user) to detach from the financial account. |
| FinancialAccoutId | string | Yes | The unique identifier of the financial account to be detached from the subprofile. Note: the parameter name contains a typo ("Accout") — use exactly as shown. |
Response
200 OK
A 200 status indicates the financial account was successfully detached from the subprofile. No response body is returned.
{}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required query parameters or invalid parameter format |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions — caller does not have rights to manage subprofile access |
| 404 | SubProfileId or FinancialAccoutId not found, or the account is not currently attached to the subprofile |
| 500 | Internal server error |
Common Mistakes
- Omitting either
SubProfileIdorFinancialAccoutId— both query parameters are required; the request will fail with 400 if either is missing. - Misspelling the
FinancialAccoutIdparameter — the API uses this exact spelling (note the missing "n" in "Account"); use it verbatim. - Attempting to detach a financial account that is not currently attached to the specified subprofile — this will result in a 404.
- Using this endpoint for personal customers — subprofiles are only available for business customers.
Related Endpoints
POST /api/subProfiles/attachToFinancialAccount— Attach a financial account to an authorized user (subprofile)GET /api/subProfiles— List all subprofiles for a business customerPOST /api/subProfiles— Create a new subprofile (authorized user)GET /api/subProfiles/{subProfileId}/financialAccounts— Retrieve financial accounts currently attached to a subprofile
Example
curl -X POST "https://api.banking.netevia.dev/api/subProfiles/detachFromFinancialAccount?SubProfileId=4821&FinancialAccoutId=XXXXXXXXXX" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" 200Success
