< back to index

HTTP request

GET https://api.wevoteusa.org/apis/v1/voterSMSPhoneNumberSave (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
sms_phone_number string The phone number to be saved.

Optional Parameters

Parameter name Value Description
delete_sms_phone_number boolean When this variable is passed in as true, mark this sms phone number as deleted.
make_primary_sms_phone_number boolean When passed in as true, change this (verified) sms phone number to be the primary.
resend_verification_code boolean Send the a verification code to this sms phone number again.
send_sign_in_code_sms boolean Send the verification code to this sms phone number.
sms_we_vote_id string The unique identifier for this sms across all networks
verify_sms_phone_number boolean When this variable is passed in as true, change this sms phone number to verified.

Response

{
  "status": string,
  "success": boolean,
  "voter_device_id": string (88 characters long),
  "sms_phone_number": string,
  "make_primary_sms_phone_number": boolean,
  "delete_sms_phone_number": boolean,
  "sms_phone_number_saved_we_vote_id": string,
  "sms_phone_number_created": boolean,
  "sms_phone_number_deleted": boolean,
  "verification_code_sent": boolean,
  "sms_phone_number_already_owned_by_other_voter": boolean,
  "sms_phone_number_found": boolean,
  "sms_phone_number_list_found": boolean,
  "sms_phone_number_list": list
   [
     "normalized_sms_phone_number": string,
     "primary_sms_phone_number": boolean,
     "sms_phone_number_permanent_bounce": boolean,
     "sms_phone_number_ownership_is_verified": boolean,
     "voter_we_vote_id": string,
     "sms_phone_number_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 SMS phone number for the current voter.

Parameter name Value  
voter_device_id:
sms_phone_number:
delete_sms_phone_number: True
False
make_primary_sms_phone_number: True
False
resend_verification_code: True
False
send_sign_in_code_sms: True
False
sms_we_vote_id:
verify_sms_phone_number: True
False

(opens in new window)