Admin-trigger a password reset email
/portal/v1/accounts/{accountSlug}/identities/{id}/reset-passwordAuthentication
- Bearer Token
AuthorizationJWT access token
Path Parameters
| Name | Required | Type | Description |
|---|---|---|---|
id | string |
Code samples
curl -X POST "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/identities/value/reset-password" \
-H "Authorization: Bearer $CANOPY_TOKEN"const response = await fetch("https://api.canopy.dev/portal/v1/accounts/{accountSlug}/identities/value/reset-password", {
method: "POST",
headers: {
"Authorization": "Bearer $CANOPY_TOKEN"
},
});
const data = await response.json();import requests
response = requests.post(
"https://api.canopy.dev/portal/v1/accounts/{accountSlug}/identities/value/reset-password",
headers={
"Authorization": "Bearer $CANOPY_TOKEN"
},
)
data = response.json()package main
import (
"net/http"
)
func main() {
req, _ := http.NewRequest("POST", "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/identities/value/reset-password", nil)
req.Header.Set("Authorization", "Bearer $CANOPY_TOKEN")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
200 Generates a single-use reset token and emails the identity. The admin never sees the token. Distinct from the password_reset invite intent — that flow rotates a password and creates an audit trail of admin-driven recovery; this flow just initiates the self-service reset on the identity's behalf.
{
"message": "string"
}application/json
message *string
401 Invalid or expired token
403 This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)
404 Identity not found