Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Dashboard API > Account

Request a password reset

Warning: Experimental API

Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.

Body parameters

typestringRequired

Must be exactly "password_reset".

attributes.emailstringRequired

Email

Example:"foo@bar.com"

Examples

POST https://site-api.datocms.com/account/reset_password HTTP/1.1
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
X-Api-Version: 3
Content-Type: application/vnd.api+json
{
"data": {
"type": "password_reset",
"attributes": {
"email": "foo@bar.com"
}
}
}
Terminal window
curl -g 'https://site-api.datocms.com/account/reset_password' \
-X POST \
-H "Authorization: Bearer YOUR-API-TOKEN" \
-H "Accept: application/json" \
-H "X-Api-Version: 3" \
-H "Content-Type: application/vnd.api+json" \
--data-binary '{"data":{"type":"password_reset","attributes":{"email":"foo@bar.com"}}}'
await fetch("https://site-api.datocms.com/account/reset_password", {
method: "POST",
headers: {
Authorization: "Bearer YOUR-API-TOKEN",
Accept: "application/json",
"X-Api-Version": "3",
"Content-Type": "application/vnd.api+json",
},
body: JSON.stringify({
data: { type: "password_reset", attributes: { email: "foo@bar.com" } },
}),
});