{"openapi":"3.1.0","info":{"title":"getSnap.dev — Screenshot, PDF, and Video API","description":"Fast, cheap, developer-first screenshot, PDF, and scrolling-video API. Capture any URL as PNG, JPG, WebP, AVIF, or PDF, or record it as MP4/GIF, with AI-powered popup removal, cron-driven scheduled captures, and per-request geo/proxy routing.\n\n**Getting started:** Sign up at [getsnap.dev](https://getsnap.dev) to get a free API key (100 credits/month). Then send requests with `x-api-key: sk_live_...` header.\n\n**Full docs:** [getsnap.dev/docs](https://getsnap.dev/docs/)","version":"1.23.2","contact":{"url":"https://getsnap.dev"}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{}},"paths":{"/v1/health":{"get":{"tags":["System"],"description":"Liveness and dependency check. Returns 200 when every dependency responds and 503 when any does not; the `checks` object names which. The `canary` object reports when the end-to-end capture canary last ran and never changes the status code.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"timestamp":{"type":"string"},"version":{"type":"string"},"uptime_s":{"type":"number"},"checks":{"type":"object","additionalProperties":{"type":"object","properties":{"ok":{"type":"boolean"},"ms":{"type":"number"},"error":{"type":"string"}}}},"canary":{"type":"object","description":"When the end-to-end capture canary last completed a run. Reported for monitoring; it does not affect `status`.","properties":{"last_run":{"type":["string","null"]},"age_s":{"type":["number","null"]},"stale":{"type":"boolean"},"threshold_s":{"type":"number"}}}}}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"timestamp":{"type":"string"},"version":{"type":"string"},"uptime_s":{"type":"number"},"checks":{"type":"object","additionalProperties":{"type":"object","properties":{"ok":{"type":"boolean"},"ms":{"type":"number"},"error":{"type":"string"}}}},"canary":{"type":"object","description":"When the end-to-end capture canary last completed a run. Reported for monitoring; it does not affect `status`.","properties":{"last_run":{"type":["string","null"]},"age_s":{"type":["number","null"]},"stale":{"type":"boolean"},"threshold_s":{"type":"number"}}}}}}}}}}},"/v1/screenshot":{"post":{"summary":"Capture a screenshot or PDF","tags":["Screenshot"],"description":"Captures a screenshot (PNG/JPG/WebP/AVIF) or PDF of a URL or raw HTML. When webhook_url is set, the request runs asynchronously and returns 202. When response_type: 'binary', raw bytes are returned instead of a CDN URL.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"html":{"type":"string","maxLength":500000},"format":{"type":"string","enum":["png","jpg","jpeg","webp","avif","pdf"],"default":"png"},"viewport_width":{"type":"integer","minimum":320,"maximum":3840,"default":1280},"viewport_height":{"type":"integer","minimum":200,"maximum":2160,"default":720},"full_page":{"type":"boolean","default":false},"device":{"type":"string","enum":["desktop","mobile","tablet"],"default":"desktop"},"delay":{"type":"integer","minimum":0,"maximum":10000,"default":0},"css":{"type":"string","maxLength":10000,"default":""},"js":{"type":"string","maxLength":10000,"default":""},"dark_mode":{"type":"boolean","default":false},"reduced_motion":{"type":"boolean","default":false},"media_type":{"type":"string","enum":["","screen","print"],"default":""},"quality":{"type":"integer","minimum":1,"maximum":100,"default":80},"remove_popups":{"type":"boolean","default":true},"block_ads":{"type":"boolean","default":true},"click_accept":{"type":"boolean","default":false},"press_escape":{"type":"boolean","default":false},"block_images":{"type":"boolean","default":false},"block_fonts":{"type":"boolean","default":false},"block_scripts":{"type":"boolean","default":false},"block_frames":{"type":"boolean","default":false},"block_urls":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":30,"default":[]},"bypass_csp":{"type":"boolean","default":false},"device_scale_factor":{"type":"number","minimum":0.5,"maximum":3,"default":1},"headers":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"cookies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"string"},"domain":{"type":"string"},"path":{"type":"string"},"httpOnly":{"type":"boolean"},"secure":{"type":"boolean"}},"required":["name","value"],"additionalProperties":false},"maxItems":50,"default":[]},"locale":{"type":"string","maxLength":20,"default":""},"timezone":{"type":"string","maxLength":100,"default":""},"user_agent":{"type":"string","maxLength":500,"default":""},"wait_for_selector":{"type":"string","maxLength":500,"default":""},"wait_for_network_idle":{"type":"boolean","default":true},"lazy_load":{"type":"boolean","default":false},"hide_selectors":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":20,"default":[]},"remove_selectors":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":20,"default":[]},"omit_background":{"type":"boolean","default":false},"extract_text":{"type":"boolean","default":false},"extract_html":{"type":"boolean","default":false},"extract_metadata":{"type":"boolean","default":false},"click_selector":{"type":"string","maxLength":500,"default":""},"scroll_to_selector":{"type":"string","maxLength":500,"default":""},"fail_if_selector_missing":{"type":"boolean","default":false},"attachment_name":{"type":"string","maxLength":200,"default":""},"clip":{"type":["object","null"],"properties":{"x":{"type":"number","minimum":0},"y":{"type":"number","minimum":0},"width":{"type":"integer","minimum":1,"maximum":10000},"height":{"type":"integer","minimum":1,"maximum":10000}},"required":["x","y","width","height"],"additionalProperties":false,"default":null},"full_page_max_height":{"type":"integer","minimum":0,"maximum":50000,"default":0},"full_page_slices":{"type":"boolean","default":false},"full_page_slice_height":{"type":"integer","minimum":200,"maximum":16000,"default":4000},"full_page_slice_overlap_height":{"type":"integer","minimum":0,"maximum":2000,"default":0},"pdf_page_size":{"type":"string","enum":["A0","A1","A2","A3","A4","A5","A6","Letter","Legal","Tabloid","Ledger"],"default":"A4"},"pdf_orientation":{"type":"string","enum":["portrait","landscape"],"default":"portrait"},"pdf_margin_top":{"type":"string","maxLength":20,"default":"20px"},"pdf_margin_right":{"type":"string","maxLength":20,"default":"20px"},"pdf_margin_bottom":{"type":"string","maxLength":20,"default":"20px"},"pdf_margin_left":{"type":"string","maxLength":20,"default":"20px"},"pdf_background":{"type":"boolean","default":true},"pdf_scale":{"type":"number","minimum":0.1,"maximum":2,"default":1},"pdf_show_header":{"type":"boolean","default":false},"pdf_header":{"type":"string","maxLength":5000,"default":""},"pdf_show_footer":{"type":"boolean","default":false},"pdf_footer":{"type":"string","maxLength":5000,"default":""},"pdf_page_range":{"type":"string","maxLength":200,"default":""},"pdf_title":{"type":"string","maxLength":200,"default":""},"pdf_subject":{"type":"string","maxLength":500,"default":""},"pdf_author":{"type":"string","maxLength":200,"default":""},"pdf_keywords":{"type":"string","maxLength":500,"default":""},"pdf_creator":{"type":"string","maxLength":200,"default":""},"proxy_url":{"type":"string","maxLength":500,"default":""},"proxy_username":{"type":"string","maxLength":200,"default":""},"proxy_password":{"type":"string","maxLength":500,"default":""},"proxy_country":{"type":"string","maxLength":2,"default":""},"selector":{"type":"string","maxLength":500,"default":""},"response_type":{"type":"string","enum":["binary","url"],"default":"url"},"webhook_url":{"type":"string","format":"uri"},"s3_upload":{"type":"object","properties":{"access_key_id":{"type":"string","minLength":1},"secret_access_key":{"type":"string","minLength":1},"bucket":{"type":"string","minLength":1},"region":{"type":"string","minLength":1},"endpoint":{"type":"string","format":"uri"},"path":{"type":"string","maxLength":500},"acl":{"type":"string","maxLength":50}},"required":["access_key_id","secret_access_key","bucket","region"],"additionalProperties":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Screenshot captured (URL or binary mode)","content":{"application/json":{"schema":{"description":"Screenshot captured (URL or binary mode)","type":"object","additionalProperties":true,"properties":{"url":{"type":"string","description":"CDN URL of the captured screenshot"},"cached":{"type":"boolean"},"request_id":{"type":"string","description":"Unique request ID (req_...)"},"response_time_ms":{"type":"number"},"s3_key":{"type":"string","description":"Present when s3_upload succeeded"},"s3_bucket":{"type":"string","description":"Present when s3_upload succeeded"},"extracted_text":{"type":"string","description":"Present when extract_text: true"},"extracted_html":{"type":"string","description":"Present when extract_html: true"},"extracted_metadata":{"description":"Present when extract_metadata: true","type":"object","additionalProperties":true,"properties":{"title":{"type":"string"},"favicon":{"type":"string"},"open_graph":{"type":"object","additionalProperties":true,"description":"Map of every og:* meta tag"},"fonts":{"type":"array","items":{"type":"string"}},"http_status":{"type":"number"},"http_status_text":{"type":"string"},"http_headers":{"type":"object","additionalProperties":true,"description":"Response headers from the main navigation"}}},"slices":{"description":"Present when full_page_slices: true","type":"array","items":{"type":"object","additionalProperties":true,"properties":{"index":{"type":"number"},"offset_y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"url":{"type":"string"}}}}}}}}},"202":{"description":"Screenshot queued (webhook mode)","content":{"application/json":{"schema":{"description":"Screenshot queued (webhook mode)","type":"object","additionalProperties":true,"properties":{"request_id":{"type":"string"},"status":{"type":"string","enum":["pending"]},"message":{"type":"string"},"status_url":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"502":{"description":"The target site could not be reached (DNS, TLS, refused)","content":{"application/json":{"schema":{"description":"The target site could not be reached (DNS, TLS, refused)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"504":{"description":"The target site did not respond within the capture timeout","content":{"application/json":{"schema":{"description":"The target site did not respond within the capture timeout","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/batch":{"post":{"summary":"Batch capture multiple URLs","tags":["Screenshot"],"description":"Captures screenshots of up to 100 URLs in a single request. Same options as /v1/screenshot but takes an urls[] array instead of a single url. When webhook_url is set, results are delivered asynchronously.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1,"maxItems":100},"format":{"type":"string","enum":["png","jpg","jpeg","webp","avif","pdf"],"default":"png"},"viewport_width":{"type":"integer","minimum":320,"maximum":3840,"default":1280},"viewport_height":{"type":"integer","minimum":200,"maximum":2160,"default":720},"full_page":{"type":"boolean","default":false},"device":{"type":"string","enum":["desktop","mobile","tablet"],"default":"desktop"},"delay":{"type":"integer","minimum":0,"maximum":10000,"default":0},"css":{"type":"string","maxLength":10000,"default":""},"js":{"type":"string","maxLength":10000,"default":""},"dark_mode":{"type":"boolean","default":false},"reduced_motion":{"type":"boolean","default":false},"media_type":{"type":"string","enum":["","screen","print"],"default":""},"quality":{"type":"integer","minimum":1,"maximum":100,"default":80},"remove_popups":{"type":"boolean","default":true},"block_ads":{"type":"boolean","default":true},"click_accept":{"type":"boolean","default":false},"press_escape":{"type":"boolean","default":false},"block_images":{"type":"boolean","default":false},"block_fonts":{"type":"boolean","default":false},"block_scripts":{"type":"boolean","default":false},"block_frames":{"type":"boolean","default":false},"block_urls":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":30,"default":[]},"bypass_csp":{"type":"boolean","default":false},"device_scale_factor":{"type":"number","minimum":0.5,"maximum":3,"default":1},"headers":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"cookies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"string"},"domain":{"type":"string"},"path":{"type":"string"},"httpOnly":{"type":"boolean"},"secure":{"type":"boolean"}},"required":["name","value"],"additionalProperties":false},"maxItems":50,"default":[]},"locale":{"type":"string","maxLength":20,"default":""},"timezone":{"type":"string","maxLength":100,"default":""},"user_agent":{"type":"string","maxLength":500,"default":""},"wait_for_selector":{"type":"string","maxLength":500,"default":""},"wait_for_network_idle":{"type":"boolean","default":true},"lazy_load":{"type":"boolean","default":false},"hide_selectors":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":20,"default":[]},"remove_selectors":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":20,"default":[]},"omit_background":{"type":"boolean","default":false},"extract_text":{"type":"boolean","default":false},"extract_html":{"type":"boolean","default":false},"extract_metadata":{"type":"boolean","default":false},"click_selector":{"type":"string","maxLength":500,"default":""},"scroll_to_selector":{"type":"string","maxLength":500,"default":""},"fail_if_selector_missing":{"type":"boolean","default":false},"attachment_name":{"type":"string","maxLength":200,"default":""},"clip":{"type":["object","null"],"properties":{"x":{"type":"number","minimum":0},"y":{"type":"number","minimum":0},"width":{"type":"integer","minimum":1,"maximum":10000},"height":{"type":"integer","minimum":1,"maximum":10000}},"required":["x","y","width","height"],"additionalProperties":false,"default":null},"full_page_max_height":{"type":"integer","minimum":0,"maximum":50000,"default":0},"full_page_slices":{"type":"boolean","default":false},"full_page_slice_height":{"type":"integer","minimum":200,"maximum":16000,"default":4000},"full_page_slice_overlap_height":{"type":"integer","minimum":0,"maximum":2000,"default":0},"pdf_page_size":{"type":"string","enum":["A0","A1","A2","A3","A4","A5","A6","Letter","Legal","Tabloid","Ledger"],"default":"A4"},"pdf_orientation":{"type":"string","enum":["portrait","landscape"],"default":"portrait"},"pdf_margin_top":{"type":"string","maxLength":20,"default":"20px"},"pdf_margin_right":{"type":"string","maxLength":20,"default":"20px"},"pdf_margin_bottom":{"type":"string","maxLength":20,"default":"20px"},"pdf_margin_left":{"type":"string","maxLength":20,"default":"20px"},"pdf_background":{"type":"boolean","default":true},"pdf_scale":{"type":"number","minimum":0.1,"maximum":2,"default":1},"pdf_show_header":{"type":"boolean","default":false},"pdf_header":{"type":"string","maxLength":5000,"default":""},"pdf_show_footer":{"type":"boolean","default":false},"pdf_footer":{"type":"string","maxLength":5000,"default":""},"pdf_page_range":{"type":"string","maxLength":200,"default":""},"pdf_title":{"type":"string","maxLength":200,"default":""},"pdf_subject":{"type":"string","maxLength":500,"default":""},"pdf_author":{"type":"string","maxLength":200,"default":""},"pdf_keywords":{"type":"string","maxLength":500,"default":""},"pdf_creator":{"type":"string","maxLength":200,"default":""},"proxy_url":{"type":"string","maxLength":500,"default":""},"proxy_username":{"type":"string","maxLength":200,"default":""},"proxy_password":{"type":"string","maxLength":500,"default":""},"proxy_country":{"type":"string","maxLength":2,"default":""},"webhook_url":{"type":"string","format":"uri"},"s3_upload":{"type":"object","properties":{"access_key_id":{"type":"string","minLength":1},"secret_access_key":{"type":"string","minLength":1},"bucket":{"type":"string","minLength":1},"region":{"type":"string","minLength":1},"endpoint":{"type":"string","format":"uri"},"path":{"type":"string","maxLength":500},"acl":{"type":"string","maxLength":50}},"required":["access_key_id","secret_access_key","bucket","region"],"additionalProperties":false}},"required":["urls"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Batch captured","content":{"application/json":{"schema":{"description":"Batch captured","type":"object","additionalProperties":true,"properties":{"batch_id":{"type":"string"},"count":{"type":"number"},"succeeded":{"type":"number"},"failed":{"type":"number"},"response_time_ms":{"type":"number"},"results":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"source_url":{"type":"string"},"url":{"type":"string"},"cached":{"type":"boolean"},"request_id":{"type":"string"},"s3_key":{"type":"string"},"s3_bucket":{"type":"string"},"error":{"type":"string"}}}}}}}}},"202":{"description":"Batch queued (webhook mode)","content":{"application/json":{"schema":{"description":"Batch queued (webhook mode)","type":"object","additionalProperties":true,"properties":{"request_id":{"type":"string"},"status":{"type":"string","enum":["pending"]},"message":{"type":"string"},"status_url":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/screenshot/{request_id}":{"get":{"summary":"Poll async screenshot status","tags":["Screenshot"],"description":"Returns the status of an asynchronous webhook screenshot request. Useful when your webhook fails or you want to verify state manually.","parameters":[{"schema":{"type":"string"},"in":"path","name":"request_id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Request status","content":{"application/json":{"schema":{"description":"Request status","type":"object","additionalProperties":true,"properties":{"request_id":{"type":"string"},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"result":{"type":"object","additionalProperties":true,"description":"Present when status is completed or failed"},"created_at":{"type":"string"},"completed_at":{"type":["string","null"]}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/og-image":{"post":{"summary":"Generate an Open Graph / Twitter Card image","tags":["Screenshot"],"description":"Convenience wrapper over /v1/screenshot with defaults tuned for social share images: 1200x630 PNG, hi-DPI, ad + popup blocking on, wait-for-network-idle. Returns a CDN URL you can drop into your og:image / twitter:image meta tags. Billed at 1 credit per fresh capture, 0 for cache hits, same as /v1/screenshot.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"viewport_width":{"type":"integer","minimum":200,"maximum":2400,"default":1200},"viewport_height":{"type":"integer","minimum":200,"maximum":1350,"default":630},"format":{"type":"string","enum":["png","jpg","jpeg"],"default":"png"},"device_scale_factor":{"type":"number","minimum":1,"maximum":3,"default":2},"response_type":{"type":"string","enum":["url","binary"],"default":"url"},"wait_for_selector":{"type":"string","maxLength":500},"extra_delay_ms":{"type":"integer","minimum":0,"maximum":10000},"block_ads":{"type":"boolean"},"remove_popups":{"type":"boolean"},"dark_mode":{"type":"boolean"},"css":{"type":"string","maxLength":10000}},"required":["url"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"OG image generated","content":{"application/json":{"schema":{"description":"OG image generated","type":"object","additionalProperties":true,"properties":{"url":{"type":"string","description":"CDN URL of the generated OG image"},"cached":{"type":"boolean"},"request_id":{"type":"string"},"response_time_ms":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"502":{"description":"The target site could not be reached (DNS, TLS, refused)","content":{"application/json":{"schema":{"description":"The target site could not be reached (DNS, TLS, refused)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"504":{"description":"The target site did not respond within the capture timeout","content":{"application/json":{"schema":{"description":"The target site did not respond within the capture timeout","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/usage":{"get":{"tags":["Usage"],"description":"Get current billing period usage","parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string"},"used":{"type":"number"},"limit":{"type":"number"},"plan":{"type":"string"},"remaining":{"type":"number"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/usage/log":{"get":{"tags":["Usage"],"description":"Per-capture history for the current billing owner. Team owners and admins see every member's captures; other callers see only their own.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false,"description":"Rows to return, newest first."},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false,"description":"Rows to skip, for paging."},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"scope":{"type":"string","enum":["self","team"],"description":"'team' when the caller is an owner or admin and rows span the team."},"count":{"type":"number","description":"Rows in this response."},"limit":{"type":"number"},"offset":{"type":"number"},"entries":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"member":{"type":["string","null"],"description":"Public account handle (pk_...). Group by this. Never the API key."},"email":{"type":["string","null"]},"endpoint":{"type":"string"},"status_code":{"type":"number"},"response_ms":{"type":"number"},"created_at":{"type":"string"}}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/signup":{"post":{"tags":["Auth"],"description":"Sign up for a free API key","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"plan":{"type":"string"},"referral_code":{"type":"string","maxLength":12}}}}}},"responses":{"200":{"description":"Account already exists and is being sent to checkout","content":{"application/json":{"schema":{"description":"Account already exists and is being sent to checkout","type":"object","additionalProperties":true,"properties":{"status":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"201":{"description":"Account created","content":{"application/json":{"schema":{"description":"Account created","type":"object","additionalProperties":true,"properties":{"api_key":{"type":"string"},"plan":{"type":"string"},"monthly_limit":{"type":"number"},"rate_limit_per_min":{"type":"number"},"verification_required":{"type":"boolean","description":"When true, the key returns 403 email_not_verified until the activation link in the welcome email is clicked."},"message":{"type":"string"},"referred":{"type":"boolean","description":"Present when the signup was attributed to a referral code."}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/upgrade":{"post":{"tags":["Billing"],"description":"Create a Stripe Checkout Session to upgrade your plan","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string","enum":["starter","pro","business"]}}}}}},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Stripe Checkout or billing portal URL","content":{"application/json":{"schema":{"description":"Stripe Checkout or billing portal URL","type":"object","additionalProperties":true,"properties":{"url":{"type":"string","description":"Redirect the user here"},"type":{"type":"string","enum":["checkout","portal"],"description":"portal when the caller already has a subscription"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/billing":{"post":{"tags":["Billing"],"description":"Get a link to manage your subscription (cancel, update payment, view invoices)","parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Stripe billing portal URL","content":{"application/json":{"schema":{"description":"Stripe billing portal URL","type":"object","additionalProperties":true,"properties":{"url":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/contact":{"post":{"tags":["Support"],"description":"Send a support message","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","message"],"properties":{"email":{"type":"string","format":"email"},"message":{"type":"string","minLength":10,"maxLength":2000}}}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/render-link":{"post":{"summary":"Generate a signed render link","tags":["Render Links"],"description":"Returns a signed GET URL that renders a screenshot without requiring an X-API-Key header. Useful for <img> tags where API keys would leak client-side. The signature is HMAC-SHA256 over the sorted query params, keyed by a server-held secret bound to your account - neither your API key nor anything stored against your account can produce it. Returns 503 if link signing is not configured on the server.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Any screenshot options plus at least url or html. Additional keys are signed and preserved.","properties":{"url":{"type":"string"},"html":{"type":"string"},"format":{"type":"string"},"viewport_width":{"type":"number"},"viewport_height":{"type":"number"},"full_page":{"type":"boolean"},"device":{"type":"string"},"delay":{"type":"number"},"quality":{"type":"number"},"dark_mode":{"type":"boolean"},"remove_popups":{"type":"boolean"},"block_ads":{"type":"boolean"},"selector":{"type":"string"},"click_selector":{"type":"string"},"scroll_to_selector":{"type":"string"}},"additionalProperties":true}}},"description":"Any screenshot options plus at least url or html. Additional keys are signed and preserved."},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Signed render link","content":{"application/json":{"schema":{"description":"Signed render link","type":"object","additionalProperties":true,"properties":{"render_url":{"type":"string","description":"Full GET URL including signature"},"expires_at":{"type":["string","null"]}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"503":{"description":"Render link signing is not configured on this server. The rest of the API is unaffected.","content":{"application/json":{"schema":{"description":"Render link signing is not configured on this server. The rest of the API is unaffected.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/v1/render":{"get":{"summary":"Serve screenshot from signed render link","tags":["Render Links"],"description":"Renders a screenshot from a signed URL generated by POST /v1/render-link. No auth header required - the signature in the query string authenticates the request. The link carries the account public handle (pk_...), never the secret API key. Response is a 302 redirect to the CDN image URL.","parameters":[{"schema":{"type":"string"},"in":"query","name":"signature","required":true,"description":"HMAC-SHA256 hex digest signing the other params"},{"schema":{"type":"string"},"in":"query","name":"key","required":true,"description":"Public account handle (pk_...), never the secret API key."},{"schema":{"type":"string"},"in":"query","name":"url","required":false},{"schema":{"type":"string"},"in":"query","name":"html","required":false}],"responses":{"302":{"description":"Redirect to CDN URL","content":{"application/json":{"schema":{"description":"Redirect to CDN URL","type":"object","additionalProperties":true,"properties":{"location":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"502":{"description":"The target site could not be reached (DNS, TLS, refused)","content":{"application/json":{"schema":{"description":"The target site could not be reached (DNS, TLS, refused)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"504":{"description":"The target site did not respond within the capture timeout","content":{"application/json":{"schema":{"description":"The target site did not respond within the capture timeout","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/schedules":{"post":{"summary":"Create a scheduled capture","tags":["Schedules"],"description":"Creates a cron-driven scheduled capture. Every tick the worker runs takeScreenshot(), uploads to CDN, optionally POSTs to your webhook, and logs the run in schedule_runs.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"cron":{"type":"string","minLength":1,"maxLength":100},"timezone":{"type":"string","maxLength":64,"default":"UTC"},"options":{"type":"object","additionalProperties":{}},"webhook_url":{"type":"string","format":"uri"},"webhook_secret":{"type":"string","minLength":8,"maxLength":200},"is_active":{"type":"boolean","default":true}},"required":["name","cron","options"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"201":{"description":"Schedule created","content":{"application/json":{"schema":{"description":"Schedule created","type":"object","additionalProperties":true,"properties":{"id":{"type":"string","description":"Schedule ID (sched_...)"},"name":{"type":"string"},"cron":{"type":"string"},"timezone":{"type":"string"},"options":{"type":"object","description":"ScreenshotOptions used for every run"},"webhook_url":{"type":"string"},"has_webhook_secret":{"type":"boolean"},"is_active":{"type":"boolean"},"last_run_at":{"type":["string","null"]},"last_run_id":{"type":["string","null"]},"last_result_url":{"type":["string","null"]},"last_error":{"type":["string","null"]},"next_run_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}},"get":{"summary":"List your scheduled captures","tags":["Schedules"],"description":"Returns every schedule owned by the API key that made the request, newest first.","parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Schedule list","content":{"application/json":{"schema":{"description":"Schedule list","type":"object","additionalProperties":true,"properties":{"count":{"type":"number"},"schedules":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","description":"Schedule ID (sched_...)"},"name":{"type":"string"},"cron":{"type":"string"},"timezone":{"type":"string"},"options":{"type":"object","description":"ScreenshotOptions used for every run"},"webhook_url":{"type":"string"},"has_webhook_secret":{"type":"boolean"},"is_active":{"type":"boolean"},"last_run_at":{"type":["string","null"]},"last_run_id":{"type":["string","null"]},"last_result_url":{"type":["string","null"]},"last_error":{"type":["string","null"]},"next_run_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/schedules/{id}":{"get":{"summary":"Fetch a scheduled capture","tags":["Schedules"],"description":"Returns one schedule by ID. 404 if it doesn't exist or isn't owned by the requesting key.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"Schedule ID (sched_...)"},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Schedule found","content":{"application/json":{"schema":{"description":"Schedule found","type":"object","additionalProperties":true,"properties":{"id":{"type":"string","description":"Schedule ID (sched_...)"},"name":{"type":"string"},"cron":{"type":"string"},"timezone":{"type":"string"},"options":{"type":"object","description":"ScreenshotOptions used for every run"},"webhook_url":{"type":"string"},"has_webhook_secret":{"type":"boolean"},"is_active":{"type":"boolean"},"last_run_at":{"type":["string","null"]},"last_run_id":{"type":["string","null"]},"last_result_url":{"type":["string","null"]},"last_error":{"type":["string","null"]},"next_run_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}},"patch":{"summary":"Update a scheduled capture","tags":["Schedules"],"description":"All top-level fields are optional. Provide only what changes. Editing cron/timezone/is_active is synchronized with the underlying queue (old repeatable removed, new one registered atomically). Pass empty string to clear webhook_url or webhook_secret.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"cron":{"type":"string","minLength":1,"maxLength":100},"timezone":{"type":"string","maxLength":64,"default":"UTC"},"options":{"type":"object","additionalProperties":{}},"webhook_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]}]},"webhook_secret":{"anyOf":[{"type":"string","minLength":8,"maxLength":200},{"type":"string","enum":[""]}]},"is_active":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Schedule updated","content":{"application/json":{"schema":{"description":"Schedule updated","type":"object","additionalProperties":true,"properties":{"id":{"type":"string","description":"Schedule ID (sched_...)"},"name":{"type":"string"},"cron":{"type":"string"},"timezone":{"type":"string"},"options":{"type":"object","description":"ScreenshotOptions used for every run"},"webhook_url":{"type":"string"},"has_webhook_secret":{"type":"boolean"},"is_active":{"type":"boolean"},"last_run_at":{"type":["string","null"]},"last_run_id":{"type":["string","null"]},"last_result_url":{"type":["string","null"]},"last_error":{"type":["string","null"]},"next_run_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}},"delete":{"summary":"Delete a scheduled capture","tags":["Schedules"],"description":"Deletes the schedule, unregisters it from the queue, and drops its schedule_runs history.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Schedule deleted","content":{"application/json":{"schema":{"description":"Schedule deleted","type":"object","additionalProperties":true,"properties":{"deleted":{"type":"boolean"},"id":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/schedules/{id}/run":{"post":{"summary":"Trigger a scheduled capture immediately","tags":["Schedules"],"description":"Fires a one-off ad-hoc run without touching the cron. Useful for end-to-end testing before waiting for the next tick.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"202":{"description":"Capture queued","content":{"application/json":{"schema":{"description":"Capture queued","type":"object","additionalProperties":true,"properties":{"schedule_id":{"type":"string"},"status":{"type":"string","enum":["queued"]},"message":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/schedules/{id}/runs":{"get":{"summary":"Recent execution history for a schedule","tags":["Schedules"],"description":"Returns the last 100 execution records (older rows are pruned automatically).","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Run history","content":{"application/json":{"schema":{"description":"Run history","type":"object","additionalProperties":true,"properties":{"schedule_id":{"type":"string"},"count":{"type":"number"},"runs":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","description":"Run ID (run_...)"},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"result_url":{"type":["string","null"]},"error":{"type":["string","null"]},"response_ms":{"type":["number","null"]},"webhook_status":{"type":["number","null"]},"started_at":{"type":"string"},"completed_at":{"type":["string","null"]}}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/video":{"post":{"summary":"Capture a scrolling video (MP4 or GIF)","tags":["Video"],"description":"Records a smoothly-scrolling capture as MP4 (libx264) or GIF. Uses Chrome DevTools Page.screencast for high-fps frame sampling and ffmpeg for encoding. Costs 1 credit per second of video (rounded up, min 1).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"format":{"type":"string","enum":["mp4","gif"],"default":"mp4"},"viewport_width":{"type":"integer","minimum":320,"maximum":1920,"default":1280},"viewport_height":{"type":"integer","minimum":200,"maximum":1080,"default":720},"device":{"type":"string","enum":["desktop","mobile","tablet"],"default":"desktop"},"device_scale_factor":{"type":"number","minimum":0.5,"maximum":2,"default":1},"fps":{"type":"integer","minimum":10,"maximum":30,"default":15},"duration_ms":{"type":"integer","minimum":2000,"maximum":30000,"default":5000},"delay":{"type":"integer","minimum":0,"maximum":10000,"default":0},"css":{"type":"string","maxLength":10000,"default":""},"js":{"type":"string","maxLength":10000,"default":""},"dark_mode":{"type":"boolean","default":false},"quality":{"type":"integer","minimum":1,"maximum":100,"default":70},"remove_popups":{"type":"boolean","default":true},"block_ads":{"type":"boolean","default":true},"headers":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"cookies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"string"},"domain":{"type":"string"},"path":{"type":"string"},"httpOnly":{"type":"boolean"},"secure":{"type":"boolean"}},"required":["name","value"],"additionalProperties":false},"maxItems":50,"default":[]},"locale":{"type":"string","maxLength":20,"default":""},"timezone":{"type":"string","maxLength":100,"default":""},"user_agent":{"type":"string","maxLength":500,"default":""},"wait_for_selector":{"type":"string","maxLength":500,"default":""},"wait_for_network_idle":{"type":"boolean","default":true},"proxy_url":{"type":"string","maxLength":500,"default":""},"proxy_username":{"type":"string","maxLength":200,"default":""},"proxy_password":{"type":"string","maxLength":500,"default":""},"proxy_country":{"type":"string","maxLength":2,"default":""},"response_type":{"type":"string","enum":["binary","url"],"default":"url"},"attachment_name":{"type":"string","maxLength":200,"default":""},"webhook_url":{"type":"string","format":"uri"},"s3_upload":{"type":"object","properties":{"access_key_id":{"type":"string","minLength":1},"secret_access_key":{"type":"string","minLength":1},"bucket":{"type":"string","minLength":1},"region":{"type":"string","minLength":1},"endpoint":{"type":"string","format":"uri"},"path":{"type":"string","maxLength":500},"acl":{"type":"string","maxLength":50}},"required":["access_key_id","secret_access_key","bucket","region"],"additionalProperties":false}},"required":["url"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Video captured (URL mode)","content":{"application/json":{"schema":{"description":"Video captured (URL mode)","type":"object","additionalProperties":true,"properties":{"url":{"type":"string","description":"CDN URL of the encoded video"},"request_id":{"type":"string","description":"Unique request ID (vid_...)"},"format":{"type":"string","enum":["mp4","gif"]},"duration_ms":{"type":"number"},"frame_count":{"type":"number"},"fps":{"type":"number"},"bytes":{"type":"number","description":"Size of the encoded video in bytes"},"credits_charged":{"type":"number","description":"1 credit per second of video (rounded up, min 1)"},"response_time_ms":{"type":"number"},"s3_key":{"type":"string","description":"Present when s3_upload succeeded"},"s3_bucket":{"type":"string","description":"Present when s3_upload succeeded"}}}}}},"202":{"description":"Video queued (webhook mode)","content":{"application/json":{"schema":{"description":"Video queued (webhook mode)","type":"object","additionalProperties":true,"properties":{"request_id":{"type":"string"},"status":{"type":"string","enum":["pending"]},"message":{"type":"string"},"credits_reserved":{"type":"number"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"502":{"description":"The target site could not be reached (DNS, TLS, refused)","content":{"application/json":{"schema":{"description":"The target site could not be reached (DNS, TLS, refused)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"504":{"description":"The target site did not respond within the capture timeout","content":{"application/json":{"schema":{"description":"The target site did not respond within the capture timeout","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/referrals":{"get":{"summary":"Your referral code + stats","tags":["Auth"],"description":"Returns the caller's shareable referral code, a ready-to-copy referral URL, and their earned rewards. Every getSnap.dev account has one auto-generated on signup - there's no opt-in required. Share the URL: anyone who signs up through it gets a discount on their first paid month, and you earn a Stripe balance credit toward your next invoice when they convert to a paid plan.","parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"referral_code":{"type":"string","description":"Your shareable code (8 chars, uppercase alphanumeric)"},"referral_url":{"type":"string","description":"Full URL to share - includes ?ref= param"},"reward":{"type":"object","additionalProperties":true,"properties":{"per_conversion_cents":{"type":"number","description":"How much you earn per paid referral, in cents"},"referee_discount":{"type":"string","description":"Human-readable discount your referees receive"}}},"stats":{"type":"object","additionalProperties":true,"properties":{"total":{"type":"number","description":"Referrals you've made in total"},"paid":{"type":"number","description":"Referrals that converted to paid"},"pending":{"type":"number","description":"Signed up but not yet paid"},"reverted":{"type":"number","description":"Refunded or credit issuance failed"},"total_earned_cents":{"type":"number","description":"Lifetime credit earned in cents"}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/diff":{"post":{"summary":"Visual regression diff between two URLs","tags":["Screenshot"],"description":"Captures two URLs at identical viewport dimensions, compares pixel-by-pixel via pixelmatch, and returns three CDN URLs (before / after / diff-overlay) plus a similarity score (0-100). Both captures share the same viewport, device, and blocking settings so the resulting pixel arrays are comparable. Per-side overrides are supported for wait_for_selector, extra_delay_ms, and css. Billed at 2 credits per fresh comparison (one per captured page). Individual side captures that HIT the screenshot cache cost 0 credits and reduce the total.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"before":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"wait_for_selector":{"type":"string","maxLength":500},"extra_delay_ms":{"type":"integer","minimum":0,"maximum":15000},"css":{"type":"string","maxLength":10000}},"required":["url"],"additionalProperties":false},"after":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"wait_for_selector":{"type":"string","maxLength":500},"extra_delay_ms":{"type":"integer","minimum":0,"maximum":15000},"css":{"type":"string","maxLength":10000}},"required":["url"],"additionalProperties":false},"viewport_width":{"type":"integer","minimum":320,"maximum":3840,"default":1280},"viewport_height":{"type":"integer","minimum":200,"maximum":2160,"default":720},"full_page":{"type":"boolean","default":false},"device":{"type":"string","enum":["desktop","mobile","tablet"],"default":"desktop"},"device_scale_factor":{"type":"number","minimum":0.5,"maximum":3,"default":1},"block_ads":{"type":"boolean","default":true},"remove_popups":{"type":"boolean","default":true},"dark_mode":{"type":"boolean","default":false},"wait_for_network_idle":{"type":"boolean","default":true},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.1},"anti_alias":{"type":"boolean","default":true},"include_aa":{"type":"boolean","default":false}},"required":["before","after"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Diff computed","content":{"application/json":{"schema":{"description":"Diff computed","type":"object","additionalProperties":true,"properties":{"before_url":{"type":"string","description":"CDN URL of the 'before' capture"},"after_url":{"type":"string","description":"CDN URL of the 'after' capture"},"diff_url":{"type":"string","description":"CDN URL of the diff overlay (red highlights on transparent background)"},"similarity":{"type":"number","description":"0-100 percentage. 100 = pixel-identical."},"changed_pixels":{"type":"number","description":"Absolute count of differing pixels."},"total_pixels":{"type":"number","description":"Total pixels compared."},"width":{"type":"number"},"height":{"type":"number"},"before_cached":{"type":"boolean"},"after_cached":{"type":"boolean"},"request_id":{"type":"string"},"response_time_ms":{"type":"number"},"credits_charged":{"type":"number"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"502":{"description":"The target site could not be reached (DNS, TLS, refused)","content":{"application/json":{"schema":{"description":"The target site could not be reached (DNS, TLS, refused)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"504":{"description":"The target site did not respond within the capture timeout","content":{"application/json":{"schema":{"description":"The target site did not respond within the capture timeout","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/audit":{"post":{"summary":"Accessibility audit (WCAG 2.0/2.1/2.2, Section 508, best practices)","tags":["Screenshot"],"description":"Runs axe-core against the target URL and returns categorised WCAG violations. Every violation includes the rule ID, impact tier (minor/moderate/serious/critical), a plain-English description, the WCAG success criterion tags, and the failing HTML elements with CSS selectors. Optionally captures a viewport screenshot for review context. Billed at 1 credit per audit + 1 credit if include_screenshot=true. Cache is NOT applied because DOM analysis changes per-request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"viewport_width":{"type":"integer","minimum":320,"maximum":3840,"default":1280},"viewport_height":{"type":"integer","minimum":200,"maximum":2160,"default":720},"wait_for_selector":{"type":"string","maxLength":500},"extra_delay_ms":{"type":"integer","minimum":0,"maximum":15000},"wait_for_network_idle":{"type":"boolean","default":true},"include_screenshot":{"type":"boolean","default":false},"tags":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":20,"default":[]},"rules":{"type":"array","items":{"type":"string","maxLength":80},"maxItems":50,"default":[]}},"required":["url"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Audit complete","content":{"application/json":{"schema":{"description":"Audit complete","type":"object","additionalProperties":true,"properties":{"url":{"type":"string"},"page_title":{"type":"string"},"http_status":{"type":["null","integer"]},"violations":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"impact":{"type":["string","null"],"enum":["minor","moderate","serious","critical",null]},"description":{"type":"string"},"help":{"type":"string"},"help_url":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"nodes":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"target":{"type":"array","items":{"type":"string"}},"html":{"type":"string"},"failure_summary":{"type":"string"}}}}}}},"incomplete":{"type":"array","description":"Rules that axe couldn't fully evaluate - review manually","items":{"type":"object","additionalProperties":true}},"passes_count":{"type":"number"},"inapplicable_count":{"type":"number"},"summary":{"type":"object","additionalProperties":true,"properties":{"total_violations":{"type":"number"},"critical":{"type":"number"},"serious":{"type":"number"},"moderate":{"type":"number"},"minor":{"type":"number"}}},"screenshot_url":{"type":"string","description":"CDN URL of a viewport screenshot (only when include_screenshot: true)"},"request_id":{"type":"string"},"response_time_ms":{"type":"number"},"audit_ms":{"type":"number","description":"Time spent running axe-core, excluding page load"},"credits_charged":{"type":"number"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"502":{"description":"The target site could not be reached (DNS, TLS, refused)","content":{"application/json":{"schema":{"description":"The target site could not be reached (DNS, TLS, refused)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"504":{"description":"The target site did not respond within the capture timeout","content":{"application/json":{"schema":{"description":"The target site did not respond within the capture timeout","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/teams":{"post":{"summary":"Create a new team","tags":["Teams"],"description":"Creates a team owned by the caller and inherits the caller's current plan, monthly_limit, and rate_limit_per_min settings. The caller's api_key is auto-attached to the team - all subsequent requests draw from the shared quota. To upgrade the team's plan later, use /v1/upgrade (works on team ID too).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60}},"required":["name"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Team created","content":{"application/json":{"schema":{"description":"Team created","type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"plan":{"type":"string"},"monthly_limit":{"type":"number"},"rate_limit_per_min":{"type":"number"},"owner_user_id":{"type":"string"},"created_at":{"type":"string"},"role":{"type":"string","description":"Your role in this team"},"member_count":{"type":"number"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}},"get":{"summary":"List teams you belong to","tags":["Teams"],"description":"Returns every team the caller is a member of, with their role in each and the team's aggregate settings.","parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"teams":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"plan":{"type":"string"},"monthly_limit":{"type":"number"},"rate_limit_per_min":{"type":"number"},"owner_user_id":{"type":"string"},"created_at":{"type":"string"},"role":{"type":"string","description":"Your role in this team"},"member_count":{"type":"number"}}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/teams/{id}/members":{"get":{"summary":"List team members","tags":["Teams"],"description":"Any team member can list the other members.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"members":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"user_id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"joined_at":{"type":"string"}}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/teams/{id}/invites":{"post":{"summary":"Invite a member by email","tags":["Teams"],"description":"Sends a single-use invite email that expires in 7 days. Only team owners and admins can invite. Role must be 'member' (default) or 'admin'; the owner role cannot be granted via invite (transfer separately once we ship it).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["admin","member"],"default":"member"}},"required":["email"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Invite sent","content":{"application/json":{"schema":{"description":"Invite sent","type":"object","additionalProperties":true,"properties":{"token":{"type":"string"},"invited_email":{"type":"string"},"role":{"type":"string"},"expires_at":{"type":"string"},"accept_url":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/teams/accept":{"post":{"summary":"Accept a team invite","tags":["Teams"],"description":"Consumes an invite token: adds the caller as a member of the team, and attaches their api_key to the team (so their requests start drawing from the team's shared quota). If the caller's email doesn't match the invited_email on the token, the invite is rejected as forbidden.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":8,"maxLength":64}},"required":["token"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Invite accepted","content":{"application/json":{"schema":{"description":"Invite accepted","type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"plan":{"type":"string"},"monthly_limit":{"type":"number"},"rate_limit_per_min":{"type":"number"},"owner_user_id":{"type":"string"},"created_at":{"type":"string"},"role":{"type":"string","description":"Your role in this team"},"member_count":{"type":"number"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/teams/{id}/leave":{"post":{"summary":"Leave a team","tags":["Teams"],"description":"Removes the caller from the team's roster and detaches their api_key. Owners cannot leave their own team via this endpoint - they must transfer ownership via /transfer-ownership first, or dissolve the team via DELETE. Solo departees fall back to their personal plan / limits.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"left_team_id":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/teams/{id}/transfer-ownership":{"post":{"summary":"Transfer team ownership to another member","tags":["Teams"],"description":"Owner-only. Promotes an existing member (must already be on the team) to owner and demotes the current owner to admin. Every team must have exactly one owner at all times, so this endpoint is the only way to change ownership without dissolving the team. Common flow: departing owner promotes their replacement, then optionally uses /leave to depart the team afterwards.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"new_owner_user_id":{"type":"string","minLength":1,"maxLength":80}},"required":["new_owner_user_id"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"team_id":{"type":"string"},"previous_owner":{"type":"string"},"new_owner":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/teams/{id}/checkout":{"post":{"summary":"Start Stripe Checkout to subscribe the team to a plan","tags":["Teams"],"description":"Owner-only. Creates (or reuses) the team's own Stripe customer, launches a Stripe Checkout Session for the requested plan, and returns a redirect URL. On success, the team gets a subscription independent from the owner's personal Stripe billing.\n\nIf the team already has an active subscription, this endpoint returns the billing portal URL instead so the owner can change plans / update payment method there. The response's `type` field distinguishes the two flows.\n\nSuccess URL redirects back to https://getsnap.dev/docs/teams.html?upgraded=true&team_id=...; cancel URL returns to the same page without the flag. Trial: new team subs get a 7-day trial (missing_payment_method: cancel).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["starter","pro","business"]}},"required":["plan"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"url":{"type":"string"},"type":{"type":"string","enum":["checkout","portal"]}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/teams/{id}/portal":{"post":{"summary":"Get a Stripe billing portal URL for the team","tags":["Teams"],"description":"Owner-only. Returns a Stripe billing portal URL where the owner can manage the team's subscription: change plan, update payment method, download invoices, or cancel. Returns 400 if the team has no Stripe customer attached yet (call /checkout first).","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"url":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/teams/{id}/billing":{"get":{"summary":"Get the team's current subscription status","tags":["Teams"],"description":"Any team member can call this. Returns the team's plan, monthly limit, rate limit, current subscription status (active | trialing | past_due | canceled | unpaid | incomplete | null), the current billing-period end date (if applicable), and whether the sub is scheduled to cancel at period end.\n\nWhen `subscription_status` is null the team has no team-owned subscription yet - it's on the plan/limits that were hoisted from the creator at team-creation time, and its billing is dormant until the owner runs /checkout.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"team_id":{"type":"string"},"plan":{"type":"string"},"monthly_limit":{"type":"number"},"rate_limit_per_min":{"type":"number"},"subscription_status":{"type":["null","string"]},"current_period_end":{"type":["null","string"]},"cancel_at_period_end":{"type":"boolean"},"has_team_subscription":{"type":"boolean"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"/v1/teams/{id}":{"delete":{"summary":"Dissolve a team","tags":["Teams"],"description":"Owner-only. Permanently deletes the team, revokes all outstanding invites, and detaches every member's api_key so they fall back to their personal plan and limits. Team usage history in usage_log is preserved (tied to api_key_id, not team_id). The team's consumed credits for the current period are rolled onto the owner's personal counter so dissolving does not reset the quota. This is a one-way action - there is no undo.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"x-api-key","required":true,"description":"Your getSnap.dev API key (starts with sk_live_)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"dissolved_team_id":{"type":"string"},"detached_key_count":{"type":"number"},"invites_revoked":{"type":"number"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"description":"Validation error","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"description":"Missing or invalid API key","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"description":"Monthly quota exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"403":{"description":"API key revoked","content":{"application/json":{"schema":{"description":"API key revoked","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"404":{"description":"Resource not found or not owned by the caller","content":{"application/json":{"schema":{"description":"Resource not found or not owned by the caller","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"409":{"description":"Conflict (e.g. duplicate resource)","content":{"application/json":{"schema":{"description":"Conflict (e.g. duplicate resource)","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"410":{"description":"Resource has expired","content":{"application/json":{"schema":{"description":"Resource has expired","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"500":{"description":"Server-side failure","content":{"application/json":{"schema":{"description":"Server-side failure","type":"object","required":["error","message"],"additionalProperties":true,"properties":{"error":{"type":"string","description":"Machine-readable error code (snake_case)","examples":["validation_error","unauthorized","forbidden","quota_exceeded","rate_limit_exceeded","not_found","capture_failed"]},"message":{"type":"string","description":"Human-readable error description"},"details":{"type":"object","description":"Per-field validation errors (populated on 400 responses)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}}},"servers":[{"url":"https://api.getsnap.dev","description":"Production"},{"url":"http://localhost:3000","description":"Development"}],"security":[{"apiKey":[]}],"tags":[{"name":"Screenshot","description":"Screenshot and batch capture endpoints"},{"name":"Video","description":"Scrolling video capture (MP4/GIF)"},{"name":"Schedules","description":"Cron-driven scheduled captures with HMAC-signed webhooks"},{"name":"Render Links","description":"Signed GET URLs for embedding screenshots in <img> tags"},{"name":"Usage","description":"Usage and quota queries"},{"name":"System","description":"Health checks and metadata"},{"name":"Billing","description":"Signup, upgrade, and billing portal"},{"name":"Teams","description":"Shared plans across multiple api_keys"}]}