Select programming language for code examples


linkForgot password

Request a password reset for a user. This will send an email to the user, if it is a valid email address. The email will contain a link leading to a password reset form securely hosted by Keygen.

If you would like to use custom branding or your own domain, you can set deliver = false and listen for the user.password-reset webhook which will contain the user data and meta containing the user's password reset token. You can use the password reset token to fulfill the reset through the password reset fulfillment endpoint.


linkURL Parameters

  • link:account

    string, required

    The identifier (UUID) or slug of your Keygen account.



    string, required

    The email of the user.

  • linkmeta.deliver

    boolean, optional, default istrue

    Whether or not to email a password reset notification to the user. When false, you will need to listen for the user.password-reset webhook event and implement the fulfillment logic yourself.


A 202 Accepted response will be returned.

Upon error, an errors object will be returned along with an HTTP status code indicating the type of error. When an error occurs, the data property will not be included.


Example request

const fetch = require("node-fetch")
const response = await fetch("{ACCOUNT}/passwords", {
method: "POST",
headers: {
"Content-Type": "application/vnd.api+json",
"Accept": "application/vnd.api+json"
body: JSON.stringify({
"meta": {
"email": "[email protected]",
"deliver": false
import requests
import json
res =
"Content-Type": "application/vnd.api+json",
"Accept": "application/vnd.api+json"
"meta": {
"email": "[email protected]",
"deliver": false
import SwiftyJSON
import Alamofire
method: .post,
headers: [
"Content-Type": "application/vnd.api+json",
"Accept": "application/vnd.api+json"
parameters: [
"meta": [
"email": "[email protected]",
"deliver": false
encoding: JSONEncoding.default
).responseJSON { response in
let status = response.response?.statusCode
using RestSharp;
var client = new RestClient("{ACCOUNT}");
var request = new RestRequest("passwords", Method.POST);
request.AddHeader("Content-Type", "application/vnd.api+json");
request.AddHeader("Accept", "application/vnd.api+json");
request.AddJsonBody(new {
meta = new {
email = "[email protected]",
deliver = false
var response = client.Execute(request);
import com.mashape.unirest.http.exceptions.*
import com.mashape.unirest.http.*
import org.json.*
val body = JSONObject(mapOf(
"meta" to mapOf(
"email" to "[email protected]",
"deliver" to false
val res ="{ACCOUNT}/passwords")
.header("Content-Type", "application/vnd.api+json")
.header("Accept", "application/vnd.api+json")
import com.mashape.unirest.http.exceptions.*;
import com.mashape.unirest.http.*;
import org.json.*;
import static java.util.Map.ofEntries;
import static java.util.Map.entry;
JSONObject body = new JSONObject(ofEntries(
entry("meta", ofEntries(
entry("email", "[email protected]"),
entry("deliver", false)
HttpResponse<JsonNode> res ="{ACCOUNT}/passwords")
.header("Content-Type", "application/vnd.api+json")
.header("Accept", "application/vnd.api+json")
#include <iostream>
#include <string>
#include <cpprest/http_client.h>
#include <cpprest/filestream.h>
using namespace std;
using namespace web;
using namespace web::http;
using namespace web::http::client;
using namespace web::json;
using namespace utility;
http_client client("{ACCOUNT}");
http_request req;
value meta;
meta["email"] = value::string("[email protected]");
meta["deliver"] = value::boolean(false);
value body;
body["meta"] = meta;
req.headers().add("Content-Type", "application/vnd.api+json");
req.headers().add("Accept", "application/json");
.then([](http_response res) {
auto status = res.status_code();
curl -X POST{ACCOUNT}/passwords \
-H 'Content-Type: application/vnd.api+json' \
-H 'Accept: application/vnd.api+json' \
-d '{
"meta": {
"email": "[email protected]",
"deliver": false

Example response / 202 Accepted

No content