Most routes require a JWT access token. Public routes are /, /docs, /token, /users/login, and /users/create.
Fetch a token by posting the local token payload to /token:
curl -X POST http://localhost:5000/token \
-H "Content-Type: application/json" \
-d '{"token":"all"}'
The response includes access_token. Send that value on protected requests using the bearer authorization header:
curl http://localhost:5000/users/read \
-H "Authorization: Bearer <access_token>"
| Route | Methods | Description | Query Parameters | JSON Body |
|---|---|---|---|---|
/ | GET | Serve the static AGM API landing page. | ||
/account_contacts/create | POST | Create a relationship record between an account and a contact. |
| |
/account_contacts/delete | POST | Delete account-contact relationship records that match the provided query payload. |
| |
/account_contacts/read | GET | Read account-contact relationship records filtered by id, account, contact, or entity. |
| |
/account_contacts/update | POST | Update an account-contact relationship selected by the incoming query payload. |
| |
/accounts/contacts_screenings_summary | GET | Read the contact and screening summary for a single account. |
| |
/accounts/create | POST | Create an account record in the AGM database. |
| |
/accounts/ibkr/account_email | POST | Update the email address associated with an IBKR account user. |
| |
/accounts/ibkr/active_bank_instructions | POST | Read the active bank instructions available for an IBKR cash instruction. |
| |
/accounts/ibkr/business_and_occupation | GET | Read the business and occupation types from the IBKR service. | ||
/accounts/ibkr/change_financial_information | POST | Update the financial information fields held by IBKR for an account. |
| |
/accounts/ibkr/clp_capability | POST | Enable CLP capability for an IBKR account, optionally with supporting documents. |
| |
/accounts/ibkr/deposit | POST | Create or submit an IBKR deposit instruction for an account. |
| |
/accounts/ibkr/details | GET | Read detailed account information from the IBKR service. |
| |
/accounts/ibkr/documents | POST | Submit account documents to the IBKR service. |
| |
/accounts/ibkr/fee_template | POST | Apply an IBKR fee template to an account. |
| |
/accounts/ibkr/financial_ranges | GET | Read the financial range types from the IBKR service. | ||
/accounts/ibkr/forms | POST | Download the IBKR agreements and disclosure forms used during account opening. |
| |
/accounts/ibkr/instructions | GET | Read the current status of an IBKR cash instruction. |
| |
/accounts/ibkr/pending_tasks | GET | Read current IBKR pending tasks for an account. |
| |
/accounts/ibkr/product_country_bundles | GET | Download the IBKR enum list of product-country bundles such as stocks or bonds by market. | ||
/accounts/ibkr/registration_tasks | GET | Read pending IBKR registration tasks for an account. |
| |
/accounts/ibkr/statements | POST | Read account statements from the IBKR service for a date range. |
| |
/accounts/ibkr/statements/available | GET | Read the list of statement periods available in IBKR for an account. |
| |
/accounts/ibkr/submit_all_agreements | POST | Submit all pending IBKR agreements for the provided account context. |
| |
/accounts/ibkr/trading_permissions | POST | Add or update IBKR trading permissions for an account. |
| |
/accounts/ibkr/transfer_position_externally | POST | Transfer a position from an IBKR account to an external broker account. |
| |
/accounts/ibkr/transfer_position_internally | POST | Transfer a position between two internal IBKR accounts. |
| |
/accounts/ibkr/wire_instructions | POST | Read IBKR wire instructions for an account and currency. |
| |
/accounts/ibkr/withdraw | POST | Create or submit an IBKR withdrawal instruction for an account. |
| |
/accounts/ibkr/withdrawable_cash | POST | Read the withdrawable cash available for an IBKR account and instruction context. |
| |
/accounts/instructions | GET | Read the account banking instructions stored in the database for an account. |
| |
/accounts/read | GET | Read accounts from the database filtered by id, user_id, or advisor_code. |
| |
/accounts/send_credentials_email | POST | Send the account credentials email flow for a client account. |
| |
/accounts/send_to_ibkr | POST | Submit an AGM account application to the IBKR onboarding flow. |
| |
/accounts/update | POST | Update account records selected by the provided query payload. |
| |
/accounts/with-metadata | GET | Read accounts together with derived metadata and optional advisor details. |
| |
/accounts/with_metadata | GET | Read accounts together with derived metadata and optional advisor details. |
| |
/actions/run_screening_process | GET | Run the screening process, optionally skipping the write-back step when apply_screenings is false. |
| |
/actions/send_compliance_manual_update_email | POST | Send the compliance manual update notification email. | ||
/actions/send_unfunded_emails | GET | Send the unfunded account follow-up email batch. | ||
/actions/update_pending_alias | PATCH | Update the alias in IBKR for accounts that still do not have an alias configured. | ||
/advisor_changes/create | POST | Create an advisor change request for an account. |
| |
/advisor_changes/read | GET | Read advisor change requests filtered by request id or account_id. |
| |
/advisors/create | POST | Create an advisor record. |
| |
/advisors/read | GET | Read advisors from the database filtered by id, advisor code, or contact_id. |
| |
/applications/create | POST | Create an application record. |
| |
/applications/read | GET | Read applications by id or user_id, with an option to strip the raw application payload from the response. |
| |
/applications/update | POST | Update application records selected by the provided query payload. |
| |
/contacts/create | POST | Create a contact record. |
| |
/contacts/documents | GET | Read documents linked to a contact, with optional file data and document relationship metadata. |
| |
/contacts/documents | POST | Upload and attach a document to a contact, including file metadata and optional review fields. |
| |
/contacts/documents | PATCH | Update metadata fields for a previously uploaded contact document. |
| |
/contacts/documents | DELETE | Delete a contact document by document_id. |
| |
/contacts/documents/link | POST | Attach an existing raw document row to a contact_document record. |
| |
/contacts/read | GET | Read contacts from the database filtered by id or email address. |
| |
/contacts/screening | GET | Read screening results associated with a contact. |
| |
/contacts/screening | POST | Run or create a screening record for a contact using its contact_id. |
| |
/contacts/update | POST | Update contact records selected by the provided query payload. |
| |
/docs | GET | Serve the generated AGM API route documentation page. | ||
/document_review_responsibles/create | POST | Create an explicit reviewer assignment for an account or contact document workflow. |
| |
/document_review_responsibles/delete | POST | Delete document review assignments that match the provided query payload. |
| |
/document_review_responsibles/read | GET | Read document review assignments filtered by id, account, contact, or responsible user. |
| |
/document_review_responsibles/upsert | POST | Create or replace the responsible reviewer assignment for the given account/contact/user combination. |
| |
/documents | DELETE | Delete a raw document row by document_id. |
| |
/documents/get_document_data | GET | Read the raw stored data for a single document by document_id. |
| |
/documents/read | GET | Read all document records and contact-document links without returning raw file data. |
| |
/email/send_email/application_link | POST | Send a client-facing application link email. |
| |
/email/send_email/credentials | POST | Send platform credential details to a client. |
| |
/email/send_email/email_confirmation | POST | Send the application email confirmation message to a client. |
| |
/email/send_email/funding_notification | POST | Send a funding notification email to a client. |
| |
/email/send_email/lead_reminder | POST | Send an internal lead reminder email to an AGM user. |
| |
/email/send_email/missing_documents | POST | Send a missing documents email to a client with the requested missing_type template. |
| |
/email/send_email/task_reminder | POST | Send an internal task reminder email to an AGM user. |
| |
/email/send_email/trade_ticket | POST | Send the generated trade ticket email to the client. |
| |
/email/send_email/transfer_instructions | POST | Send transfer instructions to a client for an initial or existing funding flow. |
| |
/email/send_email/welcome | POST | Send the welcome email to a new client. |
| |
/etl/clients | GET | Run the clients ETL pipeline. | ||
/etl/market_data | GET | Run the market data ETL pipeline. | ||
/fee_template_requests/create | POST | Create a fee template request record for an account. |
| |
/fee_template_requests/read | GET | Read fee template requests filtered by request id or account_id. |
| |
/fee_template_requests/update | POST | Update the data payload of an existing fee template request by request id. |
| |
/flagged_deposits/create | POST | Create a flagged deposit record for compliance or operations follow-up. |
| |
/flagged_deposits/read | GET | Read flagged deposit records filtered by id or account_id. |
| |
/investment_proposals/create/assets | POST | Create an investment proposal from an explicit asset allocation payload. |
| |
/investment_proposals/create/plan | POST | Create an investment proposal from a saved portfolio plan payload. |
| |
/investment_proposals/create/risk | POST | Create an investment proposal from a risk profile payload. |
| |
/investment_proposals/preview/plan | POST | Preview an investment proposal from a portfolio plan payload without persisting it. |
| |
/investment_proposals/read | GET | Read investment proposals filtered by proposal id, risk_profile_id, or account_id. |
| |
/management_type_requests/create | POST | Create a management type change request for an account. |
| |
/management_type_requests/read | GET | Read management type change requests filtered by request id or account_id. |
| |
/reporting/brokerage_commissions | GET | Read the brokerage commissions reporting dataset. | ||
/reporting/clients | GET | Read the base clients reporting dataset. | ||
/reporting/clients/fees | GET | Read the client fees reporting dataset. | ||
/reporting/clients/fees/monthly | GET | Read monthly client fees filtered by one or more years and months. |
| |
/reporting/deposits_withdrawals | GET | Read the deposits and withdrawals reporting dataset. | ||
/reporting/deposits_withdrawals/monthly | GET | Read deposits and withdrawals filtered by date range or one or more years and months. |
| |
/reporting/ending_balances_from_statements | GET | Read ending balances derived from account statements. | ||
/reporting/etfs | GET | Read the ETFs reporting dataset. | ||
/reporting/ibkr_details | GET | Download the daily backup of IBKR account details, including account, financial, and account holder information. | ||
/reporting/management_commissions | GET | Read the management commissions reporting dataset. | ||
/reporting/nav | GET | Read the NAV reporting dataset. | ||
/reporting/nav/monthly | GET | Read monthly NAV figures filtered by one or more years and months. |
| |
/reporting/open_positions | GET | Read the open positions reporting dataset. | ||
/reporting/proposals_equity | GET | Read the proposals equity reporting dataset. | ||
/reporting/rtd | GET | Download the large RTD bond list dataset, similar in scope to the U.S. Treasury bond report. | ||
/reporting/stocks | GET | Read the stocks reporting dataset. | ||
/reporting/trades | GET | Read the trades reporting dataset filtered by one or more years and months. |
| |
/reporting/ust_bonds | GET | Read the U.S. Treasury bonds reporting dataset. | ||
/risk_profiles/create | POST | Create a risk profile assessment result. |
| |
/risk_profiles/list | GET | Read the available risk archetype definitions used to classify risk profiles. | ||
/risk_profiles/read | GET | Read stored risk profile results filtered by id. |
| |
/token | POST | Generate a short-lived API access token for the special local token payload. |
| |
/trade_tickets/generate | POST | Generate trade ticket output from a flex query payload and a list of selected indices. |
| |
/trade_tickets/list | GET | Read trade ticket records filtered by id or user_id. |
| |
/trade_tickets/read | GET | Read a generated trade ticket payload by query_id. |
| |
/users/create | POST | Create a user record after removing any incoming password hash and enforcing email uniqueness. |
| |
/users/login | POST | Authenticate a user by email and password and return the sanitized user record for valid credentials. |
| |
/users/read | GET | Read users from the database, optionally filtered by internal id or user_id. |
| |
/users/update | POST | Update a user record selected by id or email without allowing password_hash updates through this route. |
|