{"openapi":"3.1.0","info":{"title":"endorsedby.org API","version":"1.0.0","description":"Elections, contests, endorsers and endorsements across the U.S., and a stream of endorsement changes."},"servers":[{"url":"https://api.endorsedby.org"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An API key from the console: ebk_…"}},"responses":{"Error":{"description":"An error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}}}}}}}}}},"paths":{"/v1/states":{"get":{"summary":"States","responses":{"200":{"description":"Every state","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/elections":{"get":{"summary":"Elections","parameters":[{"name":"states","in":"query","required":false,"description":"USPS codes. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"types","in":"query","required":false,"description":"general, primary, special, special_primary, runoff, consolidated. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"upcoming","in":"query","schema":{"type":"boolean"}},{"name":"from","in":"query","description":"Elections on or after this date.","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Elections on or before this date.","schema":{"type":"string","format":"date"}},{"name":"lang","in":"query","description":"es for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise.","schema":{"type":"string","enum":["en","es"],"default":"en"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","description":"next_cursor from the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of elections, with voting rules (all-mail, ranked choice, fusion, runoff dates) in details","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/endorser-categories":{"get":{"summary":"Kinds of endorser (labor, newspaper, …)","parameters":[{"name":"lang","in":"query","description":"es for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise.","schema":{"type":"string","enum":["en","es"],"default":"en"}}],"responses":{"200":{"description":"Every category","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/endorsers":{"get":{"summary":"Endorsers","parameters":[{"name":"categories","in":"query","required":false,"description":"Category slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"states","in":"query","required":false,"description":"Home states, or national. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"elections","in":"query","required":false,"description":"Only endorsers with endorsements in these elections. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"q","in":"query","description":"Name contains.","schema":{"type":"string"}},{"name":"lang","in":"query","description":"es for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise.","schema":{"type":"string","enum":["en","es"],"default":"en"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","description":"next_cursor from the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of endorsers","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/endorsers/{slug}":{"get":{"summary":"One endorser, with the elections they’ve endorsed in","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"lang","in":"query","description":"es for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise.","schema":{"type":"string","enum":["en","es"],"default":"en"}}],"responses":{"200":{"description":"The endorser","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/contests":{"get":{"summary":"Contests with their choices and voting rules","parameters":[{"name":"elections","in":"query","required":false,"description":"Election slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"states","in":"query","required":false,"description":"USPS codes. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"levels","in":"query","required":false,"description":"District levels. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"contest_kinds","in":"query","required":false,"description":"candidate, measure, retention. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"districts","in":"query","required":false,"description":"OCD division ids. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"upcoming","in":"query","schema":{"type":"boolean"}},{"name":"lang","in":"query","description":"es for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise.","schema":{"type":"string","enum":["en","es"],"default":"en"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","description":"next_cursor from the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of contests","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/contests/{id}":{"get":{"summary":"One contest with every endorser’s position","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"categories","in":"query","required":false,"description":"Only these endorser categories. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"endorsers","in":"query","required":false,"description":"Only these endorsers. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"endorser_states","in":"query","required":false,"description":"Endorsers based in these states, or \"national\". Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"lang","in":"query","description":"es for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise.","schema":{"type":"string","enum":["en","es"],"default":"en"}}],"responses":{"200":{"description":"The contest","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/endorsements":{"get":{"summary":"Endorsements, one per endorser and choice","parameters":[{"name":"categories","in":"query","required":false,"description":"Endorser category slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"endorsers","in":"query","required":false,"description":"Endorser slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"endorser_states","in":"query","required":false,"description":"Endorsers’ home states (USPS codes), or national. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"states","in":"query","required":false,"description":"States the contests are voted in. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"elections","in":"query","required":false,"description":"Election slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"contest_kinds","in":"query","required":false,"description":"candidate, measure, retention. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"levels","in":"query","required":false,"description":"District levels: federal, state, county, city, school, special. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"contest","in":"query","schema":{"type":"integer"}},{"name":"upcoming","in":"query","schema":{"type":"boolean"}},{"name":"lang","in":"query","description":"es for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise.","schema":{"type":"string","enum":["en","es"],"default":"en"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","description":"next_cursor from the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of endorsements","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/ballot":{"get":{"summary":"The ballot at a location, with endorsements","parameters":[{"name":"location","in":"query","description":"A street address, ZIP code, city (\"Oakland, CA\"), county (\"Alameda County, CA\") or state. address is accepted too.","schema":{"type":"string","maxLength":300}},{"name":"lat","in":"query","description":"With lng, instead of location.","schema":{"type":"number"}},{"name":"lng","in":"query","schema":{"type":"number"}},{"name":"elections","in":"query","required":false,"description":"Election slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"categories","in":"query","required":false,"description":"Only these endorser categories. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"endorsers","in":"query","required":false,"description":"Only these endorsers. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"endorser_states","in":"query","required":false,"description":"Endorsers based in these states, or \"national\". Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"lang","in":"query","description":"es for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise.","schema":{"type":"string","enum":["en","es"],"default":"en"}}],"responses":{"200":{"description":"Districts and upcoming contests","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/recommendations":{"get":{"summary":"What chosen endorsers recommend on the ballot at a location","parameters":[{"name":"location","in":"query","description":"A street address, ZIP code, city (\"Oakland, CA\"), county (\"Alameda County, CA\") or state. address is accepted too.","schema":{"type":"string","maxLength":300}},{"name":"lat","in":"query","description":"With lng, instead of location.","schema":{"type":"number"}},{"name":"lng","in":"query","schema":{"type":"number"}},{"name":"subscription","in":"query","description":"A saved subscription (id or name) choosing the endorsers and contests.","schema":{"type":"string"}},{"name":"categories","in":"query","required":false,"description":"Endorser categories. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"endorsers","in":"query","required":false,"description":"Endorser slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"endorser_states","in":"query","required":false,"description":"Endorsers based in these states, or \"national\". Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"elections","in":"query","required":false,"description":"Election slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"levels","in":"query","required":false,"description":"District levels. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"contest_kinds","in":"query","required":false,"description":"candidate, measure, retention. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"only_endorsed","in":"query","description":"Leave out contests none of the chosen endorsers took a position in.","schema":{"type":"boolean"}},{"name":"lang","in":"query","description":"es for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise.","schema":{"type":"string","enum":["en","es"],"default":"en"}}],"responses":{"200":{"description":"Each upcoming contest with its choices, backers and recommendation","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/districts":{"get":{"summary":"Electoral districts: OCD ids, Census GEOIDs, level and type","parameters":[{"name":"states","in":"query","required":false,"description":"USPS codes. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"levels","in":"query","required":false,"description":"federal, state, county, city, school, special. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"types","in":"query","required":false,"description":"District types (congressional, state_upper, council, …). Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"elections","in":"query","required":false,"description":"Only districts with contests in these elections. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"q","in":"query","description":"Name contains.","schema":{"type":"string"}},{"name":"include_retired","in":"query","description":"Districts whose lines have been replaced too.","schema":{"type":"boolean"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","description":"next_cursor from the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of districts","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/districts/{id}":{"get":{"summary":"One district, with who holds its seat, its upcoming elections and, on request, its boundary","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"boundary","in":"query","description":"Include the GeoJSON MultiPolygon, where one is drawn (has_boundary). Others follow their Census GEOIDs’ lines.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"The district","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/representatives":{"get":{"summary":"Who represents a location: U.S. senators and representative, governor and statewide offices, state legislators","parameters":[{"name":"location","in":"query","description":"A street address, ZIP code, city (\"Oakland, CA\"), county (\"Alameda County, CA\") or state. address is accepted too.","schema":{"type":"string","maxLength":300}},{"name":"lat","in":"query","description":"With lng, instead of location.","schema":{"type":"number"}},{"name":"lng","in":"query","schema":{"type":"number"}},{"name":"lang","in":"query","description":"es for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise.","schema":{"type":"string","enum":["en","es"],"default":"en"}}],"responses":{"200":{"description":"The location and its officeholders, federal first","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/officeholders":{"get":{"summary":"People in office now, with party, term and contact details","parameters":[{"name":"states","in":"query","required":false,"description":"USPS codes. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"offices","in":"query","required":false,"description":"us_senator, us_representative, governor, lieutenant_governor, attorney_general, secretary_of_state, chief_election_officer, treasurer, auditor, state_senator, state_representative, state_legislator, city_council. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"levels","in":"query","required":false,"description":"federal, state, city. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"districts","in":"query","required":false,"description":"OCD division ids of the seats. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"q","in":"query","description":"Name contains.","schema":{"type":"string"}},{"name":"lang","in":"query","description":"es for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise.","schema":{"type":"string","enum":["en","es"],"default":"en"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","description":"next_cursor from the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of officeholders","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/officeholders/{id}":{"get":{"summary":"One officeholder by person_id, with every seat they hold","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lang","in":"query","description":"es for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise.","schema":{"type":"string","enum":["en","es"],"default":"en"}}],"responses":{"200":{"description":"The officeholder","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/coverage":{"get":{"summary":"What the API has for each state","parameters":[{"name":"upcoming","in":"query","description":"Count only upcoming elections (default true).","schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"Elections, contests, measures, endorsers and endorsements per state, and when they last changed","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/events":{"get":{"summary":"Endorsement changes after a cursor (polling)","parameters":[{"name":"subscription","in":"query","description":"A saved subscription’s id or name (instead of filter parameters).","schema":{"type":"string"}},{"name":"categories","in":"query","required":false,"description":"Endorser category slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"endorsers","in":"query","required":false,"description":"Endorser slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"endorser_states","in":"query","required":false,"description":"Endorsers’ home states (USPS codes), or national. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"states","in":"query","required":false,"description":"States the contests are voted in. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"elections","in":"query","required":false,"description":"Election slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"contest_kinds","in":"query","required":false,"description":"candidate, measure, retention. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"levels","in":"query","required":false,"description":"District levels: federal, state, county, city, school, special. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"types","in":"query","required":false,"description":"created, updated, deleted. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Resume after this position (next_cursor, or an SSE event id).","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","enum":["latest","earliest"],"default":"latest"}},{"name":"since","in":"query","description":"Start at changes from this time (ISO 8601), within the stream’s retention.","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":1000}},{"name":"wait","in":"query","description":"Seconds to wait for a change (long polling).","schema":{"type":"integer","maximum":25}}],"responses":{"200":{"description":"Events and the next cursor","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/stream":{"get":{"summary":"Endorsement changes as Server-Sent Events","parameters":[{"name":"subscription","in":"query","description":"A saved subscription’s id or name (instead of filter parameters).","schema":{"type":"string"}},{"name":"categories","in":"query","required":false,"description":"Endorser category slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"endorsers","in":"query","required":false,"description":"Endorser slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"endorser_states","in":"query","required":false,"description":"Endorsers’ home states (USPS codes), or national. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"states","in":"query","required":false,"description":"States the contests are voted in. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"elections","in":"query","required":false,"description":"Election slugs. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"contest_kinds","in":"query","required":false,"description":"candidate, measure, retention. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"levels","in":"query","required":false,"description":"District levels: federal, state, county, city, school, special. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"types","in":"query","required":false,"description":"created, updated, deleted. Comma-separated; any of them matches.","schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Resume after this position (next_cursor, or an SSE event id).","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","enum":["latest","earliest"],"default":"latest"}},{"name":"since","in":"query","description":"Start at changes from this time (ISO 8601), within the stream’s retention.","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"text/event-stream: ready, endorsement, checkpoint and reconnect events"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/subscriptions":{"get":{"summary":"Saved subscriptions","responses":{"200":{"description":"Every subscription","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Save a subscription","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"filter":{"type":"object"}}}}}},"responses":{"201":{"description":"Created"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/subscriptions/{id}":{"get":{"summary":"One subscription","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The subscription","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Replace a subscription","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete a subscription","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}}}}