create_account
POST
/admin/accounts
curl --request POST \ --url http://localhost:3001/admin/accounts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{"broker_connection_code":"string","code":"string","external_account_ref":"string","portfolio_id":"00000000-0000-0000-0000-000000000000","status":"string"}'import requests
url = "http://localhost:3001/admin/accounts"
payload = { "broker_connection_code": "string", "code": "string", "external_account_ref": "string", "portfolio_id": "00000000-0000-0000-0000-000000000000", "status": "string"}headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "http://localhost:3001/admin/accounts";
let payload = json!({ "broker_connection_code": "string", "code": "string", "external_account_ref": "string", "portfolio_id": "00000000-0000-0000-0000-000000000000", "status": "string" });
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.post(url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
broker_connection_code
required
string
code
required
string
external_account_ref
required
string
portfolio_id
string format: uuid
status
required
string
Example generated
{ "broker_connection_code": "example", "code": "example", "external_account_ref": "example", "portfolio_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "status": "example"}Responses
Section titled “Responses”Created
Media typeapplication/json
object
broker_connection_code
required
string
code
required
string
created_at
required
string format: date-time
external_account_ref
required
string
id
required
string format: uuid
portfolio_id
string format: uuid
status
required
string
updated_at
required
string format: date-time
Example generated
{ "broker_connection_code": "example", "code": "example", "created_at": "2026-04-15T12:00:00Z", "external_account_ref": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "portfolio_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "status": "example", "updated_at": "2026-04-15T12:00:00Z"}Already exists