UptimeTea

API Documentation

The UptimeTea API is easy to use and free for all plans.

Request password reset

Emails a password reset link when the address belongs to an account. Always answers 204, so it never reveals which emails are registered.

POST https://api.uptimetea.com/auth/password/remind

Headers

  • Content-TypeREQUIREDSTRING
    application/json

Body parameters

  • emailREQUIREDSTRING

    Account email.

Response body

HTTP 204 No Content (empty body)

Code examples

curl -X POST "https://api.uptimetea.com/auth/password/remind" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com"
  }'
// Request password reset
const response = await fetch('https://api.uptimetea.com/auth/password/remind', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "email": "user@example.com"
  })
});

console.log(response.status);
# Request password reset
import requests

response = requests.post(
    'https://api.uptimetea.com/auth/password/remind',
    json={
        'email': 'user@example.com'
    }
)

print(response.status_code)
// Request password reset
package main

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

func main() {
    body := strings.NewReader(`{
      "email": "user@example.com"
    }`)
    req, _ := http.NewRequest("POST", "https://api.uptimetea.com/auth/password/remind", body)
    req.Header.Set("Content-Type", "application/json")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    data, _ := io.ReadAll(resp.Body)
    fmt.Println(resp.Status, string(data))
}
# Request password reset
require 'net/http'
require 'uri'

uri = URI('https://api.uptimetea.com/auth/password/remind')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = <<~JSON
  {
    "email": "user@example.com"
  }
JSON

response = http.request(request)
puts response.code, response.body
<?php
// Request password reset
$ch = curl_init('https://api.uptimetea.com/auth/password/remind');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, <<<'JSON'
{
  "email": "user@example.com"
}
JSON);

$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);