Request a password reset email
curl --request POST \
--url https://api.acornops.dev/api/v1/auth/password/forgot \
--header 'Content-Type: application/json' \
--header 'x-csrf-token: <x-csrf-token>' \
--data '
{
"email": "dev@acornops.local"
}
'const options = {
method: 'POST',
headers: {'x-csrf-token': '<x-csrf-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'dev@acornops.local'})
};
fetch('https://api.acornops.dev/api/v1/auth/password/forgot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true,
"status": "<string>",
"message": "<string>",
"resendAfterSeconds": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Auth and users
Request a password reset email
The response is enumeration-safe for unknown, OIDC-only, verified password, and pending password accounts. Only password-backed users receive a token.
Request a password reset email
curl --request POST \
--url https://api.acornops.dev/api/v1/auth/password/forgot \
--header 'Content-Type: application/json' \
--header 'x-csrf-token: <x-csrf-token>' \
--data '
{
"email": "dev@acornops.local"
}
'const options = {
method: 'POST',
headers: {'x-csrf-token': '<x-csrf-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'dev@acornops.local'})
};
fetch('https://api.acornops.dev/api/v1/auth/password/forgot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true,
"status": "<string>",
"message": "<string>",
"resendAfterSeconds": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Headers
CSRF token returned by /api/v1/auth/csrf and mirrored in the CSRF cookie.
Body
application/json
Example:
"dev@acornops.local"