API reference OpenAPI 3.1
POST /auth/password/reset

Password reset

Public — no authentication application/json operation passwordReset

Request

Content type: application/json · required

FieldTypeRequiredDescription
token string Yes —
new_password string Yes —
curl -X POST "$MONICHEK_API/auth/password/reset" \
  -H "Content-Type: application/json" \
  -d '{
  "token": "<token>",
  "new_password": "<password>"
}'
const res = await fetch(`${MONICHEK_API}/auth/password/reset`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "token": "<token>",
    "new_password": "<password>"
  }),
});

const data = await res.json();
import os
import requests

res = requests.post(
    f"{os.environ['MONICHEK_API']}/auth/password/reset",
    json={
      "token": "<token>",
      "new_password": "<password>"
    },
)
print(res.json())
$ch = curl_init(getenv('MONICHEK_API') . '/auth/password/reset');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'token' => '<token>',
        'new_password' => '<password>',
    ]),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;

Responses

200 OK reset

No response body.

Error responses

StatusMeaningBody
401 Unauthorized RFC 9457 problem
422 Unprocessable Entity RFC 9457 problem

Errors use the RFC 9457 problem format with a stable code.