{"openapi":"3.1.0","info":{"title":"Daleel Screening API","description":"Sharia compliance screening with receipts: every verdict carries citations to the SEC filings behind it, checked against AAOIFI, DJIM, MSCI, S&P, and FTSE methodologies.","version":"0.3.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"}}}}}}},"/v1/screen/{ticker}":{"get":{"summary":"Screen","operationId":"screen_v1_screen__ticker__get","parameters":[{"name":"ticker","in":"path","required":true,"schema":{"type":"string","title":"Ticker"}},{"name":"overlays","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overlays"}},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/batch":{"post":{"summary":"Batch","operationId":"batch_v1_batch_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bulk":{"post":{"summary":"Bulk Submit","description":"Async bulk screening: returns a job_id immediately; poll\nGET /v1/bulk/{job_id} for progress and results.","operationId":"bulk_submit_v1_bulk_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bulk/{job_id}":{"get":{"summary":"Bulk Status","operationId":"bulk_status_v1_bulk__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/waitlist":{"post":{"summary":"Join Waitlist","operationId":"join_waitlist_api_waitlist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/keys":{"post":{"summary":"Create Key","description":"Self-serve free-tier key. Idempotent per email (re-signup rotates).","operationId":"create_key_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeySignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/history/{ticker}":{"get":{"summary":"History","operationId":"history_v1_history__ticker__get","parameters":[{"name":"ticker","in":"path","required":true,"schema":{"type":"string","title":"Ticker"}},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/stats":{"get":{"summary":"Admin Stats","operationId":"admin_stats_api_admin_stats_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":14,"title":"Days"}},{"name":"activation_days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Activation Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/posts":{"get":{"summary":"Admin List Posts","operationId":"admin_list_posts_api_admin_posts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Admin Save Post","operationId":"admin_save_post_api_admin_posts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/stripe/webhook":{"post":{"summary":"Stripe Webhook","description":"checkout.session.completed → upgrade the payer's key to partner.","operationId":"stripe_webhook_api_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/session":{"post":{"summary":"Create Session","description":"Portal sign-in: validate an API key once, set a signed HttpOnly\nsession cookie carrying only the key-hash prefix + tier + expiry.","operationId":"create_session_api_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/logout":{"post":{"summary":"Portal Logout","operationId":"portal_logout_portal_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/portal":{"get":{"summary":"Portal Signin","operationId":"portal_signin_portal_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/portal/dashboard":{"get":{"summary":"Portal Dashboard","operationId":"portal_dashboard_portal_dashboard_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"type":"string","default":"","title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/watchlist/add":{"post":{"summary":"Portal Watchlist Add","operationId":"portal_watchlist_add_portal_watchlist_add_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_portal_watchlist_add_portal_watchlist_add_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/watchlist/remove":{"post":{"summary":"Portal Watchlist Remove","operationId":"portal_watchlist_remove_portal_watchlist_remove_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_portal_watchlist_remove_portal_watchlist_remove_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/report/{ticker}":{"get":{"summary":"Portal Report","description":"The full receipts view: audit matrix, evidence ledger, components,\npurification, notes, and screening history. Free tier and up.","operationId":"portal_report_portal_report__ticker__get","parameters":[{"name":"ticker","in":"path","required":true,"schema":{"type":"string","title":"Ticker"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Landing","operationId":"landing__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/terms":{"get":{"summary":"Terms","operationId":"terms_terms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/privacy":{"get":{"summary":"Privacy","operationId":"privacy_privacy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tasks/rebuild-leaderboard":{"post":{"summary":"Rebuild Leaderboard","description":"Called by Cloud Scheduler (admin token) — synchronous so the build\ngets request-scoped CPU under throttled (request-based) billing.","operationId":"rebuild_leaderboard_tasks_rebuild_leaderboard_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/leaders":{"get":{"summary":"Leaders Page","operationId":"leaders_page_leaders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tasks/rebuild-value-screen":{"post":{"summary":"Rebuild Value Screen","description":"Called by Cloud Scheduler (admin token) — synchronous, same reasoning\nas the leaderboard rebuild: the build needs request-scoped CPU.","operationId":"rebuild_value_screen_tasks_rebuild_value_screen_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/value":{"get":{"summary":"Value Page","description":"The daily published screen plus how past screens have actually done.\n\nIdentical for every reader — the only per-reader element is whether the\nwatch action is a form or a sign-in link.","operationId":"value_page_value_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/methodology":{"get":{"summary":"Methodology","operationId":"methodology_methodology_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/developers":{"get":{"summary":"Developers","operationId":"developers_developers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/blog/why-my-trading-bot-made-nothing":{"get":{"summary":"Blog Post Mortem","operationId":"blog_post_mortem_blog_why_my_trading_bot_made_nothing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/blog":{"get":{"summary":"Blog Index","operationId":"blog_index_blog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/blog/{slug}":{"get":{"summary":"Blog Post","operationId":"blog_post_blog__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/account":{"get":{"summary":"Portal Account","operationId":"portal_account_portal_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/account/password":{"post":{"summary":"Change Password","operationId":"change_password_api_account_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin":{"get":{"summary":"Admin Page","operationId":"admin_page_admin_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Attribution":{"properties":{"utm_source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Utm Campaign"},"utm_content":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Utm Content"},"landing_page":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Landing Page"},"referrer":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Referrer"}},"type":"object","title":"Attribution","description":"First-touch acquisition context, collected client-side. Every field is\noptional and self-reported — treat it as a hint, never as a fact."},"BatchRequest":{"properties":{"symbols":{"items":{"type":"string"},"type":"array","maxItems":25,"minItems":1,"title":"Symbols"}},"type":"object","required":["symbols"],"title":"BatchRequest"},"Body_portal_watchlist_add_portal_watchlist_add_post":{"properties":{"ticker":{"type":"string","maxLength":40,"title":"Ticker","default":""},"next":{"type":"string","maxLength":40,"title":"Next","default":"/portal/dashboard"}},"type":"object","title":"Body_portal_watchlist_add_portal_watchlist_add_post"},"Body_portal_watchlist_remove_portal_watchlist_remove_post":{"properties":{"ticker":{"type":"string","maxLength":40,"title":"Ticker","default":""}},"type":"object","title":"Body_portal_watchlist_remove_portal_watchlist_remove_post"},"BulkRequest":{"properties":{"symbols":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Symbols"}},"type":"object","required":["symbols"],"title":"BulkRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeySignupRequest":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email"},"use_case":{"type":"string","maxLength":20,"title":"Use Case","default":""},"attribution":{"anyOf":[{"$ref":"#/components/schemas/Attribution"},{"type":"null"}]}},"type":"object","required":["email"],"title":"KeySignupRequest"},"PasswordChangeRequest":{"properties":{"current_password":{"type":"string","maxLength":128,"title":"Current Password"},"new_password":{"type":"string","maxLength":128,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"PasswordChangeRequest"},"PostBody":{"properties":{"slug":{"type":"string","maxLength":80,"title":"Slug"},"title":{"type":"string","maxLength":200,"title":"Title"},"excerpt":{"type":"string","maxLength":500,"title":"Excerpt","default":""},"body_md":{"type":"string","maxLength":100000,"title":"Body Md"},"published":{"type":"boolean","title":"Published","default":false}},"type":"object","required":["slug","title","body_md"],"title":"PostBody"},"SessionRequest":{"properties":{"api_key":{"type":"string","maxLength":128,"title":"Api Key","default":""},"email":{"type":"string","maxLength":254,"title":"Email","default":""},"password":{"type":"string","maxLength":128,"title":"Password","default":""}},"type":"object","title":"SessionRequest"},"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"},"WaitlistRequest":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email"},"interest":{"type":"string","maxLength":20,"title":"Interest","default":"both"},"use_case":{"type":"string","maxLength":300,"title":"Use Case","default":""},"attribution":{"anyOf":[{"$ref":"#/components/schemas/Attribution"},{"type":"null"}]}},"type":"object","required":["email"],"title":"WaitlistRequest"}}}}