---
title: "Batch create user account entity relationships"
method: POST
path: "/v2/user_accounts/{user_account_id}/entity_relationships/batch"
tags: ["User Account"]
---

# Batch create user account entity relationships

`POST /v2/user_accounts/{user_account_id}/entity_relationships/batch`

## Request

- Base URL: `https://api.sandbox.lead.bank`
- URL: `https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/entity_relationships/batch`
- Auth: HTTP bearer

Add Entities to a User Account under a single relationship type.

## Path parameters

- `user_account_id` string, required: The ID of the User Account object.

## Headers

- `Idempotency-Key` string, required

## Request body

- BatchCreateEntityRelationshipsRequest: Request body for batch creating entity relationships on an account.
  - `entity_ids` EntityID[], required: List of entity IDs to associate with the account under the specified relationship type.
  - `relationship_type` 'account_holder' | 'authorized_signer' | 'authorized_user', required: Indicates the type of Entity

## Response `200`

Entity relationships created successfully.

- object
  - `user_account_id` string, required: The ID of the User Account object.
  - `relationship_type` 'account_holder' | 'authorized_signer' | 'authorized_user', required: Indicates the type of Entity
  - `entity_ids` EntityID[], required: List of entity IDs associated with the user account under the specified relationship type.

## Other responses

- `400`: The request could not be parsed (`request_malformed`), or the `Idempotency-Key` header is missing (`idempotency_key_missing`).
- `403`: `code` is one of: `authentication_missing` (the request has no credentials), `token_invalid` (the bearer token is missing, expired, or invalid, or does not grant `user_account/read_write`), `source_ip_not_permitted` (the request came from an IP address that is not on your program's allowlist).
- `404`: No user account exists with this ID, or it is not visible to your program.
- `409`: A concurrent request with the same `Idempotency-Key` is still in flight.
- `422`: The request was parsed but cannot be processed. `code` is one of: `parameters_invalid` (`relationship_type` or `entity_ids` is missing or invalid; an entity appears twice (`parameter_duplicated`); or the relationship type would exceed 20 entities (`parameter_bound_exceeded`). All failures are returned at once), `related_object_invalid` (an entity does not exist or belongs to another program; `errors[].code` is `reference_not_found`, with the path in `parameters`), `related_object_not_ready` (an entity is not eligible for the relationship type (`entity_role_missing`), with the entity's path in `parameters`; update the entity, then retry the request unchanged), `related_object_incompatible` (adding the entities would mix consumer and commercial account holders (`account_holder_types_mismatched`), or an account holder is a lead or partner entity), `lead_control_restricted` (your program is not enabled for User Accounts v2; `errors[].code` is `feature_not_enabled`), `idempotency_request_mismatched` (this `Idempotency-Key` was used with a different request body).
- `429`: Rate limit exceeded.
- `500`: Internal server error. Retry with the same `Idempotency-Key`.
- `503`: The service or endpoint is temporarily unavailable. Retry after a delay.
- `504`: An upstream system did not respond in time. Retry with backoff, and with the same `Idempotency-Key` on a `POST` or `PATCH`.

## Changes

- **2026-11-03** `2c659854496e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lead/apis/lead-bank/changes/v2/user_accounts/:user_account_id/entity_relationships/batch/post.md)

---

[API](https://skmtc.dev/lead/apis/lead-bank.md) - [All operations](https://skmtc.dev/lead/apis/lead-bank/llms.txt) - [OpenAPI document](https://skmtc.dev/lead/apis/lead-bank/revisions/2c659854496e?raw)
