Creating User Connections

Creating User Connections

This endpoint creates a directional link between two Netevia users. Either user can be a sub-account, primary account, or consumer. Once established, the connection associates the initiating user (fromUserId) with the target user (toUserId), enabling shared account visibility or delegated access workflows supported by the platform.

Endpoint

POST /api/LinkedAccount/link

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 partner needs to associate two user profiles within the Netevia platform — for example, linking a sub-account user to a primary account holder, or connecting a consumer to a business user. This is typically called during onboarding flows where account relationships must be established programmatically. The link enables downstream operations that depend on user associations, such as delegated transfers or shared account access.

Request Body

FieldTypeRequiredDescription
fromUserIdinteger (int32)YesThe ID of the user initiating the connection. Can be a sub-account, primary account, or consumer.
toUserIdinteger (int32)YesThe ID of the user to whom the connection will be made. Can be a sub-account, primary account, or consumer.
{
  "fromUserId": 100234,
  "toUserId": 100567
}

Response

200 OK

The response is one of two possible schemas depending on the operation context:

BoardingResponse

FieldTypeDescription
profileIdinteger (int32)The profile ID associated with the operation result.
errorsstring | nullError message string if the operation encountered issues; otherwise null.
successbooleanIndicates whether the connection was successfully created.
changeLogarray | nullList of change log entries describing what was modified during the operation.

changeLog item fields:

FieldTypeDescription
requestTypeinteger (int32)Numeric code representing the type of banking request performed.
changesstring | nullDescription of the specific change that was applied.

OpenFinancialAccountResponse (extends BoardingResponse)

FieldTypeDescription
profileIdinteger (int32)The profile ID associated with the operation result.
errorsstring | nullError message string if applicable; otherwise null.
successbooleanIndicates whether the connection was successfully created.
changeLogarray | nullList of change log entries.
financialAccountIdstring | nullThe ID of the financial account opened or associated as part of this operation, if applicable.
{
  "profileId": 100234,
  "errors": null,
  "success": true,
  "changeLog": [
    {
      "requestType": 3,
      "changes": "User link established between profileId 100234 and profileId 100567"
    }
  ]
}

Error Codes

CodeWhen it happens
400Missing required fields (fromUserId or toUserId) or invalid user IDs provided
401Token missing, expired, or invalid
403Insufficient permissions to link the specified user accounts
404One or both of the specified user IDs do not exist
500Internal server error

Common Mistakes

  • Providing a fromUserId or toUserId that does not correspond to an existing Netevia user profile will result in a 400 or 404 error.
  • Submitting string values for fromUserId or toUserId instead of integers will cause a 400 validation error.
  • Using an expired or missing Bearer token will result in a 401 Unauthorized response.
  • Attempting to link the same user to themselves (identical fromUserId and toUserId) may result in a 400 BadRequest.

Related Endpoints

  • POST /api/auth/v2 — Obtain a Bearer token for authentication
  • POST /api/auth/refresh — Refresh an expiring Bearer token
  • GET /api/LinkedAccount — Retrieve existing linked account connections for a user

Example

curl -X POST https://api.banking.netevia.dev/api/LinkedAccount/link \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fromUserId": 100234,
    "toUserId": 100567
  }'
Body Params
Headers
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json