Reset password with token
/v1/auth/reset-passwordRequest body
token *stringPassword reset token
password *stringNew password (8-128 chars, must contain uppercase, lowercase, digit, and special character)
Code samples
curl -X POST "https://api.canopy.dev/v1/auth/reset-password" \
-H "Content-Type: application/json" \
-d '{
"token": "string",
"password": "string"
}'const response = await fetch("https://api.canopy.dev/v1/auth/reset-password", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"token": "string",
"password": "string"
}),
});
const data = await response.json();import requests
response = requests.post(
"https://api.canopy.dev/v1/auth/reset-password",
headers={
"Content-Type": "application/json"
},
json={
"token": "string",
"password": "string",
},
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload := map[string]interface{}{
"token": "string",
"password": "string",
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.canopy.dev/v1/auth/reset-password", bytes.NewBuffer(body))
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
200 Password reset
{
"message": "string"
}application/json
message *string