Authentication: Reset Account Password

By submitting an email address via POST to this endpoint an email will be sent to the email with a temporary link to reset a POOL account password.

Reset Account Password Specification:

Parameters: POST variables:
  1. email: Correctly formatted email address
Header variables:
  1. None
Data returned:

Password Reset Work Flow:

  1. URL: https://api.promoonly.com/password/reset
  2. Header: none
  3. Method: POST
  4. POST Variables:
    • email: EMAIL ADDRESS
  5. Returned: JSON

    Example JSON Output:

    {
        "reset_email": "sent"
    }
    - OR -
    {
        "result": "fail",
        "message": "mail.send() failed due to incorrect configuration."
    }

Examples

  1. PHP (using cURL):

    <?php
        $post_fields = "email=test@promoonly.com";
        $userid_url = "https://api.promoonly.com/password/reset";

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $userid_url);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

        $userid_result = curl_exec($ch);
        curl_close($ch);

        $userid_obj = json_decode($userid_result);
    ?>
  2. Javascript (using jQuery):

    $.ajax({
        type: "POST",
        url: "https://api.promoonly.com/password/reset",
        data: { email: "test@promoonly.com" },
        dataType: "json",
        success: function (data)
        {
            console.log(data);
        }
    });
  3. Python (using requests):

    #!/usr/bin/env python

    import requests
    import urllib

    user_data = { "email": "test@promoonly.com" }
    userid_url = "https://api.promoonly.com/password/reset"
    userid_result = requests.post(userid_url, data=user_data)

    print(userid_result.text)