{"openapi":"3.1.0","info":{"title":"Nightsec API","description":"Observed proxy intelligence: IP lookup, snapshot delivery and resumable changes. Bearer API keys are created in the customer console. Confidence is an observation score, not a probability. Unknown IPs are not proof of safety.","version":"1.0.0"},"paths":{"/v1/security/{ip}":{"get":{"tags":["Intelligence"],"summary":"Source-attributed DDoS-for-hire and stresser associations; separate from proxy sightings","operationId":"security_lookup_v1_security__ip__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ip","in":"path","required":true,"schema":{"type":"string","title":"Ip"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/checkout":{"post":{"tags":["Billing"],"summary":"Create a Stripe subscription Checkout session","operationId":"checkout_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/portal":{"post":{"tags":["Billing"],"summary":"Open Stripe self-service billing","operationId":"portal_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/webhook":{"post":{"tags":["Billing"],"summary":"Stripe webhook (signed raw payload)","operationId":"webhook_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"tags":["Operations"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/ready":{"get":{"tags":["Operations"],"summary":"Ready","operationId":"ready_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/console/keys":{"post":{"tags":["Account"],"summary":"Create Key","operationId":"create_key_console_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/console/keys/{key_id}":{"delete":{"tags":["Account"],"summary":"Revoke Key","operationId":"revoke_key_console_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/console/keys/{key_id}/dismiss":{"post":{"tags":["Account"],"summary":"Remove a revoked key from the console list","operationId":"dismiss_key_console_keys__key_id__dismiss_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lookup/{ip}":{"get":{"tags":["Intelligence"],"summary":"Look up one observed IPv4 or IPv6 address","operationId":"lookup_v1_lookup__ip__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ip","in":"path","required":true,"schema":{"type":"string","title":"Ip"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lookup":{"post":{"tags":["Intelligence"],"summary":"Look up up to 100 IPs; consumes one unit per IP","operationId":"batch_v1_lookup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchLookup"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me":{"get":{"tags":["Account"],"summary":"Me","operationId":"me_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/releases/latest":{"get":{"tags":["Delivery"],"summary":"Get the latest immutable snapshot manifest","operationId":"latest_v1_releases_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/releases/{release_id}/{filename}":{"get":{"tags":["Delivery"],"summary":"Download a versioned MMDB, JSONL or manifest","operationId":"download_v1_releases__release_id___filename__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"release_id","in":"path","required":true,"schema":{"type":"string","title":"Release Id"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/events":{"get":{"tags":["Delivery"],"summary":"Read durable changes after an exclusive cursor","operationId":"events_v1_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stream":{"get":{"tags":["Delivery"],"summary":"Resumable Server-Sent Events over HTTP; reconnect after 55 seconds","operationId":"stream_v1_stream_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After"}},{"name":"once","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Once"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BatchLookup":{"properties":{"ips":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Ips"}},"type":"object","required":["ips"],"title":"BatchLookup"},"CheckoutInput":{"properties":{"plan":{"type":"string","enum":["pro","business"],"title":"Plan"}},"type":"object","required":["plan"],"title":"CheckoutInput"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeyInput":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"KeyInput"},"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"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}