Developers Guide v1

This guide shows developers how to use the endpoints of the Elections API to retrieve the election information necessary to construct election ballots.

Follow the below steps to get started creating ballots for elections using the mySidewalk Elections API. Click the links to the endpoint documentation in each section for more information.

1. Search for an Election

To see what upcoming elections are available in a state, create a GET request for the Elections endpoint. Try the online API tester.

For example:

curl "https://mysidewalk.com/api/election/v1/elections?state=VA" \
  -H "Authorization: Token your_token"

This request returns a JSON formatted list of elections.

2. Get the ContestSummaries for an Address

To view a summary of contests for a given election, create a GET request for the ContestSummaries endpoint using the state abbreviation, an election id from Step 1 and a latitude and longitude. Try the online API tester.

For example:

curl "https://mysidewalk.com/api/election/v1/contest-summaries?state=VA&election=28&latitude=38.811402&longitude=-77.179279" \
  -H "Authorization: Token your_token"

This request returns a JSON formatted list of contest summaries.

3. Get the Details of a Contest

To view the details of a contest, such as a list of candidates for that contest and their party, create a GET request for the Contests endpoint using a contest id from Step 2. Try the online API tester.

For example:

curl "https://mysidewalk.com/api/election/v1/contests/20562" \
  -H "Authorization: Token your_token"

This request returns contest details in JSON format.

Terms of Use

By accessing or using the mySidewalk Elections API without a more specific licensing agreement, you accept and agree to be bound by the following terms and conditions. It is important that you read these Terms as they form a legal agreement between you and mySidewalk, Inc. If you do not have authority, or if you do not agree with the terms of this API Agreement, do not access or use the API.

For more information about how to license the mySidewalk Elections API and how to receive an access token, please contact [email protected].