Most routes require a JWT access token. Public routes are /, /docs, /token, and /users/login.
Fetch a token by posting an AGM user email and password to /token:
curl -X POST http://localhost:5000/token \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"…"}'
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. | ||
/accounts/comments | GET | Handles GET requests for `/accounts/comments` JWT authentication required. optional query parameters: account_id. |
| |
/accounts/comments | POST | Handles POST requests for `/accounts/comments` JWT authentication required. optional JSON body fields: account_id, author_email, author_name, body, user_id. |
| |
/accounts/comments/delete | POST | Handles POST requests for `/accounts/comments/delete` JWT authentication required. optional JSON body fields: comment_id, user_id. |
| |
/accounts/comments/update | POST | Handles POST requests for `/accounts/comments/update` JWT authentication required. optional JSON body fields: body, comment_id, user_id. |
| |
/accounts/contact | POST | Link a contact to an account. |
| |
/accounts/contact/update | POST | Update an account-contact link. |
| |
/accounts/contacts | GET | Read account-contact links filtered by account, contact, entity, or link ID. | ||
/accounts/create | POST | Create an account record in the AGM database. |
| |
/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/close_account | POST | Submit a request to close an IBKR 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/statements | POST | Read account statements from the IBKR service for a date range. |
| |
/accounts/ibkr/trading_permissions | POST | Add or update IBKR trading permissions for an account. |
| |
/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_funding_notification_email | POST | Handles POST requests for `/accounts/send_funding_notification_email` JWT authentication required. required JSON body fields: client_email, content; optional JSON body fields: cc, days_since_opened, lang, notice_number. |
| |
/accounts/send_missing_documents_email | POST | Handles POST requests for `/accounts/send_missing_documents_email` JWT authentication required. required JSON body fields: client_email, content; optional JSON body fields: cc, lang, missing_type. |
| |
/accounts/send_to_ibkr | POST | Submit an AGM account application to the IBKR onboarding flow. |
| |
/accounts/send_transfer_instructions_email | POST | Handles POST requests for `/accounts/send_transfer_instructions_email` JWT authentication required. required JSON body fields: client_email, content; optional JSON body fields: cc, initial, lang. |
| |
/accounts/send_welcome_email | POST | Handles POST requests for `/accounts/send_welcome_email` JWT authentication required. required JSON body fields: client_email, content; optional JSON body fields: cc, lang. |
| |
/accounts/update | POST | Update account records selected by the provided query payload. |
| |
/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. |
| |
/advisors/update | POST | Update an advisor record selected by the provided query payload. |
| |
/application_providers/create | POST | Handles POST requests for `/application_providers/create` JWT authentication required. optional JSON body fields: application_provider. |
| |
/application_providers/read | GET | Handles GET requests for `/application_providers/read` JWT authentication required. optional query parameters: id. |
| |
/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/read | GET | Read contacts from the database filtered by id or email address. |
| |
/contacts/screen | POST | Run or create a screening record for one contact. |
| |
/contacts/screening | GET | Read screening results associated with a contact. |
| |
/contacts/update | POST | Update contact records selected by the provided query payload. |
| |
/docs | GET | Serve the generated AGM API route documentation page. | ||
/document_review_emails/read | GET | Read tracked document-review email attempts by account, contact, or status. | ||
/document_review_emails/send | POST | Send and persist a missing-documents email attempt for a review row. | ||
/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. |
| |
/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 ownership and source. |
| |
/management_type_requests/create | POST | Create a management type change request for an account. |
| |
/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/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 token for an existing AGM user. The former universal ``{"token":"all"}`` credential is deliberately rejected. Callers must authenticate with an actual AGM user account. |
| |
/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. |
| |
/trade_tickets/send_email | POST | Handles POST requests for `/trade_tickets/send_email` JWT authentication required. required JSON body fields: client_email, content. |
| |
/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. |
|