Send password reset
POST
https://app.speybooks.com/api/v1/admin/users/{id}/send-reset-linkGenerate a password reset token and send the reset link email to the specified user. Uses the same flow as the self-service forgot-password endpoint.
Flow
- Look up user by ID
- Return 400 if user is inactive
- Invalidate any existing unused reset tokens
- Generate 32-byte random token, 1-hour expiry
- Insert into
password_reset_tokens - Send email via
sendPasswordResetEmail() - Write
PASSWORD_RESET_SENTaudit log
Returns 404 if user not found.
Error responses:
400 { code: "USER_INACTIVE" }— cannot send to inactive user404 { code: "NOT_FOUND" }— user not found
Path parameters
id string requiredUser ID.
Response
200 Reset email sent.
Show response fields
message stringError codes
400 User is inactive.
404 User not found.