POST /v2/user_accounts, update it with PATCH /v2/user_accounts/{id}, and read it with GET /v2/user_accounts/{id}. POST and PATCH require an Idempotency-Key header of up to 255 characters. See Idempotency.
Fields
Features
You set features withrequested_features on create. The user account returns what it was granted as features. Each feature has its own set of required fields, and Lead checks them when you create the user account.
deposit. The user account holds deposits, such as checking or savings.credit_with_underwriting. The user account extends credit backed by an approved application. Requiresapplication_id,details.underwriting, andbalance_sheet_model. At least one account holder must be eligible foraccount_holder. A minor account holder can be on the user account, but not as its only holder.credit_without_underwriting. The user account extends credit with no underwriting decision behind it, such as a courtesy overdraft draw. Requiresbalance_sheet_model. Does not requireapplication_idordetails.underwriting.
422. Ask your Technical Account Manager to enable additional features if you believe you are seeing a 422 in error.
You can add features with PATCH, but you cannot remove them. When you patch requested_features, send the full list, not only the new values.
Balance sheet model
balance_sheet_model records how Lead carries the user account’s credit on its balance sheet:
held_for_investment. Lead intends to hold any loan receivables belonging to this user account for the foreseeable future.held_for_sale. Any loan receivables belonging to this user account are earmarked to be sold.
requested_features includes a credit feature. Leave it out on deposit-only user accounts. Lead checks the value against the models your program allows, even if your program allows only one.
You cannot change balance_sheet_model after creation. Lead may change it from held_for_investment to held_for_sale if the user account is tagged such that all future loan receivables created should be earmarked to be sold.
Product config
product_config_id identifies the product configuration your Lead team set up for your program. Your Technical Account Manager gives you the ID. Send it on every create request. Lead checks that it exists and belongs to your program.
You cannot change product_config_id after creation. User accounts created before product configs existed return null.
You cannot retrieve a product config yet. Store the ID your Technical Account Manager gives you. A retrievable Product Config object is planned, and the IDs you send today will keep working when it ships.
The entities block
Lead sets
account_holder_type from the entities you list as account holders:
- Individuals produce
consumer. - Businesses and sole proprietors produce
commercial. You can combine the two on one user account. - You cannot mix individuals with businesses or sole proprietors as account holders.
account_holder or minor_account_holder for entities in account_holders, authorized_signer for authorized_signers, and authorized_user for authorized_users. minor_account_holder applies only if your program is approved for minor account holders. Create entities with the Entity API first, and check eligibility on the entity before you reference it. See Entity Eligibility.
When the user account references an application, its account holder type must match the application’s. Its account holders and authorized signers must also match the application’s when you create the user account. After that, you can change them through the entity relationships endpoints.
The details block
details.underwriting
If you send
report, include pulled_at and source, plus exactly one of score or non_score_value:
details.adverse_action_notice
Send all three fields or none.Documents
Each entry indocuments links a compliance document, like an agreement, disclosure, or consent, to the user account. The document is a file you uploaded with the Files API. Upload the file with POST /v2/files, declaring its type, then link the returned file_id on the user account.
Each file has one type, which you declare when you upload it. Lead takes the type from the file, so document entries do not carry type, and the user account does not return it. Retrieve it with GET /v2/files/{id}. The file’s type must be one of the compliance document types that the user account accepts. The full list is in The type enum.
Each entry has these fields:
file_id(required). Afile_ID from the Files API. Lead checks that the file exists and belongs to your program.timestamp(required). When your customer was shown or agreed to the document, not when you uploaded the file. RFC 3339, UTC. It can’t be more than 5 minutes ahead of Lead’s clock.version(optional). Your label for telling apart two documents of the same type on one user account, like two versions of your terms.
documentsis required on create, and an empty array is valid. Send[]when you have no documents to link yet, then add them later with aPATCH.- Each file appears at most once per user account. If one document serves two types, upload it once for each type. You can link several files of the same type, like two versions of your terms.
- One file can back many user accounts. Upload a static document like a fee schedule once and link it everywhere it applies.
- A supplied array replaces the whole array. To add a document, send every existing entry plus the new one. Lead re-checks every
file_id. - When your customer accepts a new version, keep the old entry and add a new one with its own
file_id. A file never changes after upload, so a new version is a new file. - A request that breaks one of these rules returns
422 parameters_invalidnaming the entry.
User accounts created on v0
When you read a user account created on v0 through v2, the document entries you sent through v0 come back inlegacy_documents, exactly as you sent them, including document_id, type, displayed_at or consented_at, and version. documents holds only the files you link on v2.
legacy_documents is read only. If a POST or PATCH includes it, Lead ignores it and returns no error.

