< back to index

HTTP request

GET https://api.wevoteusa.org/apis/v1/voterEmailAddressSave (Jump to "Try It Now")

Required Parameters

Parameter name Value Description
api_key string (from post, cookie, or get (in that order)) The unique key provided to any organization using the WeVoteServer APIs
voter_device_id string An 88 character unique identifier linked to a voter record on the server
text_for_email_address string The address text a voter enters to identify the location tied to their ballot. (Not mailing address.)
email_we_vote_id string The unique identifier for this email across all networks
email_secret_key string We can pass in the secret key as an identifier.

Optional Parameters

Parameter name Value Description
delete_email boolean When this variable is passed in as true, mark this email as deleted.
make_primary_email boolean When this variable is passed in as true, change this (verified) email to be the primary.
verify_email boolean When this variable is passed in as true, change this email to verified.
resend_verification_email boolean Send the a verification email to this address again.

Response

{
  "status": string,
  "success": boolean,
  "voter_device_id": string (88 characters long),
  "text_for_email_address": string,
  "make_primary_email": boolean,
  "delete_email": boolean,
  "email_address_saved_we_vote_id": string,
  "email_address_created": boolean,
  "email_address_deleted": boolean,
  "verification_email_sent": boolean,
  "email_address_already_owned_by_other_voter": boolean,
  "email_address_found": boolean,
  "email_address_list_found": boolean,
  "email_address_list": list
   [
     "normalized_email_address": string,
     "primary_email_address": boolean,
     "email_permanent_bounce": boolean,
     "email_ownership_is_verified": boolean,
     "voter_we_vote_id": string,
     "email_we_vote_id": string,
   ],
}

Response Status Codes

Code Description
VALID_VOTER_DEVICE_ID_MISSING Cannot proceed. A valid voter_device_id parameter was not included.
MISSING_VOTER_ID_OR_ADDRESS_TYPE Cannot proceed. Missing variables voter_id or address_type while trying to save.

Try It Now: API Variables

Save or create an email address for the current voter.

Parameter name Value  
voter_device_id:
text_for_email_address:
email_we_vote_id:
email_secret_key:
delete_email: True
False
make_primary_email: True
False
verify_email: True
False
resend_verification_email: True
False

(opens in new window)