{"openapi":"3.1.0","info":{"title":"Reddit Alert API","version":"0.0.65+2026-05-16"},"paths":{"/v1/alerts":{"get":{"summary":"V1 List Alerts","description":"List alerts for the authenticated user.\n\nRequires `alerts:read` scope.\n\nArgs:\n    request: FastAPI request object.\n    session: Current user session (from API key auth).\n    limit: Number of items to return (1-100).\n    offset: Offset for pagination.\n\nReturns:\n    V1AlertsListResponse with alerts and metadata.","operationId":"v1_list_alerts_v1_alerts_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items to return","default":20,"title":"Limit"},"description":"Number of items to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1AlertsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"V1 Create Alert","description":"Create a new alert.\n\nRequires `alerts:write` scope.\n\nArgs:\n    request: FastAPI request object.\n    session: Current user session (from API key auth).\n    alert_request: Alert creation data.\n\nReturns:\n    V1SingleAlertResponse with the created alert and metadata.","operationId":"v1_create_alert_v1_alerts_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CreateAlertRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SingleAlertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/alerts/{alert_id}":{"get":{"summary":"V1 Get Alert","description":"Get a single alert by ID.\n\nRequires `alerts:read` scope.\n\nArgs:\n    request: FastAPI request object.\n    session: Current user session (from API key auth).\n    alert_id: ID of the alert to fetch.\n\nReturns:\n    V1SingleAlertResponse with the alert and metadata.\n\nRaises:\n    ApiErrorException: If the alert is not found (includes unauthorized access).","operationId":"v1_get_alert_v1_alerts__alert_id__get","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SingleAlertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"V1 Update Alert","description":"Update an existing alert.\n\nRequires `alerts:write` scope.\n\nArgs:\n    request: FastAPI request object.\n    session: Current user session (from API key auth).\n    alert_id: ID of the alert to update.\n    alert_request: Fields to update.\n\nReturns:\n    V1SingleAlertResponse with the updated alert and metadata.","operationId":"v1_update_alert_v1_alerts__alert_id__patch","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1UpdateAlertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SingleAlertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"V1 Delete Alert","description":"Delete an alert.\n\nRequires `alerts:write` scope.\n\nArgs:\n    request: FastAPI request object.\n    session: Current user session (from API key auth).\n    alert_id: ID of the alert to delete.\n\nRaises:\n    ApiErrorException: If the alert is not found.","operationId":"v1_delete_alert_v1_alerts__alert_id__delete","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/alerts/{alert_id}/alert_matches":{"get":{"summary":"V1 List Alert Matches For Alert","description":"List alert matches for a specific alert.\n\nRequires `alert_matches:read` scope.\n\nArgs:\n    request: FastAPI request object.\n    session: Current user session (from API key auth).\n    alert_id: ID of the alert.\n    limit: Number of items to return (1-100).\n    offset: Offset for pagination.\n    created_after: Return matches created after this timestamp (exclusive).\n    created_before: Return matches created before this timestamp (exclusive).\n\nReturns:\n    V1AlertMatchesListResponse with alert matches and metadata.","operationId":"v1_list_alert_matches_for_alert_v1_alerts__alert_id__alert_matches_get","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items to return","default":20,"title":"Limit"},"description":"Number of items to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Return matches created after this timestamp (exclusive, ISO 8601).","title":"Created After"},"description":"Return matches created after this timestamp (exclusive, ISO 8601)."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Return matches created before this timestamp (exclusive, ISO 8601).","title":"Created Before"},"description":"Return matches created before this timestamp (exclusive, ISO 8601)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1AlertMatchesListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/alert_matches":{"get":{"summary":"V1 List Alert Matches","description":"List all alert matches for the authenticated user.\n\nRequires `alert_matches:read` scope.\n\nArgs:\n    request: FastAPI request object.\n    session: Current user session (from API key auth).\n    limit: Number of items to return (1-100).\n    offset: Offset for pagination.\n    created_after: Return matches created after this timestamp (exclusive).\n    created_before: Return matches created before this timestamp (exclusive).\n\nReturns:\n    V1AlertMatchesListResponse with alert matches and metadata.","operationId":"v1_list_alert_matches_v1_alert_matches_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items to return","default":20,"title":"Limit"},"description":"Number of items to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Return matches created after this timestamp (exclusive, ISO 8601).","title":"Created After"},"description":"Return matches created after this timestamp (exclusive, ISO 8601)."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Return matches created before this timestamp (exclusive, ISO 8601).","title":"Created Before"},"description":"Return matches created before this timestamp (exclusive, ISO 8601)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1AlertMatchesListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/alert_matches/{alert_match_id}":{"get":{"summary":"V1 Get Alert Match","description":"Get a single alert match by ID.\n\nRequires `alert_matches:read` scope.\n\nArgs:\n    request: FastAPI request object.\n    session: Current user session (from API key auth).\n    alert_match_id: ID of the alert match to fetch.\n\nReturns:\n    V1SingleAlertMatchResponse with the alert match and metadata.","operationId":"v1_get_alert_match_v1_alert_matches__alert_match_id__get","parameters":[{"name":"alert_match_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Match Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SingleAlertMatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AlertQuery-Input":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JsonValue-Input":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"PlanLimitsMeta":{"properties":{"alerts_limit":{"type":"integer","title":"Alerts Limit"},"alerts_used":{"type":"integer","title":"Alerts Used"},"subreddits_limit":{"type":"integer","title":"Subreddits Limit"},"subreddits_used":{"type":"integer","title":"Subreddits Used"},"emails_sent_per_month_limit":{"type":"integer","title":"Emails Sent Per Month Limit"},"emails_sent_this_month":{"type":"integer","title":"Emails Sent This Month"},"llm_tier_low_calls_per_month_limit":{"type":"integer","title":"Llm Tier Low Calls Per Month Limit"},"llm_tier_low_calls_this_month":{"type":"integer","title":"Llm Tier Low Calls This Month"},"llm_tier_mid_calls_per_month_limit":{"type":"integer","title":"Llm Tier Mid Calls Per Month Limit"},"llm_tier_mid_calls_this_month":{"type":"integer","title":"Llm Tier Mid Calls This Month"},"llm_tier_top_calls_per_month_limit":{"type":"integer","title":"Llm Tier Top Calls Per Month Limit"},"llm_tier_top_calls_this_month":{"type":"integer","title":"Llm Tier Top Calls This Month"},"llm_tier_sota_calls_per_month_limit":{"type":"integer","title":"Llm Tier Sota Calls Per Month Limit"},"llm_tier_sota_calls_this_month":{"type":"integer","title":"Llm Tier Sota Calls This Month"},"matches_prompt_evaluate_llm_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matches Prompt Evaluate Llm Tier"},"matches_prompt_review_llm_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matches Prompt Review Llm Tier"},"matches_prompt_evaluate_llm_tier_primary_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matches Prompt Evaluate Llm Tier Primary Model"},"matches_prompt_evaluate_llm_tier_fallback_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matches Prompt Evaluate Llm Tier Fallback Model"},"matches_prompt_review_llm_tier_primary_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matches Prompt Review Llm Tier Primary Model"},"matches_prompt_review_llm_tier_fallback_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matches Prompt Review Llm Tier Fallback Model"}},"type":"object","required":["alerts_limit","alerts_used","subreddits_limit","subreddits_used","emails_sent_per_month_limit","emails_sent_this_month","llm_tier_low_calls_per_month_limit","llm_tier_low_calls_this_month","llm_tier_mid_calls_per_month_limit","llm_tier_mid_calls_this_month","llm_tier_top_calls_per_month_limit","llm_tier_top_calls_this_month","llm_tier_sota_calls_per_month_limit","llm_tier_sota_calls_this_month"],"title":"PlanLimitsMeta","description":"Plan limits information included in API responses."},"V1AlertMatchResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"alert_id":{"type":"string","format":"uuid","title":"Alert Id"},"reddit_id":{"type":"string","title":"Reddit Id"},"content_type":{"type":"string","title":"Content Type"},"reddit_content_snapshot":{"additionalProperties":true,"type":"object","title":"Reddit Content Snapshot"},"explanation":{"anyOf":[{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Explanation"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","alert_id","reddit_id","content_type","reddit_content_snapshot","created_at"],"title":"V1AlertMatchResponse","description":"Response model for an alert match in v1 API."},"V1AlertMatchesListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/V1AlertMatchResponse"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/V1ListMeta"}},"type":"object","required":["data","meta"],"title":"V1AlertMatchesListResponse","description":"Response model for GET /v1/alert_matches."},"V1AlertResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"query":{"additionalProperties":true,"type":"object","title":"Query"},"reddit_subreddit_ids":{"items":{"type":"string"},"type":"array","title":"Reddit Subreddit Ids"},"is_active":{"type":"boolean","title":"Is Active"},"should_send_emails":{"type":"boolean","title":"Should Send Emails"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","query","reddit_subreddit_ids","is_active","should_send_emails","created_at","updated_at"],"title":"V1AlertResponse","description":"Response model for a single alert in v1 API."},"V1AlertsListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/V1AlertResponse"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/V1ListMeta"}},"type":"object","required":["data","meta"],"title":"V1AlertsListResponse","description":"Response model for GET /v1/alerts."},"V1CreateAlertRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Description","description":"Optional description of the alert's purpose."},"query":{"$ref":"#/components/schemas/AlertQuery-Input"},"reddit_subreddit_ids":{"items":{"type":"string"},"type":"array","title":"Reddit Subreddit Ids"},"is_active":{"type":"boolean","title":"Is Active","default":true},"should_send_emails":{"type":"boolean","title":"Should Send Emails","default":true}},"type":"object","required":["name","query","reddit_subreddit_ids"],"title":"V1CreateAlertRequest","description":"Request model for POST /v1/alerts."},"V1ListMeta":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"plan_limits":{"$ref":"#/components/schemas/PlanLimitsMeta"}},"type":"object","required":["total","limit","offset","plan_limits"],"title":"V1ListMeta","description":"Metadata for list responses."},"V1SingleAlertMatchResponse":{"properties":{"data":{"$ref":"#/components/schemas/V1AlertMatchResponse"},"meta":{"$ref":"#/components/schemas/V1SingleMeta"}},"type":"object","required":["data","meta"],"title":"V1SingleAlertMatchResponse","description":"Response model for GET /v1/alert_matches/{alert_match_id}."},"V1SingleAlertResponse":{"properties":{"data":{"$ref":"#/components/schemas/V1AlertResponse"},"meta":{"$ref":"#/components/schemas/V1SingleMeta"}},"type":"object","required":["data","meta"],"title":"V1SingleAlertResponse","description":"Response model for GET /v1/alerts/{alert_id}."},"V1SingleMeta":{"properties":{"plan_limits":{"$ref":"#/components/schemas/PlanLimitsMeta"}},"type":"object","required":["plan_limits"],"title":"V1SingleMeta","description":"Metadata for single resource responses."},"V1UpdateAlertRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Description","description":"Optional description of the alert's purpose."},"query":{"anyOf":[{"$ref":"#/components/schemas/AlertQuery-Input"},{"type":"null"}]},"reddit_subreddit_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Reddit Subreddit Ids"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"should_send_emails":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Should Send Emails"}},"type":"object","title":"V1UpdateAlertRequest","description":"Request model for PATCH /v1/alerts/{alert_id}."},"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"}}}}