curl https://api.yoshi.ai/apex/accounts/by-request/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer yoshi_3xK9mP..."
import httpx
response = httpx.get(
"https://api.yoshi.ai/apex/accounts/by-request/550e8400-e29b-41d4-a716-446655440000",
headers={"Authorization": "Bearer yoshi_3xK9mP..."},
)
data = response.json()
if data["status"] == "ready":
print(f"Account ready: {data['account']['id']}")
elif data["status"] == "failed":
print(f"Failed: {data['error']}")
else:
print("Still pending — try again in a few seconds")
const response = await fetch(
"https://api.yoshi.ai/apex/accounts/by-request/550e8400-e29b-41d4-a716-446655440000",
{
headers: { Authorization: "Bearer yoshi_3xK9mP..." },
}
);
const data = await response.json();
if (data.status === "ready") {
console.log(`Account ready: ${data.account.id}`);
} else if (data.status === "failed") {
console.log(`Failed: ${data.error}`);
} else {
console.log("Still pending — try again in a few seconds");
}
{
"status": "ready",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"account": {
"id": "acc_brok_abc123",
"name": "Brokerage Account",
"type": "investment",
"subtype": "brokerage",
"status": "active",
"external_id": "ext_apex_456",
"external_source": "apex",
"apex_account_number": "8AA000001",
"as_of": "2026-04-15T12:00:00.000Z",
"created_at": "2026-04-15T12:00:00.000Z",
"updated_at": "2026-04-15T12:00:00.000Z"
},
"staging_account": {
"id": "stg_abc123",
"account_number": "8AA000001",
"apex_person_id": "apx_person_789",
"apex_state": "COMPLETE",
"description": "Long-term investments",
"owner_user_id": "usr_xyz",
"as_of": "2026-04-15T12:00:00.000Z",
"created_at": "2026-04-15T12:00:00.000Z",
"updated_at": "2026-04-15T12:00:00.000Z"
},
"staging_person": {
"id": "stg_person_789",
"owner_user_id": "usr_xyz",
"status": "COMPLETE",
"created_at": "2026-04-15T12:00:00.000Z",
"updated_at": "2026-04-15T12:00:00.000Z"
}
}
{
"status": "pending",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
{
"status": "failed",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"error": "Apex account creation failed."
}
Brokerage
Get brokerage account creation status
Poll GET /apex/accounts/by-request/ to check brokerage account creation status. Returns ready, pending, or failed states.
GET
/
apex
/
accounts
/
by-request
/
{request_id}
curl https://api.yoshi.ai/apex/accounts/by-request/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer yoshi_3xK9mP..."
import httpx
response = httpx.get(
"https://api.yoshi.ai/apex/accounts/by-request/550e8400-e29b-41d4-a716-446655440000",
headers={"Authorization": "Bearer yoshi_3xK9mP..."},
)
data = response.json()
if data["status"] == "ready":
print(f"Account ready: {data['account']['id']}")
elif data["status"] == "failed":
print(f"Failed: {data['error']}")
else:
print("Still pending — try again in a few seconds")
const response = await fetch(
"https://api.yoshi.ai/apex/accounts/by-request/550e8400-e29b-41d4-a716-446655440000",
{
headers: { Authorization: "Bearer yoshi_3xK9mP..." },
}
);
const data = await response.json();
if (data.status === "ready") {
console.log(`Account ready: ${data.account.id}`);
} else if (data.status === "failed") {
console.log(`Failed: ${data.error}`);
} else {
console.log("Still pending — try again in a few seconds");
}
{
"status": "ready",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"account": {
"id": "acc_brok_abc123",
"name": "Brokerage Account",
"type": "investment",
"subtype": "brokerage",
"status": "active",
"external_id": "ext_apex_456",
"external_source": "apex",
"apex_account_number": "8AA000001",
"as_of": "2026-04-15T12:00:00.000Z",
"created_at": "2026-04-15T12:00:00.000Z",
"updated_at": "2026-04-15T12:00:00.000Z"
},
"staging_account": {
"id": "stg_abc123",
"account_number": "8AA000001",
"apex_person_id": "apx_person_789",
"apex_state": "COMPLETE",
"description": "Long-term investments",
"owner_user_id": "usr_xyz",
"as_of": "2026-04-15T12:00:00.000Z",
"created_at": "2026-04-15T12:00:00.000Z",
"updated_at": "2026-04-15T12:00:00.000Z"
},
"staging_person": {
"id": "stg_person_789",
"owner_user_id": "usr_xyz",
"status": "COMPLETE",
"created_at": "2026-04-15T12:00:00.000Z",
"updated_at": "2026-04-15T12:00:00.000Z"
}
}
{
"status": "pending",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
{
"status": "failed",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"error": "Apex account creation failed."
}
Use this endpoint to check the progress of a brokerage account creation that returned a
The account was created successfully. The response includes the full account details.
The account is still being created.
The account creation failed.
202 response. Poll until the status field is "ready" or "failed".
Path parameters
string
required
The
request_id you provided when creating the brokerage account.Response
The response always returns HTTP 200 with astatus field indicating the current state of the request.
status: "ready"
The account was created successfully. The response includes the full account details.
string
"ready" — the account is ready.string
The request identifier.
object
The canonical account record. See Create brokerage account for field details.
object
The staging record for the Apex account. See Create brokerage account for field details.
object
The staging record for the associated Apex person. See Create brokerage account for field details.
status: "pending"
The account is still being created.
string
"pending" — creation is in progress.string
The request identifier.
status: "failed"
The account creation failed.
string
"failed" — creation did not succeed.string
The request identifier.
string
A description of why the account creation failed.
Error responses
| Status | Description |
|---|---|
| 403 | The brokerage account feature is not enabled for your account. |
| 404 | No account creation request found for the given request_id. |
curl https://api.yoshi.ai/apex/accounts/by-request/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer yoshi_3xK9mP..."
import httpx
response = httpx.get(
"https://api.yoshi.ai/apex/accounts/by-request/550e8400-e29b-41d4-a716-446655440000",
headers={"Authorization": "Bearer yoshi_3xK9mP..."},
)
data = response.json()
if data["status"] == "ready":
print(f"Account ready: {data['account']['id']}")
elif data["status"] == "failed":
print(f"Failed: {data['error']}")
else:
print("Still pending — try again in a few seconds")
const response = await fetch(
"https://api.yoshi.ai/apex/accounts/by-request/550e8400-e29b-41d4-a716-446655440000",
{
headers: { Authorization: "Bearer yoshi_3xK9mP..." },
}
);
const data = await response.json();
if (data.status === "ready") {
console.log(`Account ready: ${data.account.id}`);
} else if (data.status === "failed") {
console.log(`Failed: ${data.error}`);
} else {
console.log("Still pending — try again in a few seconds");
}
{
"status": "ready",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"account": {
"id": "acc_brok_abc123",
"name": "Brokerage Account",
"type": "investment",
"subtype": "brokerage",
"status": "active",
"external_id": "ext_apex_456",
"external_source": "apex",
"apex_account_number": "8AA000001",
"as_of": "2026-04-15T12:00:00.000Z",
"created_at": "2026-04-15T12:00:00.000Z",
"updated_at": "2026-04-15T12:00:00.000Z"
},
"staging_account": {
"id": "stg_abc123",
"account_number": "8AA000001",
"apex_person_id": "apx_person_789",
"apex_state": "COMPLETE",
"description": "Long-term investments",
"owner_user_id": "usr_xyz",
"as_of": "2026-04-15T12:00:00.000Z",
"created_at": "2026-04-15T12:00:00.000Z",
"updated_at": "2026-04-15T12:00:00.000Z"
},
"staging_person": {
"id": "stg_person_789",
"owner_user_id": "usr_xyz",
"status": "COMPLETE",
"created_at": "2026-04-15T12:00:00.000Z",
"updated_at": "2026-04-15T12:00:00.000Z"
}
}
{
"status": "pending",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
{
"status": "failed",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"error": "Apex account creation failed."
}
Last modified on April 16, 2026
Was this page helpful?