Send password reset

POST https://app.speybooks.com/api/v1/admin/users/{id}/send-reset-link

Generate 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

  1. Look up user by ID
  2. Return 400 if user is inactive
  3. Invalidate any existing unused reset tokens
  4. Generate 32-byte random token, 1-hour expiry
  5. Insert into password_reset_tokens
  6. Send email via sendPasswordResetEmail()
  7. Write PASSWORD_RESET_SENT audit log

Returns 404 if user not found.

Error responses:

  • 400 { code: "USER_INACTIVE" } — cannot send to inactive user
  • 404 { code: "NOT_FOUND" } — user not found

Path parameters

id string required
User ID.

Response

200 Reset email sent.
Show response fields
message string

Error codes

400 User is inactive.
404 User not found.