curl --request POST \
--url https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "user_account_xyz123",
"status": "active",
"status_reason": "client_closed",
"features": [
"deposit"
],
"entities": {
"account_holder_type": "consumer"
},
"details": {
"underwriting": {
"is_secured": true,
"is_mla": true,
"underwriting_grade": "<string>",
"currency_code": "USD",
"available_credit": 123,
"limit": 123,
"max_limit": 123,
"scra": {
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"report": {
"pulled_at": "2023-11-07T05:31:56Z",
"source": "equifax",
"score": 575,
"non_score_value": "unestablished"
}
},
"adverse_action_notice": {
"delivered_at": "2023-11-07T05:31:56Z",
"reason": "<string>",
"delivery_method": "email"
}
},
"product_name": "<string>",
"documents": [
{
"file_id": "file_7RwQ2mK9pL4xT1vN8jS5",
"timestamp": "2026-09-14T14:20:11Z",
"version": "v2"
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"application_id": "application_xyz123",
"legacy_documents": [
{
"document_id": "loan_agreement_01_2026.pdf",
"type": "aan",
"displayed_at": "2023-11-07T05:31:56Z",
"consented_at": "2023-11-07T05:31:56Z",
"version": "v1"
}
],
"client_account_id": "<string>",
"balance_sheet_model": "held_for_investment",
"product_config_id": "product_config_xyz123",
"closed_at": "2023-11-07T05:31:56Z"
}{
"code": "idempotency_key_missing",
"message": "This endpoint requires an Idempotency-Key header. Add one and resend the request."
}{
"code": "token_invalid",
"message": "The bearer token is missing, expired, malformed, or invalid."
}{
"code": "object_not_found",
"message": "No object exists at the requested ID, or it is not visible to this caller."
}{
"code": "idempotency_key_in_use",
"message": "A concurrent request using this Idempotency-Key is still in flight."
}{
"code": "object_state_conflict",
"message": "The object is not in the state this request assumed. Fetch its current state before retrying."
}{
"code": "rate_limit_exceeded",
"message": "You have exceeded the rate limit for this endpoint. Retry with backoff."
}{
"code": "internal_server_error",
"message": "Something went wrong on our end. Contact Lead with the Request-Id if this persists."
}{
"code": "service_unavailable",
"message": "The service is temporarily unavailable. Retry after the indicated delay."
}{
"code": "gateway_timeout",
"message": "An upstream system timed out. Retry with backoff."
}Activate a User Account
Activate an inactive User Account. You can also activate a closed User Account to correct a mistaken closure. See Correcting a mistaken closure.
curl --request POST \
--url https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v2/user_accounts/{user_account_id}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "user_account_xyz123",
"status": "active",
"status_reason": "client_closed",
"features": [
"deposit"
],
"entities": {
"account_holder_type": "consumer"
},
"details": {
"underwriting": {
"is_secured": true,
"is_mla": true,
"underwriting_grade": "<string>",
"currency_code": "USD",
"available_credit": 123,
"limit": 123,
"max_limit": 123,
"scra": {
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"report": {
"pulled_at": "2023-11-07T05:31:56Z",
"source": "equifax",
"score": 575,
"non_score_value": "unestablished"
}
},
"adverse_action_notice": {
"delivered_at": "2023-11-07T05:31:56Z",
"reason": "<string>",
"delivery_method": "email"
}
},
"product_name": "<string>",
"documents": [
{
"file_id": "file_7RwQ2mK9pL4xT1vN8jS5",
"timestamp": "2026-09-14T14:20:11Z",
"version": "v2"
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"application_id": "application_xyz123",
"legacy_documents": [
{
"document_id": "loan_agreement_01_2026.pdf",
"type": "aan",
"displayed_at": "2023-11-07T05:31:56Z",
"consented_at": "2023-11-07T05:31:56Z",
"version": "v1"
}
],
"client_account_id": "<string>",
"balance_sheet_model": "held_for_investment",
"product_config_id": "product_config_xyz123",
"closed_at": "2023-11-07T05:31:56Z"
}{
"code": "idempotency_key_missing",
"message": "This endpoint requires an Idempotency-Key header. Add one and resend the request."
}{
"code": "token_invalid",
"message": "The bearer token is missing, expired, malformed, or invalid."
}{
"code": "object_not_found",
"message": "No object exists at the requested ID, or it is not visible to this caller."
}{
"code": "idempotency_key_in_use",
"message": "A concurrent request using this Idempotency-Key is still in flight."
}{
"code": "object_state_conflict",
"message": "The object is not in the state this request assumed. Fetch its current state before retrying."
}{
"code": "rate_limit_exceeded",
"message": "You have exceeded the rate limit for this endpoint. Retry with backoff."
}{
"code": "internal_server_error",
"message": "Something went wrong on our end. Contact Lead with the Request-Id if this persists."
}{
"code": "service_unavailable",
"message": "The service is temporarily unavailable. Retry after the indicated delay."
}{
"code": "gateway_timeout",
"message": "An upstream system timed out. Retry with backoff."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
A unique key for this request, up to 255 characters. Retrying with the same key and body returns the original response without applying the update twice. See Idempotency.
255Path Parameters
User Account ID The ID of the User Account object.
^user_account_\w+$"user_account_xyz123"
Response
User account activated successfully.
A user account object
The ID of the User Account object.
^user_account_\w+$"user_account_xyz123"
Current state of the user account
active, inactive, closed Machine-readable reason for the current status
client_closed, entity_closed, frozen, dormant, active, paid_off, charged_off, canceled, other Features granted to the user account.
A feature of the user account
deposit, credit_with_underwriting, credit_without_underwriting Entity relationships associated with the user account (response only)
Show child attributes
Show child attributes
Core details of the user account
Show child attributes
Show child attributes
Partner's name for their product
Compliance documents linked to the user account. Each entry references a file uploaded with the Files API.
Show child attributes
Show child attributes
A set of key-value pairs that can be used to store additional information related to this object.
Show child attributes
Show child attributes
Creation timestamp
Last update timestamp
Unique identifier for the application. Prefixed with application_.
^application_\w+$"application_xyz123"
Document entries created on v0 User Accounts, returned exactly as sent. Read only: ignored if included on a POST or PATCH.
Show child attributes
Show child attributes
The identifier you assigned in an Account file. Present only on user
accounts created through file upload. Omitted on user accounts created
through the API, which are identified only by id.
How Lead carries the user account's credit on its balance sheet.
held_for_investment, held_for_sale The id of the product configuration the user account was created under.
null only on user accounts created before product config ids existed.
^product_config_\w+$"product_config_xyz123"
Timestamp when the user account was closed. Updated by /close endpoint.
Was this page helpful?

