POST
/
v1
/
auth
/
forgot-password
Start a password reset
curl --request POST \
  --url https://api.next.orenda.finance/v1/auth/forgot-password \
  --header 'Content-Type: application/json' \
  --header 'x-program-id: <x-program-id>' \
  --data '
{
  "email": "ada.lovelace@example.com"
}
'
import requests

url = "https://api.next.orenda.finance/v1/auth/forgot-password"

payload = { "email": "ada.lovelace@example.com" }
headers = {
"x-program-id": "<x-program-id>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'x-program-id': '<x-program-id>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'ada.lovelace@example.com'})
};

fetch('https://api.next.orenda.finance/v1/auth/forgot-password', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.next.orenda.finance/v1/auth/forgot-password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'ada.lovelace@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-program-id: <x-program-id>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.next.orenda.finance/v1/auth/forgot-password"

payload := strings.NewReader("{\n \"email\": \"ada.lovelace@example.com\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-program-id", "<x-program-id>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.next.orenda.finance/v1/auth/forgot-password")
.header("x-program-id", "<x-program-id>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"ada.lovelace@example.com\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.next.orenda.finance/v1/auth/forgot-password")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-program-id"] = '<x-program-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"ada.lovelace@example.com\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "message": "Confirmation code sent to email"
  }
}
{
"success": false,
"code": "INVALID_CREDENTIALS",
"message": "<string>",
"retryable": true
}
{
"success": false,
"code": "VALIDATION_ERROR",
"message": "email is required"
}
Send the user’s email and we email them a reset code. Then set a new password with it.
For privacy, this always returns the same message whether or not the email exists, so you can’t use it to find out who has an account.

Headers

x-program-id
string
required

Identifies the program. Can also be sent as the programId query parameter.

Body

application/json
email
string<email>
required

Response

A simple confirmation message

success
boolean
Example:

true

data
object