{"openapi":"3.1.0","info":{"title":"Treasury Agent API","description":"Machine-readable catalog + referral links for AI agents. Built by Olga Popova / SpacAd — Money with robots' hands.","version":"1.0.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/llms.txt":{"get":{"summary":"Llms Txt","description":"GEO: machine-readable site summary for LLM crawlers.","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/.well-known/ai-plugin.json":{"get":{"summary":"Ai Plugin Manifest","operationId":"ai_plugin_manifest__well_known_ai_plugin_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/catalog/offers":{"get":{"summary":"Catalog Offers","operationId":"catalog_offers_v1_catalog_offers_get","parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Fill referral URLs for this agent","title":"Agent Id"},"description":"Fill referral URLs for this agent"},{"name":"machine","in":"query","required":false,"schema":{"type":"integer","description":"1=machine-decision schema","default":1,"title":"Machine"},"description":"1=machine-decision schema"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Catalog Offers V1 Catalog Offers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/catalog/rwa":{"get":{"summary":"Catalog Rwa","operationId":"catalog_rwa_v1_catalog_rwa_get","parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Catalog Rwa V1 Catalog Rwa Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/catalog/geo-service":{"get":{"summary":"Catalog Geo","operationId":"catalog_geo_v1_catalog_geo_service_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Catalog Geo V1 Catalog Geo Service Get"}}}}}}},"/v1/stats/public":{"get":{"summary":"Public Stats","description":"Public funnel stats for outreach (TreasuryScout replies, landing page).","operationId":"public_stats_v1_stats_public_get","parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":720,"minimum":1,"default":168,"title":"Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStatsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/spacad_bank_card":{"get":{"summary":"Product Spacad Bank Card","description":"Named $18 card — agent may complete simple owner KYC in bot.","operationId":"product_spacad_bank_card_v1_products_spacad_bank_card_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Product Spacad Bank Card V1 Products Spacad Bank Card Get"}}}}}}},"/v1/products/spacad_bank_card_anon":{"get":{"summary":"Product Spacad Bank Card Anon","description":"Anonymous $100 card — no KYC. Fulfillment is private ops (COGS not disclosed).","operationId":"product_spacad_bank_card_anon_v1_products_spacad_bank_card_anon_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Product Spacad Bank Card Anon V1 Products Spacad Bank Card Anon Get"}}}}}}},"/v1/products":{"get":{"summary":"List Card Products","operationId":"list_card_products_v1_products_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Card Products V1 Products Get"}}}}}}},"/v1/orders":{"post":{"summary":"Create Order","description":"Agent buys a card product directly (no human claim required).","operationId":"create_order_v1_orders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Order V1 Orders Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orders/{order_id}":{"get":{"summary":"Get Order","operationId":"get_order_v1_orders__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Order V1 Orders  Order Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orders/{order_id}/confirm":{"post":{"summary":"Confirm Order","description":"Agent submits tx hash. Status → paid (ops may later mark fulfilled).","operationId":"confirm_order_v1_orders__order_id__confirm_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderConfirmIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Confirm Order V1 Orders  Order Id  Confirm Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/card-fulfillments":{"get":{"summary":"Admin Card Fulfillments","description":"Internal queue for anon $100 cards. COGS never returned here either.","operationId":"admin_card_fulfillments_v1_admin_card_fulfillments_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"needs_issue","title":"Status"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Card Fulfillments V1 Admin Card Fulfillments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/orders":{"get":{"summary":"Admin List Orders","description":"Internal: list agent card orders for payment watcher / Mag.","operationId":"admin_list_orders_v1_admin_orders_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin List Orders V1 Admin Orders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/prospects":{"post":{"summary":"Upsert Prospect","description":"Scout / lookx402 importer stores scored prospects.","operationId":"upsert_prospect_v1_prospects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Upsert Prospect V1 Prospects Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent-offer-match":{"post":{"summary":"Agent Offer Match","description":"AI-to-AI sales engine: match offers to agent capabilities + budget.","operationId":"agent_offer_match_v1_agent_offer_match_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferMatchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Agent Offer Match V1 Agent Offer Match Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}":{"get":{"summary":"Get Agent","operationId":"get_agent_v1_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Agent V1 Agents  Agent Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/offers":{"get":{"summary":"Agent Offers","operationId":"agent_offers_v1_agents__agent_id__offers_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Agent Offers V1 Agents  Agent Id  Offers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/trial":{"post":{"summary":"Agent Micro Offer","description":"Default micro-offer = named $18; pass product_id=spacad_bank_card_anon for $100.","operationId":"agent_micro_offer_v1_agents__agent_id__trial_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicroOfferIn","default":{"product_id":"spacad_bank_card","network_pref":"usdt_trc20","hypothesis_id":"H1_agent_direct_buy"}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Agent Micro Offer V1 Agents  Agent Id  Trial Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/micro-offer":{"post":{"summary":"Agent Micro Offer","description":"Default micro-offer = named $18; pass product_id=spacad_bank_card_anon for $100.","operationId":"agent_micro_offer_v1_agents__agent_id__micro_offer_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicroOfferIn","default":{"product_id":"spacad_bank_card","network_pref":"usdt_trc20","hypothesis_id":"H1_agent_direct_buy"}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Agent Micro Offer V1 Agents  Agent Id  Micro Offer Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/activity":{"get":{"summary":"Agent Activity","operationId":"agent_activity_v1_agents__agent_id__activity_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Agent Activity V1 Agents  Agent Id  Activity Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referrals/create":{"post":{"summary":"Create Referral","operationId":"create_referral_v1_referrals_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralCreateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Referral V1 Referrals Create Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referrals/{referral_id}":{"get":{"summary":"Get Referral","operationId":"get_referral_v1_referrals__referral_id__get","parameters":[{"name":"referral_id","in":"path","required":true,"schema":{"type":"string","title":"Referral Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Referral V1 Referrals  Referral Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/transactions/attribute":{"post":{"summary":"Attribute Transaction","operationId":"attribute_transaction_v1_transactions_attribute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeTxIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Attribute Transaction V1 Transactions Attribute Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/commissions/{agent_id}":{"get":{"summary":"Get Commissions","operationId":"get_commissions_v1_commissions__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Commissions V1 Commissions  Agent Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/claim/{token}":{"get":{"summary":"Claim Agent Api Key","description":"One-time API key claim (TreasuryScout auto-registration for Moltbook agents).","operationId":"claim_agent_api_key_v1_agents_claim__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentClaimOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/register":{"post":{"summary":"Register Agent","description":"Open registration for AI agents — returns api_key once (or claim URL).","operationId":"register_agent_v1_agents_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRegisterIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRegisterOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/me/stats":{"get":{"summary":"Agent Stats","operationId":"agent_stats_v1_agents_me_stats_get","parameters":[{"name":"X-Agent-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentStatsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/me/clicks":{"post":{"summary":"Agent Record Click","operationId":"agent_record_click_v1_agents_me_clicks_post","parameters":[{"name":"X-Agent-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Agent Record Click V1 Agents Me Clicks Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/leads/route":{"post":{"summary":"Route Human Lead","description":"Route a human lead from an AI agent to the next active Treasury partner (revolver).","operationId":"route_human_lead_v1_leads_route_post","parameters":[{"name":"X-Agent-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadRouteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadRouteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/leads":{"get":{"summary":"Admin List Leads","operationId":"admin_list_leads_v1_admin_leads_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin List Leads V1 Admin Leads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/agents":{"get":{"summary":"Admin List Agents","operationId":"admin_list_agents_v1_admin_agents_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin List Agents V1 Admin Agents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/treasury-event":{"post":{"summary":"Treasury Attribution Webhook","description":"Treasury app calls this on signup/purchase when URL had ?src=agent_…&via=…","operationId":"treasury_attribution_webhook_v1_webhooks_treasury_event_post","parameters":[{"name":"X-Treasury-Webhook-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Treasury-Webhook-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TreasuryWebhookIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Treasury Attribution Webhook V1 Webhooks Treasury Event Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AgentClaimOut":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"agent_id":{"type":"string","title":"Agent Id"},"api_key":{"type":"string","title":"Api Key"},"name":{"type":"string","title":"Name"},"referral_links":{"items":{"$ref":"#/components/schemas/ReferralLinkOut"},"type":"array","title":"Referral Links"},"treasury_url":{"type":"string","title":"Treasury Url"},"docs_url":{"type":"string","title":"Docs Url"},"openapi_url":{"type":"string","title":"Openapi Url"}},"type":"object","required":["agent_id","api_key","name","referral_links","treasury_url","docs_url","openapi_url"],"title":"AgentClaimOut"},"AgentRegisterIn":{"properties":{"name":{"type":"string","maxLength":120,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"contact_email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Contact Email"},"payout_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Wallet","description":"BSC or TRC20 wallet for USDT commission payouts"},"payout_pref":{"type":"string","pattern":"^(usdt|ret)$","title":"Payout Pref","default":"usdt"},"delivery":{"type":"string","pattern":"^(direct|claim_link)$","title":"Delivery","description":"direct = return api_key; claim_link = one-time claim URL (for Moltbook outreach)","default":"direct"},"moltbook_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Moltbook Name"}},"type":"object","required":["name"],"title":"AgentRegisterIn"},"AgentRegisterOut":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"agent_id":{"type":"string","title":"Agent Id"},"api_key":{"type":"string","title":"Api Key","description":"Shown once — store securely (empty if delivery=claim_link)"},"claim_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claim Url","description":"One-time key claim page"},"referral_links":{"items":{"$ref":"#/components/schemas/ReferralLinkOut"},"type":"array","title":"Referral Links"},"treasury_url":{"type":"string","title":"Treasury Url"},"docs_url":{"type":"string","title":"Docs Url"},"openapi_url":{"type":"string","title":"Openapi Url"}},"type":"object","required":["agent_id","api_key","referral_links","treasury_url","docs_url","openapi_url"],"title":"AgentRegisterOut"},"AgentStatsOut":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"agent_id":{"type":"string","title":"Agent Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"clicks_total":{"type":"integer","title":"Clicks Total"},"payout_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Wallet"},"payout_pref":{"type":"string","title":"Payout Pref"},"referral_links":{"items":{"$ref":"#/components/schemas/ReferralLinkOut"},"type":"array","title":"Referral Links"}},"type":"object","required":["agent_id","name","status","clicks_total","payout_wallet","payout_pref","referral_links"],"title":"AgentStatsOut"},"AttributeTxIn":{"properties":{"order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Id"},"referral_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Id"},"referrer_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer Agent Id"},"buyer_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Agent Id"},"amount_usd":{"type":"number","exclusiveMinimum":0.0,"title":"Amount Usd"},"product_id":{"type":"string","title":"Product Id","default":"spacad_bank_card"},"tx_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tx Hash"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["amount_usd"],"title":"AttributeTxIn"},"ClickIn":{"properties":{"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"}},"type":"object","title":"ClickIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LeadRouteIn":{"properties":{"product_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Product Id","default":"treasury"},"human_hint":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Human Hint","description":"Optional context from the human (locale, interest)"},"locale":{"type":"string","maxLength":8,"title":"Locale","default":"en"}},"type":"object","title":"LeadRouteIn"},"LeadRouteOut":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"lead_id":{"type":"integer","title":"Lead Id"},"partner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Username"},"partner_telegram_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Telegram Url"},"treasury_url":{"type":"string","title":"Treasury Url"},"butler_url":{"type":"string","title":"Butler Url"},"routing":{"type":"string","title":"Routing","default":"active_partner_revolver"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["lead_id","partner_username","partner_telegram_url","treasury_url","butler_url"],"title":"LeadRouteOut"},"MicroOfferIn":{"properties":{"product_id":{"type":"string","maxLength":64,"title":"Product Id","default":"spacad_bank_card"},"network_pref":{"type":"string","pattern":"^(usdt_trc20|usdt_bep20|usdc_erc20)$","title":"Network Pref","default":"usdt_trc20"},"buyer_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Wallet"},"referrer_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer Agent Id"},"hypothesis_id":{"type":"string","title":"Hypothesis Id","default":"H1_agent_direct_buy"}},"type":"object","title":"MicroOfferIn","description":"Micro-offer default = named $18 card; can switch to anon $100."},"OfferMatchIn":{"properties":{"agent_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Agent Id"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"budget":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Budget","default":100},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},"type":"object","title":"OfferMatchIn"},"OrderConfirmIn":{"properties":{"tx_hash":{"type":"string","maxLength":128,"minLength":8,"title":"Tx Hash"},"network":{"type":"string","pattern":"^(usdt_trc20|usdt_bep20|usdc_erc20)$","title":"Network","default":"usdt_trc20"}},"type":"object","required":["tx_hash"],"title":"OrderConfirmIn"},"OrderCreateIn":{"properties":{"product_id":{"type":"string","maxLength":64,"title":"Product Id","default":"spacad_bank_card"},"buyer_agent_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Buyer Agent Id"},"referrer_agent_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Referrer Agent Id"},"buyer_wallet":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Buyer Wallet"},"hypothesis_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Hypothesis Id","default":"H1_agent_direct_buy"},"network_pref":{"type":"string","pattern":"^(usdt_trc20|usdt_bep20|usdc_erc20)$","title":"Network Pref","default":"usdt_trc20"}},"type":"object","title":"OrderCreateIn"},"ProspectIn":{"properties":{"prospect_id":{"type":"string","maxLength":120,"minLength":3,"title":"Prospect Id"},"platform":{"type":"string","maxLength":64,"minLength":2,"title":"Platform"},"external_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Name"},"wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet"},"tier":{"type":"string","pattern":"^[ABC]$","title":"Tier","default":"C"},"ars_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Ars Score","default":0},"signals":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Signals"},"status":{"type":"string","maxLength":40,"title":"Status","default":"discovered"},"hypothesis_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hypothesis Id"},"linked_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linked Agent Id"}},"type":"object","required":["prospect_id","platform"],"title":"ProspectIn"},"PublicStatsOut":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"period_hours":{"type":"integer","title":"Period Hours","default":168},"agent_signups_7d":{"type":"integer","title":"Agent Signups 7D"},"human_signups_7d":{"type":"integer","title":"Human Signups 7D"},"human_purchases_7d":{"type":"integer","title":"Human Purchases 7D"},"agent_leads_7d":{"type":"integer","title":"Agent Leads 7D"},"agents_total":{"type":"integer","title":"Agents Total"},"agent_orders_pending":{"type":"integer","title":"Agent Orders Pending","default":0},"agent_orders_paid":{"type":"integer","title":"Agent Orders Paid","default":0},"agent_orders_fulfilled":{"type":"integer","title":"Agent Orders Fulfilled","default":0},"agent_revenue_usd":{"type":"number","title":"Agent Revenue Usd","default":0},"prospects_total":{"type":"integer","title":"Prospects Total","default":0},"prospects_tier_a":{"type":"integer","title":"Prospects Tier A","default":0},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["agent_signups_7d","human_signups_7d","human_purchases_7d","agent_leads_7d","agents_total"],"title":"PublicStatsOut"},"ReferralCreateIn":{"properties":{"referrer_agent_id":{"type":"string","maxLength":64,"minLength":3,"title":"Referrer Agent Id"},"offer_id":{"type":"string","maxLength":64,"title":"Offer Id","default":"spacad_bank_card"},"referred_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referred Agent Id"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","required":["referrer_agent_id"],"title":"ReferralCreateIn"},"ReferralLinkOut":{"properties":{"product_id":{"type":"string","title":"Product Id"},"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"}},"type":"object","required":["product_id","name","url"],"title":"ReferralLinkOut"},"TreasuryWebhookIn":{"properties":{"event_type":{"type":"string","pattern":"^(signup|purchase|click)$","title":"Event Type"},"src":{"type":"string","maxLength":200,"title":"Src"},"treasury_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Treasury User Id"},"ai_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Agent Id"},"amount_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Usd"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["event_type","src"],"title":"TreasuryWebhookIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}