{"components":{"schemas":{"PoWVerifyRequest":{"properties":{"challenge_id":{"type":"string"},"nonce":{"type":"string"}},"required":["challenge_id","nonce"],"type":"object"},"Profile":{"properties":{"created_at":{"format":"date-time","type":"string"},"hash":{"type":"string"},"profile_count":{"minimum":1,"type":"integer"},"text":{"type":"string"},"zip":{"type":"string"}},"required":["hash","zip","created_at","profile_count","text"],"type":"object"},"ProfilePublishRequest":{"properties":{"challenge_id":{"type":"string"},"nonce":{"type":"string"},"profile_text":{"description":"Anonymized VOTER.md content as plain text/markdown","type":"string"},"zip":{"description":"Postal code — only location field accepted","type":"string"}},"required":["challenge_id","nonce","zip","profile_text"],"type":"object"},"ProfilePublishResponse":{"properties":{"created_at":{"format":"date-time","type":"string"},"profile_count":{"minimum":1,"type":"integer"},"profile_hash":{"type":"string"}},"required":["profile_hash","created_at","profile_count"],"type":"object"}}},"info":{"description":"Backend for VoteThisWay — AI skills that research every race on your ballot against your values, not a party platform. Endpoints support skill distribution, anonymized voter-profile publishing (proof-of-work gated), and aggregate ZIP-level stats. Skills are MIT licensed — free to use, modify, and redistribute as-is.","title":"VoteThisWay API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/install.sh":{"get":{"description":"Returns a shell script that auto-detects installed harnesses (Claude Code CLI, Codex CLI, opencode) and installs all VoteThisWay skills globally for the current user. Prompts for confirmation before writing any files. Run with: bash \u003c(curl -fsSL https://votethisway.org/install.sh). Other agents can discover and fetch skills directly via GET /v1/skills.","responses":{"200":{"description":"Shell installer script"}},"summary":"Install skills"}},"/up":{"get":{"responses":{"200":{"description":"Service is up"}},"summary":"Health check"}},"/v1/aggregates":{"get":{"responses":{"200":{"description":"Aggregate stats returned"}},"summary":"Get aggregate counts"}},"/v1/pow/challenge":{"get":{"responses":{"200":{"description":"Challenge returned"}},"summary":"Get a PoW challenge"}},"/v1/pow/verify":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoWVerifyRequest"}}},"required":true},"responses":{"200":{"description":"PoW verified"},"400":{"description":"Invalid PoW request"}},"summary":"Verify PoW solution"}},"/v1/profiles/publish":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilePublishRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilePublishResponse"}}},"description":"Profile published"},"400":{"description":"Bad request or PoW failed"}},"summary":"Publish anonymized profile with PoW"}},"/v1/profiles/{hash}":{"get":{"parameters":[{"in":"path","name":"hash","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}},"description":"Profile found"},"404":{"description":"Profile not found"}},"summary":"Get published profile"}},"/v1/skills":{"get":{"description":"Returns the list of available skill files with their download URLs and SHA-256 content hashes. To keep local skills up to date, call this endpoint periodically and compare each skill's sha256 against the hash of your locally cached copy. If they differ, re-fetch that skill from its url. This allows targeted updates without re-downloading all skills on every check.","responses":{"200":{"description":"Skills listed"}},"summary":"List available skills"}}}}
